UpsellNotice.php
48 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\Views\Admin; |
| 4 | |
| 5 | use Give_License; |
| 6 | |
| 7 | /** |
| 8 | * Class UpsellNotices |
| 9 | * @package Give\Views\Admin |
| 10 | * |
| 11 | * @since 2.8.0 |
| 12 | */ |
| 13 | class UpsellNotice |
| 14 | { |
| 15 | /** |
| 16 | * Upsell notice for recurring addon |
| 17 | */ |
| 18 | public static function recurringAddon() |
| 19 | { |
| 20 | if (Give_License::get_plugin_by_slug('give-recurring')) { |
| 21 | return ''; |
| 22 | } |
| 23 | |
| 24 | $addon_link_url = esc_url('https://go.givewp.com/addons-recurring-inlinelink'); |
| 25 | $addon_button_url = esc_url('https://go.givewp.com/addons-recurring-button'); |
| 26 | |
| 27 | return sprintf( |
| 28 | ' |
| 29 | <div class="give-upsell-notice"> |
| 30 | <span class="icon dashicons dashicons-update-alt"></span> |
| 31 | <span class="description">%1$s</span> |
| 32 | <a class="view-addon-link button" href="%2$s" target="_blank">%3$s</a> |
| 33 | </div> |
| 34 | ', |
| 35 | sprintf( |
| 36 | __( |
| 37 | 'Activate the <a href="%1$s" title="%2$s" target="_blank">Recurring Donations add-on</a> and provide your donors with flexible subscription giving options.', |
| 38 | 'give' |
| 39 | ), |
| 40 | $addon_link_url, |
| 41 | esc_html__('Click to view the Recurring Donations add-on', 'give') |
| 42 | ), |
| 43 | $addon_button_url, |
| 44 | esc_html__('View Add-on', 'give') |
| 45 | ); |
| 46 | } |
| 47 | } |
| 48 |