Change workflow-generated coupon length

The returned number controls the random portion of newly generated AutomateWoo coupon codes. It does not include the configured prefix.

Developer note:

Add custom PHP in a small custom plugin or child theme, and test it on a staging site before production. This example requires ongoing maintenance when extension APIs change.

functions.php

<?php

add_filter( 'automatewoo/coupon_generator/key_length', 'my_store_automatewoo_coupon_key_length' );

/**
 * Set the generated coupon key length.
 *
 * @return int
 */
function my_store_automatewoo_coupon_key_length() {
	return 8;
}
Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.