mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
Check shipping name if billing does not exist
This commit is contained in:
parent
31f2e65bff
commit
19b5c2e437
1 changed files with 6 additions and 2 deletions
|
@ -199,8 +199,12 @@ class CreditCardRenderer {
|
|||
hostedFieldsData.cardholderName = this.defaultConfig.payer.given_name + ' ' + this.defaultConfig.payer.surname;
|
||||
}
|
||||
if (!hostedFieldsData.cardholderName) {
|
||||
const firstName = document.getElementById('billing_first_name') ? document.getElementById('billing_first_name').value : '';
|
||||
const last = document.getElementById('billing_last_name') ? document.getElementById('billing_last_name').value : '';
|
||||
const firstName = document.getElementById('billing_first_name') ? document.getElementById('billing_first_name').value
|
||||
: document.getElementById('shipping_first_name') ? document.getElementById('shipping_first_name').value
|
||||
: '';
|
||||
const lastName = document.getElementById('billing_last_name') ? document.getElementById('billing_last_name').value
|
||||
: document.getElementById('shipping_last_name') ? document.getElementById('shipping_last_name').value
|
||||
: '';
|
||||
|
||||
if (!firstName || !lastName) {
|
||||
this.spinner.unblock();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue