- This topic has 6 replies, 2 voices, and was last updated 6 years, 6 months ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.
Stripe payment plugins for your WordPress site
· ·
Home › Forums › Stripe Payments Plugin › Error message when adding the shortcode
Tagged: error
Hi everyone,
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.
Hi,
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:
stripe-payments/public/includes/class-shortcode-asp.php
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?
Hello !
That’s perfect you’ve pointed the problem very well, thank you very much as it was pretty urgent 🙂