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.
debug VISUAL STUDIO CODE Error Fetch Extensions
Press Windows + S , search for "Environment Variables" , and select: 👉 "Edit the system environment variables" Click...
-
component need at least this 3 component file 1. customers.component.ts import { Component , OnInit } from '@angular/core...
-
//editable cookies enable $( function (){ var liveEdit = document .getElementById( 'live-edit' ); $(liveEdit).blur( f...