Product Icon

PayPal Braintree for WooCommerce

Accept PayPal, credit cards and debit cards with a single payment gateway solution — PayPal Powered by Braintree.

Easy Way to Dequeue Scripts and Styles

SV_WC_Payment_Gateway->enqueue_payment_form_assets() enqueues scripts and styles to include a hard-coded $versioned_handle in the handle name (in class-sv-wc-payment-gateway.php). Thus, it seems unstable to write something like:

wp_dequeue_script(‘sv-wc-payment-gateway-payment-form-v5_10_15’);

It would be great to add a filter to allow the function return before the scripts are enqueued. Like how you have here, but allowing developers to set their own conditionals:

if ( is_account_page() && ! is_add_payment_method_page() ) { return; }

Alternately, exposing the fully formed handled name as a public variable seems like it could be helpful as well.

Author

matthewmadrone611873750

Current Status

Open

Last updated: November 3, 2023

0 comments

Log in to comment on this feature request.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.