Looping through the Cart Items is straightforward and achievable through the code:
When the cart include products from different shops ( within the MultiSite Netowrk ), the same code can be used. Still, a...
As default, when using Single Shop Check-out type, WooCommerce calculates the shipping costs globally for all products in the cart, independently of the origin of the item, to what shop it belongs in the network. The used shipping rules and rates are the one's set up on the shop being used for the check-out process. This is enough for most shop administrators, if providing a single package with all customer items.
The new functionality controlled through the Calculate Shipping...
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:
When using Single Site Check-out type, the Global Cart is being processed at a specified shop in the network or one at the customer preference. All Products will be included in a single order created on the site where the check-out occurs.
On shop Networks, where the owner chose to use Shop Managers to allow individual sites to be run by individual users, when a new Order is created on the Check-out Shop, a notification e-mail might be required to...
Arguments: $mysql_query, $blog_id
The filter can be used to modify the MySQL query used by the Network Orders interface to output the orders from all shops.
The following code example shows only the orders for shop_manager roles, from shops where the user have access :
add_filter ( 'woogc/network_orders/get_orders/mysql_query/WHERE', '_custom_network_orders_mysql_query_WHERE_2', 10, 2 );
function _custom_network_orders_mysql_query_WHERE_2 ( $mysql_query, $blog_id )
The filter can be used to show the Network Orders interface to other shops in the MultiSite environment.
The following code example, show the interface for shops ID's 2 and 3:
function WooGC_show_network_orders( $status )
Arguments: $post, $column_name
The filter can be used to render data for a custom created column on SuperAdmin Orders interface.
The following example render html for column called Products
add_action('wogc/admin/manage_shop_order_column_data', 'custom_wogc_admin_manage_shop_order_column_data', 10, 2);
function custom_wogc_admin_manage_shop_order_column_data( $post, $column_name )
if ( $column_name != 'products')
The filter can be used to add new column on SuperAdmin Orders interface. To render code for a custom column see wogc/admin/manage_shop_order_column_data
The following example add a new column called Products
function custom_wogc_admin_manage_shop_order_columns( $columns )
Under WordPress MultiSite environment, WooCommerce can run on any sites. In a sense, that means the WooCommerce is apparently MultiSite capable and compatible. In practice, there's no real MultiSite capability as no data is interconnected from a shop to another, every instance is self running, with no possibility to interact with the other sites in the network.
WordPress WooGlobalCart brings in a new level of data operability, mainly consisting on a single cart which can be used across all shops....