add_filter( 'woocommerce_add_to_cart_redirect', 'woo_redirect_checkout' );
function woo_redirect_checkout() {
global $woocommerce;
$desire_product = '3038'; /* <-- this product id */
//Get product ID
$product_id = (int) apply_filters( 'woocommerce_add_to_cart_product_id', $_POST['add-to-cart'] );
//Check if current product is subscription
if ( $product_id == $desire_product ){
$checkout_url = $woocommerce->cart->get_checkout_url();
return $checkout_url;
exit;
} else {
$cart_url = $woocommerce->cart->get_cart_url();
return $cart_url;
exit;
}
}
All muhaza's note in developing website. Front-end & uiux method. Real life implementation for webdesigner.
SEO: Trik Terbaik
Lebih 30 Trik Carian Google untuk SEO GraphicLab Gunakan kombinasi carian ini untuk: Mengesan sebutan jenama Mencari peluang backli...
-
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 < div style = "background-color:#D94A38;width:170px;height:80px;ma...
-
/* for Big PC & Display */ @media only screen and ( min-width : 1900px ) { .tps-section { height : 1080px ; ...