Re-calculate totals after setting cart item prices in Woocommerce
问题 How i can change subtotal price after i changed the price of product by the set_price() method? Now it is calculate the total cost at old prices in review-order.php. cart.php foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { ... $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); $product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key ); ... $_product->set