Product Icon

Wholesale For WooCommerce - B2B Ecommerce

Run your WooCommerce B2B store smarter with Wholesale for WooCommerce. It’s a powerful B2B WooCommerce plugin that manages wholesale pricing, roles & orders.

Fix PHP fatal error when editing page containing registration shortcode

If attempting to edit a page in WP 6.3.1 that contains the [wwp_registration_form] shortcode, a PHP fatal error is generated because wc_print_notices() code is called but the function is not defined at that point. I changed my copy of line 249 to be

to at least let me edit the page, but you might want to release a plugin update with a fully considered fix.

See stacktrace:

PHP Fatal error: Uncaught Error: Call to undefined function wc_print_notices() in /var/xxx/wp-content/plugins/woocommerce-wholesale-pricing/inc/class-wwp-wholesale-registration.php:249nStack trace:n#0 /var/xxx/wp-includes/shortcodes.php(395): Wwp_Wholesale_Pricing_Registration->wwp_registration_form()n#1 [internal function]: do_shortcode_tag()n#2 /var/wxxx/wp-includes/shortcodes.php(235): preg_replace_callback()n#3 /var/xxx/wp-includes/class-wp-hook.php(310): do_shortcode()n#4 /var/xxx/wp-includes/plugin.php(205): WP_Hook->apply_filters()n#5 /var/xxx/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(1864): apply_filters()n#6 /var/wxxx/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(569): WP_REST_Posts_Cont…’, referer: https://xxx/wp-admin/edit.php?post_type=page

Author

jcocula

Current Status

Completed

Last updated: September 9, 2023

1 comment

Log in to comment on this feature request.

  1. Saad Iqbal says:

    The issue has been fixed.
    Thanks.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.