• Resolved eriktdesign

    (@eriktdesign)


    The cart page on one of my client’s sites is laid out using CSS grid. We noticed that when notices from this plugin were being output on the cart page, they were breaking the layout and appearing stacked on top of one another.

    I found that this is because the notices are not being output into the correct container. In v1/loader.php in the FlycartWooDiscountRules::displayAppliedDiscountMessagesForCartRules() and FlycartWooDiscountRules::displayAppliedDiscountMessagesForPriceRules() functions , the notices are being output directly with wc_print_notice. Since these are hooked to woocommerce_before_cart, they output above the cart, but they do not output inside of the .woocommerce-notices-wrapper as they should.

    Changing these functions to use wc_add_notice instead will make sure they output in the correct wrapper. I’ve tested this on a client’s site and just making this change fixes the issue and doesn’t appear to cause any other problems. Please consider fixing this in the next release of your plugin.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Notices output outside of notices wrapper’ is closed to new replies.