You are here: / / Error message when adding the shortcode
When I add the shortcode after all the settings fit me, there is this message on top of the page :
Warning: A non-numeric value encountered in /app/public/wp-content/plugins/stripe-payments/public/includes/class-shortcode-asp.php on line 349
On test mode, I can still make a donation but I don’t know why the message is showing … Can you help me ?
Thank you ! 🙂
That usually happens if a price or quantity amount is using an incorrect value somewhere. What is the exact shortcode that you are using?
Hi 🙂 Thank you for your answer.
The shortcode I’m using is : [asp_product id=”560″]
For the amount to order, I didn’t write anything so it is the default value 1. For the price, it is the same because it is for donation, I want people to donate the amount they want. What do you think ?
The shortcode looks fine. Can you please share a link to the page where you have the Stripe donation button? That way I can take inspect the values on the site.
Here is the link to the page : 45e5087b.ngrok.io/page-test-a-supprimer/
(I’m in local so it’s not very fast yet)
Don’t pay attention to the form, the sortcode is right below 🙂 Thank you for the help
Can you please do a little test for me (since this is your test site).
Open the following file of the plugin:
Go to line number 349. The following line:
$item_price = $price * 100;
Change it to the following and save the file:
$item_price = floatval($price) * 100;
Does it make a difference after that?
That’s perfect you’ve pointed the problem very well, thank you very much as it was pretty urgent 🙂
You must be logged in to reply to this topic.