WP Global Cart >
Change my downloads template if product link is invalid
Change my downloads template if product link is invalid
An order from a shop in the network become visible for customer through My Account -> Orders in all shops once the WooCommerce Multisite Global Cart plugin is activated. Some themes are not MultiSite capable, so downloadable Product link might be invalid:

The default template file used for this area is located within your theme at /woocommerce/order/order-downloads.php If the file dos not exists, it should be copied from WooCommerce plugin, from /templates/order/order-downloads.php
The order-downloads.php file contain the following:
...
switch ( $column_id ) {
case 'download-product' : ?>
<a href="<?php echo esc_url( get_permalink( $download['product_id'] ) ); ?>"><?php echo esc_html( $download['product_name'] ); ?></a>
<?php
break;
...
This need a bit of update to include the switch_to_blog() and restore_current_blog() so add the 2 new lines:
...
switch ( $column_id ) {
case 'download-product' : ?>
<a href="<?php
if(isset($download['blog_id']) && $download['blog_id'] > 0)
switch_to_blog( $download['blog_id'] );
echo esc_url( get_permalink( $download['product_id'] ) );
if(isset($download['blog_id']) && $download['blog_id'] > 0)
restore_current_blog();
?>"><?php echo esc_html( $download['product_name'] ); ?></a>
<?php
break;
...
Once code updated, the Product name should link to correct url, to shop where was native created.
Related Posts
Name: woogc/checkout/single/split/trigger_email
Type: Filter
Arguments: $status, $args
By default,...
The capability to Split...
Splitting Orders, is a...
The Synchronization procedure is...
When running multiple Shops, a WordPress MultiSite environment is the optimal way to go. That provides a lot of interconnectivity possibilities, at an astonishing speed.
Our WooCommerce Global Cart plugin implements key features to make everything a robust, fast render and flexible marketplace.
The WooCommerce Product Synchronisation is a new powerful functionality recently introduced. This is designed to help with product synchronisation between multiple Shops in the network.
This newly implemented functionality helps with displaying WooCommerce Products across shops, in the network, under your WordPress MultiSite environment. Promote specific products, types of merchandise, category of goods, so boosting overall network sales. The new function is available as a Woocommerce Product Shortcode and is easy to implement. Any section of a site can include the shortcode to output the required products. The woocommerce shortcode is usable within the default WordPress editor ( classic ) or any advanced layout composer like Elementor, Divi, Visual Builder etc.
WooCommerce Tax area provides...
Name: woogc/get_cart_from_session/validate_hash
Type: Filter
Arguments: $force_validation, $values
When reconstructing...
Incredibly flexible, the WooCommerce...
On the Synchronization screen...