Fix const name

This commit is contained in:
Alex P 2022-04-27 23:50:23 +03:00
parent 6ebd88230b
commit 13e04b009c
4 changed files with 9 additions and 9 deletions

View file

@ -127,7 +127,7 @@ class AmountFactory {
$total_value = (float) $order->get_total();
if ( (
CreditCardGateway::ID === $order->get_payment_method()
|| ( PayPalGateway::ID === $order->get_payment_method() && 'card' === $order->get_meta( PayPalGateway::ORDER_PAYMENT_SOURCE ) )
|| ( PayPalGateway::ID === $order->get_payment_method() && 'card' === $order->get_meta( PayPalGateway::ORDER_PAYMENT_SOURCE_META_KEY ) )
)
&& $this->is_free_trial_order( $order )
) {

View file

@ -119,7 +119,7 @@ class PaymentTokenChecker {
try {
if ( $this->is_free_trial_order( $wc_order ) ) {
if ( CreditCardGateway::ID === $wc_order->get_payment_method()
|| ( PayPalGateway::ID === $wc_order->get_payment_method() && 'card' === $wc_order->get_meta( PayPalGateway::ORDER_PAYMENT_SOURCE ) )
|| ( PayPalGateway::ID === $wc_order->get_payment_method() && 'card' === $wc_order->get_meta( PayPalGateway::ORDER_PAYMENT_SOURCE_META_KEY ) )
) {
$order = $this->order_repository->for_wc_order( $wc_order );
$this->authorized_payments_processor->void_authorizations( $order );

View file

@ -33,12 +33,12 @@ class PayPalGateway extends \WC_Payment_Gateway {
use ProcessPaymentTrait;
const ID = 'ppcp-gateway';
const INTENT_META_KEY = '_ppcp_paypal_intent';
const ORDER_ID_META_KEY = '_ppcp_paypal_order_id';
const ORDER_PAYMENT_MODE_META_KEY = '_ppcp_paypal_payment_mode';
const ORDER_PAYMENT_SOURCE = '_ppcp_paypal_payment_source';
const FEES_META_KEY = '_ppcp_paypal_fees';
const ID = 'ppcp-gateway';
const INTENT_META_KEY = '_ppcp_paypal_intent';
const ORDER_ID_META_KEY = '_ppcp_paypal_order_id';
const ORDER_PAYMENT_MODE_META_KEY = '_ppcp_paypal_payment_mode';
const ORDER_PAYMENT_SOURCE_META_KEY = '_ppcp_paypal_payment_source';
const FEES_META_KEY = '_ppcp_paypal_fees';
/**
* The Settings Renderer.

View file

@ -39,7 +39,7 @@ trait OrderMetaTrait {
);
$payment_source = $this->get_payment_source( $order );
if ( $payment_source ) {
$wc_order->update_meta_data( PayPalGateway::ORDER_PAYMENT_SOURCE, $payment_source );
$wc_order->update_meta_data( PayPalGateway::ORDER_PAYMENT_SOURCE_META_KEY, $payment_source );
}
}