So sorry, actually my code’s bad.problem solved.
I tested it. no, there is something wrong with this theme. I am trying to find it.
I met the same problem ,and when i changed the theme to storefront, the problem gone.
still working on my theme(colormag). do not know why.
plugin:
woocommerce stripe