Support

Home Forums Event Espresso Premium Optional Donation using Pricing Radio Buttons not working

Optional Donation using Pricing Radio Buttons not working

Posted: June 2, 2021 at 6:35 pm


Mike

June 2, 2021 at 6:35 pm

Hello,

On our registration page located here here, when selecting a donation amount, it is not being added to the total before checkout. This has always worked in years past. Moreover, when trying to edit this particular field in the registration form, we are now getting the error:

Warning: count(): Parameter must be an array or an object that implements Countable in /home/customer/www/website.com/public_html/wp-content/plugins/eea-pricing/EE_Pricing.class.php on line 328

Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/website.com/public_html/wp-content/plugins/eea-pricing/EE_Pricing.class.php:328) in /home/customer/www/website.com/public_html/wp-includes/pluggable.php on line 1329

Any ideas on what might be wrong?


Tony

  • Support Staff

June 3, 2021 at 1:48 pm

Hi there,

The error you’ve posted is from a 3rd Party add-on called the Price Modifier Add-on (see HERE) and it likely needs to be updated.

I’m guessing your server is now running a newer version of PHP (PHP7+) and the code used in that plugin needs to be updated for it.

As this isn’t one of our (EventEspresso.com) add-ons it’s not something we provide support for, so we would generally recommend you first confirm you are running the latest version and if so contact the author for them to investigate.

I can give you a fix for the above error but you’ll likely need more to fix the checkout and again as it’s not one of our add-ons I can’t work through all of the code to fix this.

In \eea-pricing\EE_Pricing.class.php, around line 314 you’ll have this:

$prices= json_decode(stripslashes($_POST['pricing_opts']));

Change that to be:

$prices = json_decode(stripslashes($_POST['pricing_opts']), true);

That should fix the above error. Update the question again and see if it works on the checkout page.

The support post ‘Optional Donation using Pricing Radio Buttons not working’ 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