• Resolved abbg

    (@abbg)


    Please advise how to fix this error:

    An error of type E_ERROR was caused in line 121 of the file /home/customer/www/xxxxx.com/public_html/wp-content/plugins/shareasale-wc-tracker/admin/class-shareasale-wc-tracker-admin.php.

    Error message: Uncaught Error: Class ‘ShareASale_WC_Tracker_Coupon’ not found in /home/customer/www/xxxxx.com/public_html/wp-content/plugins/shareasale-wc-tracker/admin/class-shareasale-wc-tracker-admin.php:121

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ryan Stark

    (@rfrey2009)

    Sorry to hear you’re having trouble. What other plugins do you have installed, and what version of WooCommerce and WordPress are you running?

    Thread Starter abbg

    (@abbg)

    Thank you for your quick response.
    WooCommerce Version 4.1.1
    WordPress version 5.4.1
    The other plugin got affected is Woorewards. Please see the stack trace below.

    Stack trace:
    #0 /home/customer/www/xxxxx.com/public_html/wp-includes/class-wp-hook.php(287): ShareASale_WC_Tracker_Admin->woocommerce_coupon_options_save(10623, Object(WC_Coupon))
    #1 /home/customer/www/xxxxx.com/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
    #2 /home/customer/www/xxxxx.com/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #3 /home/customer/www/xxxxx.com/public_html/wp-content/plugins/woorewards/include/unlockables/coupon.php(304): do_action(‘woocommerce_cou…’, 10623, Object(WC_Coupon))
    #4 /home/customer/www/xxxxx.com/public_html/wp-content/plugins/woorewards/modules/woorewards-pro/include/unlockables/coupon.php(332): LWS\WOOREWARDS\Unlockables\Coupon->createShopCoupon(‘3SGKX0KLK6’, Object(WP_User), false)
    #5 /home/cus

    Plugin Author shareasale-wp

    (@shareasale-wp)

    I was able to replicate the problem with WooRewards Pro. It looks like that plugin executes the woocommerce_coupon_options_save hook without executing the admin_init hook (where ShareASale_WC_Tracker_Coupon class is included) like our plugin expects.

    Try replacing the file at /public_html/wp-content/plugins/shareasale-wc-tracker/admin/class-shareasale-wc-tracker-admin.php with the updated file here. Then reactivate the ShareASale and WooRewards plugins, if either is deactivated, and give a user enough loyalty points to generate a coupon automatically to see if the error happens again.

    If this works for you, we can roll out the solution to everyone in the next version update!

    Thread Starter abbg

    (@abbg)

    I replaced the file and it fixed the issue! I tested WooRewards with points added and it works fine without any error. Thanks again for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error: ‘ShareASale_WC_Tracker_Coupon’ not found’ is closed to new replies.