mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix card fields rendered multiple times
This commit is contained in:
parent
6fbdb9417b
commit
6f7270c35b
5 changed files with 41 additions and 30 deletions
|
@ -1,6 +1,13 @@
|
|||
import { cardFieldStyles } from './CardFieldsHelper';
|
||||
|
||||
let fieldsRendered = false;
|
||||
|
||||
export function renderFields( cardFields ) {
|
||||
if ( fieldsRendered === true ) {
|
||||
return;
|
||||
}
|
||||
fieldsRendered = true;
|
||||
|
||||
const nameField = document.getElementById(
|
||||
'ppcp-credit-card-gateway-card-name'
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue