mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +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() )
|
.map( ( f ) => f() )
|
||||||
.sort((a, b) => {
|
.filter( ( val ) => val !== null && val !== undefined )
|
||||||
if (parseInt(a.replace(/\D/g, '')) < parseInt(b.replace(/\D/g, '')) ) {
|
.sort( ( a, b ) => {
|
||||||
return 1;
|
if (
|
||||||
}
|
parseInt( a.replace( /\D/g, '' ) ) <
|
||||||
return -1;
|
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