Support » Plugin: Just-In-Time Sales Offers » Compatibility for legacy WC coupons of type ‘percentage_product’ (PHP Notice)

  • Resolved willgorham


    Old WC percentage coupons had a coupon type of ‘percent_product’, which has now been changed to percentage. This causes PHP Notices when displaying all coupons for the Accept Offer action. Would be great if this could be taken into account, e.g. how WooCommerce handles it (

    Maybe, in class-jitso-coupon.php on line ~151,

    if ( 'percent_product' === $coupon_type ) {
      $coupon_type = 'percent';

    Here’s the PHP Notice stack trace:

    [30-May-2017 18:34:47 UTC] PHP Notice: Undefined index: percent_product in /wp-content/plugins/just-in-time-sales-offers/models/shop/class-jitso-coupon.php on line 151
    [30-May-2017 18:34:47 UTC] PHP Stack trace:
    [30-May-2017 18:34:47 UTC] PHP 1. {main}() /wp-admin/post.php:0
    [30-May-2017 18:34:47 UTC] PHP 2. include() /wp-admin/post.php:173
    [30-May-2017 18:34:47 UTC] PHP 3. do_meta_boxes() /wp-admin/edit-form-advanced.php:703
    [30-May-2017 18:34:47 UTC] PHP 4. call_user_func:{/wp-admin/includes/template.php:1048}() /wp-admin/includes/template.php:1048
    [30-May-2017 18:34:47 UTC] PHP 5. JITSO_Offer_CPT->view_accept_offer_actions_meta_box() /wp-admin/includes/template.php:1048
    [30-May-2017 18:34:47 UTC] PHP 6. JITSO_Coupon->get_coupons() /wp-content/plugins/just-in-time-sales-offers/models/offer/class-jitso-offer-cpt.php:428

    Thanks for a great plugin! Will be purchasing the premium version.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Compatibility for legacy WC coupons of type ‘percentage_product’ (PHP Notice)’ is closed to new replies.