Title: wp_dequeue_script doesn&#8217;t work
Last modified: September 26, 2022

---

# wp_dequeue_script doesn’t work

 *  Resolved [ADvi](https://wordpress.org/support/users/advi/)
 * (@advi)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/wp_dequeue_script-doesnt-work/)
 * Hi.
 * I’m trying to disable this plugin’s scripts on homepage.
    But wp_dequeue_script
   doesn’t work for it. How can I achieve this?
 *     ```
       function dequeue_front_page_scripts() {
       	if( is_front_page() ) {
       		wp_dequeue_script( 'cpsw-stripe-elements' );
       		wp_dequeue_script( 'cpsw-stripe-external' );
       		wp_dequeue_script( 'cpsw-express-checkout-js' );			
       	}
       }
       add_action( 'wp_enqueue_scripts', 'dequeue_front_page_scripts' );`
       ```
   
    -  This topic was modified 3 years, 6 months ago by [ADvi](https://wordpress.org/support/users/advi/).

Viewing 1 replies (of 1 total)

 *  Plugin Support [Aamir](https://wordpress.org/support/users/aamiribsf/)
 * (@aamiribsf)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/wp_dequeue_script-doesnt-work/#post-16053670)
 * Hello [@advi](https://wordpress.org/support/users/advi/),
 * Thanks for choosing our product and writing us.
 * We have contacted the developers and they said they could see only CSS files 
   loading in the front end.
 * For that, you should use wp_dequeue_style()
 * In case you want to deregister any CSS or the script you should hook it with 
   higher priority like
    add_action( ‘wp_enqueue_scripts’, ‘dequeue_front_page_scripts’,
   50 );
 * Please try and let us know how that goes.
 * I hope this helps.

Viewing 1 replies (of 1 total)

The topic ‘wp_dequeue_script doesn’t work’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/checkout-plugins-stripe-woo_8080e9.
   svg)
 * [Stripe Payments For WooCommerce by Checkout Plugins](https://wordpress.org/plugins/checkout-plugins-stripe-woo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/checkout-plugins-stripe-woo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/checkout-plugins-stripe-woo/)
 * [Active Topics](https://wordpress.org/support/plugin/checkout-plugins-stripe-woo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/checkout-plugins-stripe-woo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/checkout-plugins-stripe-woo/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Aamir](https://wordpress.org/support/users/aamiribsf/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/wp_dequeue_script-doesnt-work/#post-16053670)
 * Status: resolved