Skip to content

Instantly share code, notes, and snippets.

@lukecav
Created November 24, 2021 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukecav/4e6eb7aebe87a70c7a0681a36621e084 to your computer and use it in GitHub Desktop.
Save lukecav/4e6eb7aebe87a70c7a0681a36621e084 to your computer and use it in GitHub Desktop.
Disable Stripe scripts from loading on product and cart pages in WooCommerce
add_filter( ‘wc_stripe_load_scripts_on_product_page_when_prbs_disabled’, ‘__return_false’ );
add_filter( ‘wc_stripe_load_scripts_on_cart_page_when_prbs_disabled’, ‘__return_false’ );
@mihaiav
Copy link

mihaiav commented Mar 12, 2024

Unfortunately this no longer works. Any update?

@clicknathan
Copy link

@mihaiav This does wok, but note the curly quotes in the snippet. They need to be changed to regular ' quotes.

add_filter( 'wc_stripe_load_scripts_on_product_page_when_prbs_disabled', '__return_false' ); add_filter( 'wc_stripe_load_scripts_on_cart_page_when_prbs_disabled', '__return_false' );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment