For some reason, all new events are applying ‘Global Promo Codes Only,’ even though I do not use promo codes at all. This creates a promo code field on all new events.
There’s a filter that can be used to change the default promo code setting so you don’t have to change the promo code setting when you create new events. Here’s something you can add to your custom file add-on’s custom_functions.php file or in a custom snippet plugin:
add_filter( 'FHEE_default_use_coupon_code_value', 'pchth_promo_codes' );
function pchth_promo_codes() {
return 'N';
}
Was an error message thrown? It may help to turn on error logging.
It may be something like there isn’t an opening PHP tag. The code should also include an opening php tag if there isn’t already on at the beginning of your php file. Is there an opening <?php tag?
The support post ‘Promo Codes Defaulting to 'On'’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.