- This topic has 3 replies, 2 voices, and was last updated 6 years, 2 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Stripe payment plugins for your WordPress site
· ·
Home › Forums › Stripe Payments Plugin › REAL Dynamic Stripe Button. Do_shortcode()
Hi! Nice to meet you! I will be quick.
The thing is that you can´t insert it or modify the shortcode (innerHTML) after DOM is showed. (Client has to select in the form from a table info). Because PHP is already finished.
So you have to call WordPress PHP function do_shortcode() from javascript but it doesn´t work. I have been reading all the documentation and editing php code of the plugin but nothing.
Do u have any clue?
I am not sure what this has to do with our Stripe plugin. Are you trying to use the WordPress’s do_shortcode() function from your custom JavaScript code?
Hi! Thanks for your reply!
Yeah, i try to do:
<script>
var phpstripe= <?php echo do_shortcode([accept stripe payment….]);?>
(i tried all posibilities with the code, putting commas everywhere, double commas, single….)
<script>
When i do that, mi var phpstripe is undefined and not with a HTML button inside. I tried to look in the register if do_shortcode() has registered the string [accept stripe payment…]
I tried to edit an actual stripe payment button but the problem is that if you change the properties, it still has the old value and i think it is because hash fuction
I don’t know if you can call the do_shortcode function from JavaScript. I know that function can be called from your PHP code (after everything has loaded). We unfortunately don’t support this type of usage for our shortcode. So we won’t be able to help with this.