Support

Home Forums Event Espresso Premium Promo Codes Defaulting to 'On'

Promo Codes Defaulting to 'On'

Posted: January 2, 2014 at 12:40 pm

Viewing 4 reply threads


Jennifer Doyon

January 2, 2014 at 12:40 pm

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.

How can I stop this from happening?

Thank you –
Jennifer


Josh

  • Support Staff

January 2, 2014 at 1:39 pm

Hi Jennifer,

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';
}


Jennifer Doyon

January 2, 2014 at 1:45 pm

Hi, Josh –

When I added this to custom_functions.php in my uploads folder, it broke my site.

Jennifer


Josh

  • Support Staff

January 2, 2014 at 2:17 pm

Hi Jennifer,

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?


Jennifer Doyon

January 2, 2014 at 9:47 pm

All good for now, Josh.

Thanks!

Jennifer

Viewing 4 reply threads

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.

Event Espresso