WooCommerce’s persistent cart feature is designed to save cart contents for logged-in users, enabling them to pick up where they left off. However, when using the WooCommerce Global Cart plugin, this functionality may not always be desirable. Specifically, persistent cart behavior can cause the user’s saved cart to merge with their existing global cart upon login.
If your store relies on WooCommerce Global Cart to synchronize carts across multiple sites or sessions, disabling the persistent cart ensures a cleaner, more...
View More
When utilizing the Single Checkout option, all products within the global cart undergo processing within a designated shop. Conversely, when opting for the Split function, individual orders are generated within each of the shops that contributed products to the cart.
Upon the completion of the checkout process, a page titled 'Order Received' is presented to the customer.
To seamlessly redirect the customer to the 'Order Received' page hosted on the shop where the origin product was located, you can make use...
View More
Looping through the Cart Items is straightforward and achievable through the code:
When the cart includes products from different shops ( within the MultiSite Network ), the same code can be used. Still, a...
View More
Each of the Network Shops run their own cart page. This can be changed so the cart link redirects the user to a specific Shop Cart in the network, which is usually the Check-out Shop, when using Single Site Check-out type.
The feature can be achieved through a custom code. The WOOGC_REQUIRED_CART_URL value should be updated with the required shop cart URL:
<?php
define('WOOGC_REQUIRED_CART_URL', ...
View More
Name: woogc/disable_global_cart
Type: Filter
Arguments: $is_disabled
The filter is being used to disable the Global Cart functionality. The Global Cart works as a unique cart for all shops in the MultiSite Network, a product pushed to the cart will be show on all other shops too.
add_filter( 'woogc/disable_global_cart', 'WooGC_Disable_GlobalCart', 10, 2 );
function WooGC_Disable_GlobalCart ( $status, $_blog_id = '' )
{
...
View More
Name: woogc/get_checkout_url
Type: Filter
Arguments: $checkout_url
The filter is being used to change the $checkout_url for specific shops. As default this is being controlled through admin settings but can be adjusted to particular shops if need.
The following code change the checkout url to shop default when blog_id is 4:
add_filter( 'woogc/get_checkout_url', 'WooGC_get_checkout_url');
function WooGC_get_checkout_url ( $checkout_url )
{
...
View More
Using the WooCommerce Global Cart all shops in the network can share the same cart, products from different sites can be added and checked-out in a single process. To make cart content more descriptive and clearer to the customers, a shop name can be append to each product title, to indicate the location where the product come from. Also, other necessary information can append, if apply.
The following bit of code appends the origin Shop name, to each product title...
View More