Posts

Showing posts with the label cart-product

How to update product variation in cart-review page in woocommerce , wordpress

Today i was searched for how to update cart product's  variation on cart-review page and checkout page, after searching a lot didnt get any best solution so i made this script for me.. you need to call your action after all cart page or checkout page request call , so i setted 99 as third parameter in add_action ; below is example code which i made for my client site add_action('init','update_cart_product_rj_funciton',99);  function update_cart_product_rj_funciton() {         global $wpdb,$woocommerce;         if(isset($_REQUEST['cart_update_variation']) && wp_verify_nonce($_REQUEST['cart_update_variation'],'cart_item_variation_update'))     {                 if($_REQUEST['product_id']!='' && $_REQUEST['cart_id']!='')         {             $cart_pro_key = '';             ...