Skip to content

Instantly share code, notes, and snippets.

@CameronGilroy
Created October 24, 2019 03:03
Show Gist options
  • Save CameronGilroy/8746dcb44adeafb2122cd46fbd8a9999 to your computer and use it in GitHub Desktop.
Save CameronGilroy/8746dcb44adeafb2122cd46fbd8a9999 to your computer and use it in GitHub Desktop.
//this sets the number of columns that are displayed when the Big Camp booking is done.
function wc_cp_summary_max_columns( $cols, $composite )
{
$cols = 5;
return $cols;
}
add_filter('woocommerce_composite_component_summary_max_columns', 'wc_cp_summary_max_columns', 10, 2);
//Skip the cart page if the product is Big Camp 2020
function Add_To_Cart_redirect()
{
$BigCamp2020 = 22164;
if (is_single($BigCamp2020)) {
$checkout_url = wc_get_checkout_url();
return $checkout_url;
}
}
add_filter('woocommerce_add_to_cart_redirect', 'Add_To_Cart_redirect', 10, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment