Created
October 24, 2019 03:03
-
-
Save CameronGilroy/8746dcb44adeafb2122cd46fbd8a9999 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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