2017-06-10 85 views

回答

0
add_filter('woocommerce_add_cart_item_data', 'woo_custom_add_to_cart'); 

function woo_custom_add_to_cart($cart_item_data) { 

    global $woocommerce; 
    $woocommerce->cart->empty_cart(); 

    // Do nothing with the data and return 
    return $cart_item_data; 
} 
相關問題