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.
Open
Last updated: November 3, 2023
0 comments
Log in to comment on this feature request.