Merge pull request #24740 from woocommerce/feature/24654

Make WC_Abstract_Order::recalculate_coupons() public
This commit is contained in:
Vedanshu Jain 2019-10-02 15:56:36 +05:30 committed by GitHub
commit 9641963001
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -1070,10 +1070,11 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
/**
* Apply all coupons in this order again to all line items.
* This method is public since WooCommerce 3.8.0.
*
* @since 3.2.0
* @since 3.2.0
*/
protected function recalculate_coupons() {
public function recalculate_coupons() {
// Reset line item totals.
foreach ( $this->get_items() as $item ) {
$item->set_total( $item->get_subtotal() );