Title: script hooks not working
Last modified: April 16, 2018

---

# script hooks not working

 *  Resolved [krystianergotopia](https://wordpress.org/support/users/krystianergotopia/)
 * (@krystianergotopia)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/script-hooks-not-working/)
 * Stop script from loading on all pages.
 * I tried it with this code as well as with your custom hook to dequeue your script
   and the oneclick-upsell script from woocurve (they use also stripe). Its working
   for woocurve but your scripts are still loading on every page.
 * function is_handsome_checkout(){
    if( get_post_type() == ‘handsome-checkout’ ){
   return true; } return false; }
 * //add_action( ‘wp_enqueue_scripts’, ‘wc_dequeue_scripts’, 10 );
    add_action( ‘
   wp_footer’, ‘wc_dequeue_scripts’, 10 );
 * function wc_dequeue_scripts() {
    if ( ! is_checkout() && ! is_account_page() &&!
   is_handsome_checkout() ) { wp_dequeue_script( ‘stripe’ ); wp_dequeue_script( ‘
   ocustripe’ ); } }
 * This code from your side doesnt work on my end: [https://github.com/moonstonemedia/WP-Simple-Pay-Snippet-Library/blob/master/conditionally-dequeue-scripts-styles.php](https://github.com/moonstonemedia/WP-Simple-Pay-Snippet-Library/blob/master/conditionally-dequeue-scripts-styles.php)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fscript-hooks-not-working%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [krystianergotopia](https://wordpress.org/support/users/krystianergotopia/)
 * (@krystianergotopia)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/script-hooks-not-working/#post-10192922)
 * Please provide an answer or make an update. I am willing to pay for this, but
   this is quite important for us!
 *  [Phil Derksen](https://wordpress.org/support/users/pderksen/)
 * (@pderksen)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/script-hooks-not-working/#post-10199691)
 * [@krystianergotopia](https://wordpress.org/support/users/krystianergotopia/) 
   I did some testing here with the Lite & Pro versions, and it seems to work just
   fine in Lite, which is what I assume you’re referring to.
 * For Pro, I had to add a priority greater than 10 to the add_filter calls to fully
   dequeue all plugin CSS (it only partially worked). Snippets have been updated.
 * [https://github.com/moonstonemedia/WP-Simple-Pay-Snippet-Library/blob/master/conditionally-dequeue-scripts-styles.php](https://github.com/moonstonemedia/WP-Simple-Pay-Snippet-Library/blob/master/conditionally-dequeue-scripts-styles.php)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘script hooks not working’ is closed to new replies.

 * ![](https://ps.w.org/stripe/assets/icon-256x256.png?rev=2784844)
 * [Stripe Payment Forms by WP Simple Pay - Accept Credit Card Payments + Subscriptions with Stripe](https://wordpress.org/plugins/stripe/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/stripe/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/stripe/)
 * [Active Topics](https://wordpress.org/support/plugin/stripe/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/stripe/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/stripe/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Phil Derksen](https://wordpress.org/support/users/pderksen/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/script-hooks-not-working/#post-10199691)
 * Status: resolved