woogc/get_checkout_url
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 )
{
global $blog_id;
if( $blog_id == 4 )
{
$_checkout_url = wc_get_page_permalink( 'checkout' );
if ( $_checkout_url )
{
// Force SSL if needed
if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) )
{
$checkout_url = str_replace( 'http:', 'https:', $checkout_url );
}
}
}
return $checkout_url;
}
The code should be placed inside a php file on wp-content/mu-plugins folder or theme functions.php.
Related Posts
Name: woogc/single_checkout/split_order/order_created
Type:Â Action
Arguments:Â $new_order
The `woogc/single_checkout/split_order/order_created` action...
The WordPress WooCommerce Global...
By default, on Product...
Name: woogc/ps/synchronize_product/child_product
Type:Â Filter
Arguments:
(object)$child_product
(array)$main_product_data
(int)$origin_product_blog_ID
This filter...
The WooCommerce Global Cart...
The Global Cart feature...
In the ever-evolving landscape of e-commerce, where seamless customer experiences are the cornerstone of success, WooCommerce Global Cart is now supporting the new WooCommerce Cart Blocks and Checkout Blocks, as powerful allies for merchants seeking to elevate their checkout processes. This groundbreaking integration seamlessly blends the benefits of Global Cart with the enhanced functionality of the new blocks, propelling businesses towards a paradigm shift in their online shopping journeys. Starting WooCommerce version 8.3 the Cart Blocks and Checkout Blocks are now the default checkout flow for new installations.
Name: woogc/ps/interfaces/sync_to_shop
Type:Â Filter
Arguments:Â $status, $remote_blog_id, $post
The...
Name: woogc/ps/synchronize_product/completed
Type:Â Filter
Arguments: $child_product_ID, $main_product_ID,...