Make WC_Abstract_Order::recalculate_coupons() public

This commit is contained in:
Claudio Sanches 2019-10-01 17:19:33 -03:00
parent 80c4793c18
commit 8c88cd9b6f
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() );