Feature Request: Easy Way to Dequeue Scripts and Styles

[ad_1]

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.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer