• Resolved webmaster1234

    (@webmaster1234)


    Hello this plugin works great but after activating the newest version we are getting an error on the checkout page:

    Uncaught TypeError: e(…)[0] is undefined

    <anonymous> https://cdn.judge.me/judgeme_widget_v2.js:9
        u https://cdn.judge.me/judgeme_widget_v2.js:2
        fireWith https://cdn.judge.me/judgeme_widget_v2.js:2
        ready https://cdn.judge.me/judgeme_widget_v2.js:2
        o https://cdn.judge.me/judgeme_widget_v2.js:1

    Is there a way to disable these widgets from loading on the checkout page as they are not needed? Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello there,

    It is possible to do this but I wouldn’t recommend it since it requires you to modify the plugin’s files (which might cause an unexpected error). I highly recommend you to test this on a staging site first before going to the live site.

    Please follow these steps to prevent Judge.me files from loading on the checkout page:
    1/ In the WooCommerce dashboard, go to Plugins > Plugin editor or https://yourdomain/wp-admin/network/plugin-editor.php
    2/ Select Judge.me Product Reviews for WooCommerce as the plugin to edit
    3/ Go to the plugin file includes
    4/ Choose class-jgm-initilizer.php
    5/ Find this line (usually line 96) public function enqueue_judgeme_cdn_scripts() {
    6/ There you can add this condition if ( !is_checkout() ) { to limit our widgets to the checkout page only.
    7/ Remember to put an } at the end of the condition to complete the if statement. The final code would look like this:

    public function enqueue_judgeme_cdn_scripts() {
      if ( !is_checkout() ) {
          wp_enqueue_script( 'judgeme_cdn', 'https://cdn.judge.me/judgeme_widget_v2.js', null, null, false );
          wp_enqueue_style( 'judgeme_cdn', 'https://cdn.judge.me/judgeme_widget_v2.css', null, null, 'all' );
        }
      }

    8/ Click Update file

    Thread Starter webmaster1234

    (@webmaster1234)

    That removed the error. Thank you!

    No problems! I’m glad to hear it

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Possible to disable widgets on Woocommerce Checkout page?’ is closed to new replies.