Fix Pay Later button admin preview

This commit is contained in:
Narek Zakarian 2022-11-09 17:58:25 +04:00
parent 4d0adae73b
commit ac420a6d7e
2 changed files with 2 additions and 2 deletions

View file

@ -962,7 +962,7 @@ class SmartButton implements SmartButtonInterface {
} }
$enable_funding = array( 'venmo' ); $enable_funding = array( 'venmo' );
if ( $this->settings_status->is_pay_later_messaging_enabled() || ! in_array( 'credit', $disable_funding, true ) ) { if ( $this->settings_status->is_pay_later_messaging_enabled_for_location( $this->context() ) || ! in_array( 'credit', $disable_funding, true ) ) {
$enable_funding[] = 'paylater'; $enable_funding[] = 'paylater';
} }

View file

@ -68,7 +68,7 @@ import MessageRenderer from "../../../ppcp-button/resources/js/modules/Renderer/
'currency': PayPalCommerceGatewaySettings.currency, 'currency': PayPalCommerceGatewaySettings.currency,
'integration-date': PayPalCommerceGatewaySettings.integration_date, 'integration-date': PayPalCommerceGatewaySettings.integration_date,
'components': ['buttons', 'funding-eligibility', 'messages'], 'components': ['buttons', 'funding-eligibility', 'messages'],
'enable-funding': ['venmo'], 'enable-funding': ['venmo', 'paylater'],
'buyer-country': PayPalCommerceGatewaySettings.country, 'buyer-country': PayPalCommerceGatewaySettings.country,
}; };
if (disabledSources?.length) { if (disabledSources?.length) {