mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
Improved detection if a price given on the page specially when multiple in dom
This commit is contained in:
parent
1c608ac0c2
commit
95aefb9922
1 changed files with 6 additions and 0 deletions
|
@ -162,6 +162,12 @@ class SingleProductBootstap {
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
.map( ( f ) => f() )
|
.map( ( f ) => f() )
|
||||||
|
.sort((a, b) => {
|
||||||
|
if (parseInt(a.replace(/\D/g, '')) < parseInt(b.replace(/\D/g, '')) ) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
})
|
||||||
.find( ( val ) => val );
|
.find( ( val ) => val );
|
||||||
|
|
||||||
if ( typeof priceText === 'undefined' ) {
|
if ( typeof priceText === 'undefined' ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue