← All changes
|
vendor/codeinwp/themeisle-sdk/src/Modules/Welcome.php
+5
-4
3.10.2
→
3.11.10
View file →
| @@ -24,8 +24,9 @@ | ||
| 24 | 24 | namespace ThemeisleSDK\Modules; |
| 25 | 25 | |
| 26 | 26 | // Exit if accessed directly. |
| 27 | 27 | use ThemeisleSDK\Common\Abstract_Module; |
| 28 | +use ThemeisleSDK\Loader; | |
| 28 | 29 | |
| 29 | 30 | if ( ! defined( 'ABSPATH' ) ) { |
| 30 | 31 | exit; |
| 31 | 32 | } |
| @@ -139,9 +140,9 @@ | ||
| 139 | 140 | // filter out the notifications that are not welcome upsells |
| 140 | 141 | // if we arrived here we will have at least one welcome upsell |
| 141 | 142 | $all_notifications = array_filter( |
| 142 | 143 | $all_notifications, |
| 143 | - function( $notification ) { | |
| 144 | + function ( $notification ) { | |
| 144 | 145 | return strpos( $notification['id'], '_welcome_upsell_flag' ) !== false; |
| 145 | 146 | } |
| 146 | 147 | ); |
| 147 | 148 | |
| @@ -152,12 +153,12 @@ | ||
| 152 | 153 | $pro_name = isset( $offer['pro_name'] ) ? $offer['pro_name'] : $this->product->get_friendly_name() . ' PRO'; |
| 153 | 154 | |
| 154 | 155 | $link = $offer['cta_link']; |
| 155 | 156 | |
| 156 | - $message = apply_filters( $this->product->get_key() . '_welcome_upsell_message', '<p>You\'ve been using <b>{product}</b> for 7 days now and we appreciate your loyalty! We also want to make sure you\'re getting the most out of our product. That\'s why we\'re offering you a special deal - upgrade to <b>{pro_product}</b> in the next 5 days and receive a discount of <b>up to 30%</b>. <a href="{cta_link}" target="_blank">Upgrade now</a> and unlock all the amazing features of <b>{pro_product}</b>!</p>' ); | |
| 157 | + $message = apply_filters( $this->product->get_key() . '_welcome_upsell_message', Loader::$labels['welcome']['message'] ); | |
| 157 | 158 | |
| 158 | - $button_submit = apply_filters( $this->product->get_key() . '_feedback_review_button_do', 'Upgrade Now!' ); | |
| 159 | - $button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', 'No, thanks.' ); | |
| 159 | + $button_submit = apply_filters( $this->product->get_key() . '_feedback_review_button_do', Loader::$labels['welcome']['ctay'] ); | |
| 160 | + $button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', Loader::$labels['welcome']['ctan'] ); | |
| 160 | 161 | $message = str_replace( |
| 161 | 162 | [ '{product}', '{pro_product}', '{cta_link}' ], |
| 162 | 163 | [ |
| 163 | 164 | $this->product->get_friendly_name(), |