Woocommerce User Registration - undefined function wc_print_notices()

Until the recent update everything was working fine but now new customers cannot register for an account. Iin the site error logs I’m seeing “PHP Fatal error: Uncaught Error: Call to undefined function wc_print_notices()…”

I’ve searched online for a solution and can’t find anything that works. I’ve disabled all plugins but the most relevant ones and tested it but it still fails.

I can provide admin credentials to the site and/or hosting environment if necessary… please help!

Hello @MasonicDisorder,

Thanks for writing in! I have checked the latest theme files and there is no wc_print_notices() function in it. You may have added this custom function in your child theme’s function.php file or in a template modification found on your child theme. have you updated your WooCommerce to the latest version? Yes, we would like to check your site. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

Based on the full error message I’ve discovered that the undefined function is coming from the WooCommerce plugin User Registration for WooCommerce… I’ve submitted a support request with WPExperts but who knows how long that will take. I might just edit their plugin files. If I still can’t sort it out I’ll reach back out but thank you for the quick response and willingness to help.

Theme.co is the absolute best!

[24-Oct-2023 21:13:45 UTC] PHP Fatal error: Uncaught Error: Call to undefined function wc_print_notices() in /home/PATH/wp-content/plugins/user-registration-for-woocommerce/includes/public/class-wc-user-registration-front.php:429
Stack trace:
#0 /home/PATH/wp-includes/shortcodes.php(433): WC_USER_REGISTRATION_Front->wc_user_registration_page_shortcode_function(’’, ‘’, ‘wc-user-registr…’)
#1 [internal function]: do_shortcode_tag(Array)
#2 /home/PATH/wp-includes/shortcodes.php(273): preg_replace_callback(’/\[(\[?)(wc\-us…’, ‘do_shortcode_ta…’, ‘[wc-user-regist…’)
#3 /home/PATH/wp-includes/class-wp-hook.php(310): do_shortcode(’[wc-user-regist…’)
#4 /home/PATH/wp-includes/plugin.php(205): WP_Hook->apply_filters(’[wc-user-regist…’, Array)
#5 /home/PATH/wp-content/themes/pro/cornerstone/includes/functions/helpers.php(725): apply_filters(‘cs_expand_conte…’, ‘[wc-user-regist…’)
#6 / in /home/PATH/wp-content/plugins/user-registration-for-woocommerce/includes/public/class-wc-user-registration-front.php on line 429

Actually,… forget that! I’ve found the function in woocommerce/includes/wc-notice-functions.php where it is defined.

Perhaps there is some sort of initialization error that you might be able to help me track down? Sending secure message with all the details you’ll need to access the site.

Hey @MasonicDisorder,

[24-Oct-2023 21:13:45 UTC] PHP Fatal error: Uncaught Error: Call to undefined function wc_print_notices() in /home/PATH/wp-content/plugins/user-registration-for-woocommerce/includes/public/class-wc-user-registration-front.php:429

Please be advised that the User Registration for WooCommerce is a 3rd party plugin. It is not fully supported by the theme. It is best that the creators of the plugin will have to be contacted. They should be able to fix the issue or have an upcoming update with the hotfix for the issue.

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.