mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Merge pull request #3395 from woocommerce/PCP-4449-pay-pal-button-greyed-out-on-single-product-page-for-variable-products-with-2-attributes-with-the-old-ui
PayPal button greyed out on single product page for variable products with 2+ attributes with the old UI. (4449)
This commit is contained in:
commit
b5ea07bcf0
1 changed files with 10 additions and 6 deletions
|
@ -162,12 +162,16 @@ class SingleProductBootstrap {
|
|||
},
|
||||
]
|
||||
.map( ( f ) => f() )
|
||||
.sort((a, b) => {
|
||||
if (parseInt(a.replace(/\D/g, '')) < parseInt(b.replace(/\D/g, '')) ) {
|
||||
return 1;
|
||||
}
|
||||
return -1;
|
||||
})
|
||||
.filter( ( val ) => val !== null && val !== undefined )
|
||||
.sort( ( a, b ) => {
|
||||
if (
|
||||
parseInt( a.replace( /\D/g, '' ) ) <
|
||||
parseInt( b.replace( /\D/g, '' ) )
|
||||
) {
|
||||
return 1;
|
||||
}
|
||||
return -1;
|
||||
} )
|
||||
.find( ( val ) => val );
|
||||
|
||||
if ( typeof priceText === 'undefined' ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue