con
(@conschneider)
Engineer
Hi there,
And then it asks admins to choose a theme that’s located on wordpress.ord so that installation is not possible also. Any solutions?
There is a filter you can use to toggle the wizard. I believe add_filter( 'woocommerce_enable_setup_wizard', '__return_false'; } should disable the wizard all together.
Kind regards,
Thread Starter
mborin
(@mborin)
What would a snippet look like so that I can add it to functions
To add Con’s snippet, I’d recommend using the Code Snippets plugin.
Using that, you can drop in snippets directly, without having to edit any files.
Thread Starter
mborin
(@mborin)
I don’t like using that plugin because if there’s an error it locks up the entire site and then I have to dig through DB to find the snippet and delete it. Too much headache. I prefer to make a must use plugin. I tried but can’t seem to make the simple snippet to insert this filter. Can you show me an example?
Thread Starter
mborin
(@mborin)
I implemented your suggestion but the wizard is still enabled when I test it.
con
(@conschneider)
Engineer
Hi there,
Thanks for trying. Let’s try another way and pass the variable: add_filter( 'woocommerce_enable_setup_wizard', function( $true ) { return false; }
Does that change anything?
Kind regards,
Thread Starter
mborin
(@mborin)
No, that gives me a php error. Here is the code I am using now but it has no effect:
add_filter( 'woocommerce_enable_setup_wizard', 'disable_wizard' );
function disable_wizard(){
return false;
}
con
(@conschneider)
Engineer
Hi again,
No, that gives me a php error.
😏 My bad, did not test the closure.
Found another filter. Can you try add_filter( 'woocommerce_prevent_automatic_wizard_redirect', '__return_true' );
Kind regards,
Thread Starter
mborin
(@mborin)
Nope, that does not work either. Wizard still there.
con
(@conschneider)
Engineer
Nope, that does not work either. Wizard still there.
That was my last functional approach for now.
How about redirecting the wizard URL /wp-admin/?page=wc-setup >> wp-admin?
Thread Starter
mborin
(@mborin)
The url /wp-admin/?page=wc-setup does not exist. The issue is that I am not able to go to /wp-admin/admin.php?page=wc-admin without the wizard firing up every time. There must be a way to disable this wizard.
con
(@conschneider)
Engineer
The url /wp-admin/?page=wc-setup does not exist. The issue is that I am not able to go to /wp-admin/admin.php?page=wc-admin without the wizard firing up every time. There must be a way to disable this wizard.
You have a point but I think a redirect should still work.
Anyways that is all I have.
Anybody else got an idea :)?
Thread Starter
mborin
(@mborin)
Support from Automatic did not offer any detailed help but did state that woocommerce_enable_setup_wizard is the way to go. Unfortunately everything I try does not work.
con
(@conschneider)
Engineer
Hi again,
My wizard is disabled using woocommerce_enable_setup_wizard.
Here is a screencast: https://recordit.co/tb5wrS3hkV
Kind regards,
Thread Starter
mborin
(@mborin)
OK I can see it working on your end. I’ve been testing on an existing test user without any luck. I will try it on a new user.