Created
October 5, 2017 09:59
-
-
Save danielbitzer/70a54ca40e4db57658daef1fac71b53e to your computer and use it in GitHub Desktop.
AutomateWoo - Change workflow generated coupon lengths (since v3.3.0)
This file contains hidden or 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 | |
add_filter( 'automatewoo/coupon_generator/key_length', 'my_filter_automatewoo_coupon_length', 10, 2 ); | |
/** | |
* @param int $length | |
* @param AutomateWoo\Coupon_Generator $generator | |
* @return int | |
*/ | |
function my_filter_automatewoo_coupon_length( $length, $generator ) { | |
// please note that this length excludes the length of the coupon prefix | |
return 8; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment