Get Price x Quantity on Review Order Woocommerce

Each template may have a different way of displaying the price, in this context by default the price on the order review page only displays the price without clicking on the quantity, so here I tried to replace it with a filter, by overriding filter add_filter( 'woocommerce_cart_item_price', 'custom_cart_total_item', 10, 3 );


function custom_cart_total_item($product, $cart_item, $cart_item_key)
{
    $product = $cart_item['data'];
    $quantity = $cart_item['quantity'];
    $original_subtotal = $product->get_price() * $quantity;    
    return wc_price($original_subtotal);
}
add_filter( 'woocommerce_cart_item_price', 'custom_cart_total_item', 10, 3 );

0 Response to "Get Price x Quantity on Review Order Woocommerce"

Post a Comment

Komentar yang Anda kirim akan terlebih dahulu di moderasi oleh Admin