← All changes
|
app/Modules/PaymentMethods/PayPalGateway/PayPalSettingsBase.php
+10
-0
1.6.4
→
1.7.1
View file →
| @@ -77,8 +77,9 @@ | ||
| 77 | 77 | 'test_webhook_events' => [], |
| 78 | 78 | 'live_webhook_events' => [], |
| 79 | 79 | |
| 80 | 80 | 'disable_ipn_verification' => 'no', |
| 81 | + 'brand_name' => '', | |
| 81 | 82 | ]; |
| 82 | 83 | } |
| 83 | 84 | |
| 84 | 85 | public function getProviderType() |
| @@ -156,8 +157,17 @@ | ||
| 156 | 157 | } |
| 157 | 158 | |
| 158 | 159 | return defined('FCT_PAYPAL_LIVE_PUBLIC_KEY') ? FCT_PAYPAL_LIVE_PUBLIC_KEY : $this->get()['live_client_id']; |
| 159 | 160 | |
| 161 | + } | |
| 162 | + | |
| 163 | + public function getBrandName(array $context = []): string | |
| 164 | + { | |
| 165 | + $brandName = trim((string) $this->get('brand_name')); | |
| 166 | + | |
| 167 | + $brandName = (string) apply_filters('fluent_cart/paypal/brand_name', $brandName, $context); | |
| 168 | + | |
| 169 | + return mb_substr(trim(wp_strip_all_tags($brandName)), 0, 127); | |
| 160 | 170 | } |
| 161 | 171 | |
| 162 | 172 | public function getMerchantId() |
| 163 | 173 | { |