Add coupon object param to get coupon data filter
This makes it easier to manage virtual coupon objects created through the woocommerce_get_shop_coupon_data filter
This commit is contained in:
parent
6e8f995426
commit
2b57f95552
|
@ -91,7 +91,7 @@ class WC_Coupon extends WC_Legacy_Coupon {
|
|||
}
|
||||
|
||||
// This filter allows custom coupon objects to be created on the fly.
|
||||
$coupon = apply_filters( 'woocommerce_get_shop_coupon_data', false, $data );
|
||||
$coupon = apply_filters( 'woocommerce_get_shop_coupon_data', false, $data, $this );
|
||||
|
||||
if ( $coupon ) {
|
||||
$this->read_manual_coupon( $data, $coupon );
|
||||
|
|
Loading…
Reference in New Issue