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


June 2, 2021 at 6:35 pm


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/ on line 328

Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/ in /home/customer/www/ on line 1329

Any ideas on what might be wrong?


  • 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 ( 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.

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso