Remove subscriptions feature flag

This commit is contained in:
emilicastells 2022-11-22 12:36:47 +01:00
parent e5cced2008
commit 28031d927b
No known key found for this signature in database
GPG key ID: 1520C07081754570
6 changed files with 3 additions and 24 deletions

View file

@ -103,7 +103,6 @@ class IdentityToken {
);
if (
( $this->settings->has( 'vault_enabled' ) && $this->settings->get( 'vault_enabled' ) )
&& defined( 'PPCP_FLAG_SUBSCRIPTION' ) && PPCP_FLAG_SUBSCRIPTION
) {
$customer_id = $this->customer_repository->customer_id_for_user( ( $user_id ) );
update_user_meta( $user_id, 'ppcp_customer_id', $customer_id );

View file

@ -1446,9 +1446,6 @@ return array(
'gateway' => 'dcc',
),
);
if ( ! defined( 'PPCP_FLAG_SUBSCRIPTION' ) || ! PPCP_FLAG_SUBSCRIPTION ) {
unset( $fields['vault_enabled'] );
}
/**
* Depending on your store location, some credit cards can't be used.

View file

@ -174,12 +174,7 @@ class CardButtonGateway extends \WC_Payment_Gateway {
if ( $this->onboarded ) {
$this->supports = array( 'refunds' );
}
if (
defined( 'PPCP_FLAG_SUBSCRIPTION' )
&& PPCP_FLAG_SUBSCRIPTION
&& $this->gateways_enabled()
&& $this->vault_setting_enabled()
) {
if ($this->gateways_enabled() && $this->vault_setting_enabled()) {
$this->supports = array(
'refunds',
'products',

View file

@ -174,12 +174,7 @@ class CreditCardGateway extends \WC_Payment_Gateway_CC {
if ( $state->current_state() === State::STATE_ONBOARDED ) {
$this->supports = array( 'refunds' );
}
if (
defined( 'PPCP_FLAG_SUBSCRIPTION' )
&& PPCP_FLAG_SUBSCRIPTION
&& $this->gateways_enabled()
&& $this->vault_setting_enabled()
) {
if ($this->gateways_enabled() && $this->vault_setting_enabled()) {
$this->supports = array(
'refunds',
'products',

View file

@ -204,12 +204,7 @@ class PayPalGateway extends \WC_Payment_Gateway {
if ( $this->onboarded ) {
$this->supports = array( 'refunds' );
}
if (
defined( 'PPCP_FLAG_SUBSCRIPTION' )
&& PPCP_FLAG_SUBSCRIPTION
&& $this->gateways_enabled()
&& $this->vault_setting_enabled()
) {
if ($this->gateways_enabled() && $this->vault_setting_enabled()) {
$this->supports = array(
'refunds',
'products',

View file

@ -25,8 +25,6 @@ define( 'PAYPAL_API_URL', 'https://api.paypal.com' );
define( 'PAYPAL_SANDBOX_API_URL', 'https://api.sandbox.paypal.com' );
define( 'PAYPAL_INTEGRATION_DATE', '2022-04-13' );
define( 'PPCP_FLAG_SUBSCRIPTION', true );
! defined( 'CONNECT_WOO_CLIENT_ID' ) && define( 'CONNECT_WOO_CLIENT_ID', 'AcCAsWta_JTL__OfpjspNyH7c1GGHH332fLwonA5CwX4Y10mhybRZmHLA0GdRbwKwjQIhpDQy0pluX_P' );
! defined( 'CONNECT_WOO_SANDBOX_CLIENT_ID' ) && define( 'CONNECT_WOO_SANDBOX_CLIENT_ID', 'AYmOHbt1VHg-OZ_oihPdzKEVbU3qg0qXonBcAztuzniQRaKE0w1Hr762cSFwd4n8wxOl-TCWohEa0XM_' );
! defined( 'CONNECT_WOO_MERCHANT_ID' ) && define( 'CONNECT_WOO_MERCHANT_ID', 'K8SKZ36LQBWXJ' );