PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 3.4.0
GiveWP – Donation Plugin and Fundraising Platform v3.4.0
4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
give / src / PaymentGateways / PayPalCommerce / Banners / GatewaySettingPageBanner.php
GatewaySettingPageBanner.php
57 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\PaymentGateways\PayPalCommerce\Banners;
4
5 /**
6 * Class GatewaySettingPageBanner
7 *
8 * This class is used to render banner on gateway settings page.
9 *
10 * @since 2.33.0
11 */
12 class GatewaySettingPageBanner
13 {
14 /**
15 * Setup hook.
16 * @since 2.33.0
17 * @return void
18 */
19 public function setupHook()
20 {
21 // Set highest priority to render banner at the end.
22 add_action('give-settings_settings_gateways_page', [$this, 'render'], 999);
23 }
24
25 /**
26 * Render banner.
27 * @since 2.33.0
28 * @return void
29 */
30 public function render()
31 {
32 // Bailout if:
33 // - not on the gateway settings page, or
34 // - PayPal Standard is not active.
35 if (
36 'gateways-settings' !== give_get_current_setting_section() ||
37 ! give_is_gateway_active('paypal')
38 ) {
39 return;
40 }
41
42 printf(
43 '<div class="give-paypal-migration-banner gateway-settiing-page">
44 <p class="message">
45 <span class="label">%1$s</span>%2$s <a href="https://docs.givewp.com/paypal-migrate" target="_blank">%3$s</a>
46 <p>
47 </div>',
48 esc_html__('Important', 'give'),
49 esc_html__(
50 'PayPal Standard is no longer supported by PayPal. It is recommended to migrate to PayPal Donations.',
51 'give'
52 ),
53 esc_html__('How to migrate safely', 'give')
54 );
55 }
56 }
57