diff --git a/paypal-for-woocommerce.php b/paypal-for-woocommerce.php index 03480e8df..2e17efe88 100644 --- a/paypal-for-woocommerce.php +++ b/paypal-for-woocommerce.php @@ -85,7 +85,8 @@ private function define_constants() { 'PAYPAL_FOR_WOOCOMMERCE_PPCP_AWS_WEB_SERVICE' => 'https://zpyql2kd39.execute-api.us-east-2.amazonaws.com/production/PayPalMerchantIntegration/', 'PAYPAL_FOR_WOOCOMMERCE_PPCP_ANGELLEYE_WEB_SERVICE' => 'https://ppcp.angelleye.com/production/PayPalMerchantIntegration/', 'AE_FEE' => 'ae_p_f', - 'AE_PPCP_NAME' => 'PayPal Complete Payments' + 'AE_PPCP_NAME' => 'PayPal Complete Payments', + 'AE_PPCP_CC' => 'Credit or Debit Card', ]; foreach ($constants as $key => $value) { diff --git a/ppcp-gateway/class-angelleye-paypal-ppcp-payment.php b/ppcp-gateway/class-angelleye-paypal-ppcp-payment.php index 988e0d1fd..c7ae0cb9f 100644 --- a/ppcp-gateway/class-angelleye-paypal-ppcp-payment.php +++ b/ppcp-gateway/class-angelleye-paypal-ppcp-payment.php @@ -32,6 +32,7 @@ class AngellEYE_PayPal_PPCP_Payment { public $merchant_id; public $partner_client_id; public $title; + public $titles; public $brand_name; public $paymentaction; public $paymentstatus; @@ -89,6 +90,7 @@ public function __construct() { $this->partner_client_id = PAYPAL_PPCP_PARTNER_CLIENT_ID; } $this->title = $this->setting_obj->get('title', sprintf('%s - Built by Angelleye', AE_PPCP_NAME)); + $this->titles = $this->setting_obj->get('titles', AE_PPCP_CC); $this->brand_name = $this->setting_obj->get('brand_name', get_bloginfo('name')); $this->paymentaction = $this->setting_obj->get('paymentaction', 'capture'); $this->paymentstatus = $this->setting_obj->get('paymentstatus', 'wc-default'); @@ -1143,7 +1145,11 @@ public function get_set_payment_method_title_from_session($woo_order_id = null) $order->set_payment_method_title($angelleye_ppcp_payment_method_title); $order->save(); } else { - $angelleye_ppcp_payment_method_title = $this->title; + if (is_null($angelleye_ppcp_payment_method_title) && $payment_method_id == 'angelleye_ppcp_cc'){ + $angelleye_ppcp_payment_method_title = $this->titles; + } else { + $angelleye_ppcp_payment_method_title = $this->title; + } } return $angelleye_ppcp_payment_method_title; }