mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Use subscription_helper for manualRenewalEnabled
This commit is contained in:
parent
ad07c05cb7
commit
ccbb2995a4
1 changed files with 1 additions and 10 deletions
|
@ -1322,7 +1322,7 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages
|
||||||
'needShipping' => $this->need_shipping(),
|
'needShipping' => $this->need_shipping(),
|
||||||
'vaultingEnabled' => $this->settings->has( 'vault_enabled' ) && $this->settings->get( 'vault_enabled' ),
|
'vaultingEnabled' => $this->settings->has( 'vault_enabled' ) && $this->settings->get( 'vault_enabled' ),
|
||||||
'productType' => null,
|
'productType' => null,
|
||||||
'manualRenewalEnabled' => false,
|
'manualRenewalEnabled' => $this->subscription_helper->accept_manual_renewals(),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( is_product() ) {
|
if ( is_product() ) {
|
||||||
|
@ -1332,15 +1332,6 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( class_exists( '\WCS_Manual_Renewal_Manager' ) ) {
|
|
||||||
/**
|
|
||||||
* We verify the existence of the class prior to invoking a static method.
|
|
||||||
*
|
|
||||||
* @psalm-suppress UndefinedClass
|
|
||||||
*/
|
|
||||||
$localize['manualRenewalEnabled'] = \WCS_Manual_Renewal_Manager::is_manual_renewal_enabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( 'pay-now' === $this->context() ) {
|
if ( 'pay-now' === $this->context() ) {
|
||||||
$localize['pay_now'] = $this->pay_now_script_data();
|
$localize['pay_now'] = $this->pay_now_script_data();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue