autoship_rest_generated_virtual_wc_coupons (filter)

( src/coupons.php) This filter can be used to adjust the virtual coupons generated from the (QPilot) fee lines on the WC REST Order creation request. It takes $new_coupons (virtual WC coupon created from QPilot coupon data in the request), $coupons ('_qpilot_coupon_data' meta value in the request) , and the $request as its parameters.


// Allow devs to hook in so that these could be converted to real coupons or modify on the fly
$new_coupons = apply_filters( 'autoship_rest_generated_virtual_wc_coupons', $new_coupons, $coupons, $request );

Found in the Functions