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:
Daniel Bitzer 2018-09-26 12:43:27 +09:30 committed by GitHub
parent 6e8f995426
commit 2b57f95552
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 );