UpsellNotice.php
43 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 | * Upsell notice for recurring addon |
| 16 | */ |
| 17 | public static function recurringAddon() { |
| 18 | if ( Give_License::get_plugin_by_slug( 'give-recurring' ) ) { |
| 19 | return ''; |
| 20 | } |
| 21 | |
| 22 | $addon_link_url = esc_url( 'https://go.givewp.com/addons-recurring-inlinelink' ); |
| 23 | $addon_button_url = esc_url( 'https://go.givewp.com/addons-recurring-button' ); |
| 24 | |
| 25 | return sprintf( |
| 26 | ' |
| 27 | <div class="give-upsell-notice"> |
| 28 | <span class="icon dashicons dashicons-update-alt"></span> |
| 29 | <span class="description">%1$s</span> |
| 30 | <a class="view-addon-link button" href="%2$s" target="_blank">%3$s</a> |
| 31 | </div> |
| 32 | ', |
| 33 | sprintf( |
| 34 | __( '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.', 'give' ), |
| 35 | $addon_link_url, |
| 36 | esc_html__( 'Click to view the Recurring Donations add-on', 'give' ) |
| 37 | ), |
| 38 | $addon_button_url, |
| 39 | esc_html__( 'View Add-on', 'give' ) |
| 40 | ); |
| 41 | } |
| 42 | } |
| 43 |