Fatal Error
-
The plugin is causing a recurring fatal error:
PHP Fatal error: Uncaught Error: Call to undefined function wc_print_notices() in /srv/htdocs/wp-content/plugins/woocommerce-simple-registration/templates/registration-form.php:15 Stack trace: #0 /srv/htdocs/wp-content/plugins/woocommerce/includes/wc-core-functions.php(346): include() #1 /srv/htdocs/wp-content/plugins/woocommerce-simple-registration/woocommerce-simple-registration.php(175): wc_get_template('registration-fo...', Array, 'woocommerce-sim...', '/srv/htdocs/wp-...') #2 /wordpress/core/6.9/wp-includes/shortcodes.php(434): WooCommerce_Simple_Registration->registration_template(Array, '', 'woocommerce_sim...') #3 [internal function]: do_shortcode_tag(Array) #4 /wordpress/core/6.9/wp-includes/shortcodes.php(273): preg_replace_callback('/\\[(\\[?)(woocom...', 'do_shortcode_ta...', '[woocommerce_si...') #5 /wordpress/core/6.9/wp-includes/class-wp-hook.php(341): do_shortcode('[woocommerce_si...') #6 /wordpress/core/6.9/wp-includes/plugin.php(205): WP_Hook->apply_filters('[woocommerce_si...', Array) #7 /srv/htdocs/wp-content/plugins/wordpress-seo/src/builders/indexable-link-builder.php(137): apply_filters('the_content', '[woocommerce_si...') #8 /srv/htdocs/wp-content/plugins/wordpress-seo/src/actions/indexing/abstract-link-indexing-action.php(76): Yoast\WP\SEO\Builders\Indexable_Link_Builder->build(Object(Yoast\WP\SEO\Models\Indexable), '[woocommerce_si...') #9 /srv/htdocs/wp-content/plugins/wordpress-seo/src/integrations/admin/background-indexing-integration.php(163): Yoast\WP\SEO\Actions\Indexing\Abstract_Link_Indexing_Action->index() #10 /wordpress/core/6.9/wp-includes/class-wp-hook.php(341): Yoast\WP\SEO\Integrations\Admin\Background_Indexing_Integration->index() #11 /wordpress/core/6.9/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters('', Array) #12 /wordpress/core/6.9/wp-includes/plugin.php(570): WP_Hook->do_action(Array) #13 /wordpress/core/6.9/wp-cron.php(191): do_action_ref_array('wpseo_indexable...', Array) #14 {main} thrown in /srv/htdocs/wp-content/plugins/woocommerce-simple-registration/templates/registration-form.php on line 15I believe it’s happening when Yoast attempts background indexing.
The page being indexed tries to render the shortcode , but WooCommerce isn’t loaded at this point, hence the function doesn’t exist. Probably best to wrap the
wc_print_notices()call on Line 15 oftemplates/registration-form.phpin afunction_exists()conditional before trying to call it.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
You must be logged in to reply to this topic.