Created
June 10, 2015 12:36
-
-
Save bizzthemes/c7d0ab380d8030aa5f5b to your computer and use it in GitHub Desktop.
Apply Discount without a Coupon Code for Car Hire
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag, only copy the code below to custom_functions.php file | |
add_filter( 'bizz_coupon_filter', 'custom_coupon_filter' ); | |
function custom_coupon_filter( $coupon_post ) { | |
$coupon_post['type'] = 'percentage'; // 'percentage', 'fixed_unit', 'fixed_block' | |
$coupon_post['amount'] = '10'; | |
$coupon_post['car'] = array( 'all' ); // accepts array of vehicle ID's or 'all' for all vehicles | |
$coupon_post['extra'] = array( 'all' ); // accepts array of extra ID's or 'all' for all extras | |
return $coupon_post; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment