Initializing WC manually doesn't respect Multisite switch_to_blog() function
-
switch_to_blog(2); WC(); restore_current_blog();
The WC() refers to the WC instance from the current blog and not the one I’ve switched to. If I manually instantiate new WC_Session_Handler() after switch_to_blog() it shows the correct session though.
I need this so I can synchronize carts between the different sites in a Multisite installation.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Initializing WC manually doesn't respect Multisite switch_to_blog() function’ is closed to new replies.