#kwac.

1 messages ยท Page 1 of 1 (latest)

grim forgeBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

ripe cipher
#

hi there!

#

do you see any error in the browser console?

random sinew
#

[Stripe.js] This Element will be mounted to a DOM element that contains child nodes.
warn @ controller-cc848a9adec3d6a1f42497a003323d67.js:1
(anonymous) @ controller-cc848a9adec3d6a1f42497a003323d67.js:1
controller-cc848a9adec3d6a1f42497a003323d67.js:1 [Stripe.js] The following payment method types are not activated:

  • link

They will be displayed in test mode, but hidden in live mode. Please activate the payment method types in your dashboard (https://dashboard.stripe.com/settings/payment_methods) and ensure your account is enabled for any preview features that you are trying to use.

ripe cipher
#

do you have a link where I can reproduce the issue?

random sinew
#

website link?

ripe cipher
#

yes, so I see the issue myself

ripe cipher
#

and can you explain what I should do exactly to reproduce the issue?

random sinew
#

by visiting checkout page, the input fields suddenly appear but disappear

#

it happens when page is loading/loaded

ripe cipher
#

got it, looking into this

#

so this is your code:

const options = {
  mode: 'payment',
  amount: 1099,
  currency: 'usd',
  appearance: {/*...*/},
};
                    
const elements = stripe.elements(options);

const paymentElement = elements.create('payment');
paymentElement.mount('.wc-payment-form');

and you do have an HTML element with the wc-payment-form that looks empty.

#

all of this looks correct. still looking...

random sinew
#

Maybe it's related with PHP code, I could provide it

ripe cipher
#

no it should be unrelated to PHP. this is a frontend issue.

random sinew
#

ah alright

ripe cipher
#

that code itself looks correct. I'm guessing you have another code somewhere that's interferring with this, maybe replacing the content of the .wc-payment-form element.

random sinew
ripe cipher
#

can you create an new empty div somewhere with class="test_stripe", and try to mount the Payment Element there.

random sinew
#

just a moment

#

done

grim forgeBOT
random sinew
#

i assigned it to different area and now it doens't disappear interesting...

ripe cipher
#

so you need to check your own code (or woocomerce code?) to find what's interefering with your new code.

#

but more generally, why are you implementing the Payment Element yourself isntead of using Woocommerce functionalities?

random sinew
#

you mean woocommerce stripe plugin?

ripe cipher
#

yes

random sinew
#

it's for learning experience

dull lynx
#

Hey there ๐Ÿ‘‹ jumping in as my teammate needs to step away soon. When I've seen that behavior before, of the Payment Element beginning to load then emptying, it was because the amount/currency being provided to it, and possibly other options if you're setting those, are restricting the payment method types that it can show down to a list of 0 options.

#

But if it's on the same page as another integration, it's very possible they aren't playing nice together.