On a WordPress site, We use Memberpress. It has the option to add coupons to use on checkout. We want to see if there is some possibility for the content editor to add custom text to the coupon admin page that will show up when the coupon is applied. So far each time when something like the custom text is necessary for any coupon to show up We did it with the use of JS/jQuery to check for the coupon name and to show up the custom text and that works but We want to give the option how I said to the content editor to add custom text to the admin page of the coupon that will show up then the coupon is applied on the checkout page.
We tried to use ACF and added the field let's say named= custom=text to the Coupons. So the content editor can add any custom text to the field on the coupon admin page.
We know how to display the field on the front end with the use of get_field or the_field but the problem is that We want to display it only when the coupon matches the coupon that has added custom text to the field We added to that coupon admin page.
If the coupon is named- PROMO and it has custom text added into the custom field We added to it with the use of ACF - promo custom text and then show up that text under the coupon field on the checkout page.
Yes, we can display the field and value probably in the same way as we did so far with the use of JS/jQuery but in the JS code, we use the name/title of the coupon or its ID so it will need each time when the coupon is changed to change the code in JS and it does not work for what We are trying to do.
Any ideas or help if it's possible to get what We want?