• Resolved [email protected]

    (@michaelratcliffefamilyorg)


    Hi

    Coupon Box 2.0.4.2 breaks Flatsome 3.10.0 Header Builder (with fix).

    STR:

    1. Install WordPress 5.3.
    2. Install WooCommerce.
    3. Install Coupon Box 2.0.4.2.
    4. Go to Appearance -> Customize -> Header.

    Expected:

    The header builder should appear at the bottom of the page like this:

    View post on imgur.com

    Actual:
    TypeError: $ is not a function customize.php:276:30
    <anonymous> https://mydomain.com/wp-admin/customize.php?return=/wp-admin/post.php?post=2343&action=edit&classic-editor:276

    Which prevents the Header Builder from rendering (the line number would vary for each user because the error is triggered by the a page being loaded inside the editor).

    Please fix this:

    wp-content/plugins/woocommerce-coupon-box/admin/design.php:527

    - $('#accordion-section-wcb_coupon_box_design_image_column').addClass('wcb-hide-section');
    + jQuery('#accordion-section-wcb_coupon_box_design_image_column').addClass('wcb-hide-section');

    Also, to work around a second error:
    wp-content/plugins/woocommerce-coupon-box/js/customize-preview.js:7

    Conditionalize the case statements e.g. change:

    case 'wcb-falling-leaves':
      leafContainer = document.querySelector('.wcb-falling-leaves');
          leaves = new LeafScene(leafContainer);
      leaves.init();
      leaves.render();
      $('.wcb-leaf-scene div').attr('class', '').addClass('wcb-falling-leaves-leaves');
      break;

    To:

    case 'wcb-falling-leaves':
      leafContainer = document.querySelector('.wcb-falling-leaves');
      if (leafContainer) {
          leaves = new LeafScene(leafContainer);
          leaves.init();
          leaves.render();
          $('.wcb-leaf-scene div').attr('class', '').addClass('wcb-falling-leaves-leaves');
      }
      break;
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Coupon Box 2.0.4.2 breaks Flatsome 3.10.0 Header Builder (with fix)’ is closed to new replies.