fatal-errors
-
Hello,
we use the following code snippet:
#-- Remove Become a Vendor Button https://ww.wp.xz.cn/support/topic/code-snippet-remove-the-become-a-vendor-on-my-account-page/ --# function remove_become_a_vendor_button() { remove_action( 'woocommerce_after_my_account', [ dokan()->frontend_manager->become_a_vendor, 'render_become_a_vendor_section' ] ); } add_action( 'init', 'remove_become_a_vendor_button' );To the latest version, we encounter the fatal-errors: 2024-06-04T07:49:46+00:00 Critical Uncaught Error: Call to undefined function dokan() in /var/www/mysite.com/htdocs/wp-content/plugins/code-snippets/php/snippet-ops.php(582) : eval()'d code:3 Additional context { "error": { "type": 1, "file": "\/var\/www\/mysite.com\/htdocs\/wp-content\/plugins\/code-snippets\/php\/snippet-ops.php(582) : eval()'d code", "line": 3 }, "backtrace": [ "", "#0 \/var\/www\/mysite.com\/htdocs\/wp-includes\/class-wp-hook.php(324): remove_become_a_vendor_button()", "#1 \/var\/www\/mysite.com\/htdocs\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters()", "#2 \/var\/www\/mysite.com\/htdocs\/wp-includes\/plugin.php(517): WP_Hook->do_action()", "#3 \/var\/www\/mysite.com\/htdocs\/wp-settings.php(695): do_action()", "#4 \/var\/www\/mysite.com\/wp-config.php(154): require_once('...')", "#5 \/var\/www\/mysite.com\/htdocs\/wp-load.php(55): require_once('...')", "#6 \/var\/www\/mysite.com\/htdocs\/wp-admin\/admin-ajax.php(22): require_once('...')", "#7 {main}", "thrown" ] }This error will cause the backend page un accessible:
https://prnt.sc/YNz30531_WvzCould you please have a check?
Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘fatal-errors’ is closed to new replies.