• Resolved yeef

    (@yeef)


    With the latest update earlier today, 1.4.5, this plugin began throwing a php warning about an undefined constant: ADW_FILE on our site.

    Enclosing the string ADW_FILE in quotes on lines 98, 166, 236, 545 in includes/class-acoplw-badge.php seems to have fixed the issue for us, but I haven’t investigated the issue too deeply.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Bet Hannon

    (@bethannon1)

    We are seeing this too as an error that completely trashes the css of the site.

    Here’s the stack trace in case that’s helpful:

    Fatal error: Uncaught Error: Undefined constant “AWDP_FILE” in /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/wp-content/plugins/aco-product-labels-for-woocommerce/includes/class-acoplw-badge.php:236 Stack trace: #0 /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/wp-content/plugins/aco-product-labels-for-woocommerce/includes/class-acoplw-front-end.php(237): ACOPLW_Badge->acoplwBadgeDetail() #1 /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/wp-includes/class-wp-hook.php(308): ACOPLW_Front_End->acoplwBadgeDetail() #2 /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #3 /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #4 /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/wp-includes/general-template.php(3059): do_action() #5 /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/wp-content/themes/genesis/footer.php(56): wp_footer() #6 /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/wp-includes/template.php(783): require_once(‘/home/6XXXX4.cl…’) #7 /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/wp-includes/template.php(718): load_template() #8 /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/wp-includes/general-template.php(92): locate_template() #9 /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/wp-content/themes/genesis/lib/framework.php(103): get_footer() #10 /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/wp-content/themes/genesis/page.php(15): genesis() #11 /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/wp-includes/template-loader.php(106): include(‘/home/6XXXX4.cl…’) #12 /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/wp-blog-header.php(19): require_once(‘/home/6XXXX4.cl…’) #13 /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/index.php(17): require(‘/home/6XXXX4.cl…’) #14 {main} thrown in /home/6XXXX4.cloudwaysapps.com/yhvvvhyvda/public_html/wp-content/plugins/aco-product-labels-for-woocommerce/includes/class-acoplw-badge.php on line 236

    We have had to deactivate the plugin until its fixed.

    Error log.
    [10-Jan-2023 22:42:49 UTC] PHP Fatal error: Uncaught Error: Undefined constant “AWDP_FILE” in /home/xxxx/public_html/wp-content/plugins/aco-product-labels-for-woocommerce/includes/class-acoplw-badge.php:236

    Moderator Bet Hannon

    (@bethannon1)

    @nicko2u We used the WP Rollback plugin to revert to v1.4.3

    ijas

    (@ijasacodez)

    Extremely sorry for the inconvenience, we have released an update with the fix, please update your plugin to the latest version 1.4.6

    Thanks for reporting the same.

    ijas

    (@ijasacodez)

    @yeef @bethannon1 @nicko2u we have fixed the issue, please update the plugin to the latest version.

    1.4.5, we have added support for ‘Dynamic Pricing With Discount Rules for WooCommerce’ plugin (option to set badges to discounted products), unfortunately, we have missed the defined check for the ‘Dynamic Pricing’ constant. We have fixed the issue on our latest release 1.4.6, thanks for reporting the bug.

    Moderator Bet Hannon

    (@bethannon1)

    The update to 1.4.6 worked for us. Thanks for the quick fix!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘1.4.5 – New PHP undefined constant warning’ is closed to new replies.