| 1 |
<?php |
| 2 |
/** |
| 3 |
* White Label upsell modal. |
| 4 |
* |
| 5 |
* @package Merchant |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
exit; // Exit if accessed directly |
| 10 |
} |
| 11 |
|
| 12 |
$merchant_wl_upgrade_url = merchant_admin_upgrade_link( |
| 13 |
'https://athemes.com/merchant-upgrade', |
| 14 |
array( 'utm_content' => 'white-label-settings' ), |
| 15 |
'white-label-upgrade-link' |
| 16 |
); |
| 17 |
|
| 18 |
$merchant_wl_license_url = add_query_arg( |
| 19 |
array( |
| 20 |
'page' => 'merchant', |
| 21 |
'section' => 'settings', |
| 22 |
), |
| 23 |
admin_url( 'admin.php' ) |
| 24 |
); |
| 25 |
|
| 26 |
$merchant_wl_body = sprintf( |
| 27 |
/* translators: %s: the Agency plan name, in bold. */ |
| 28 |
esc_html__( 'White Label is not available on your plan. Please upgrade to the %s to unlock this option.', 'merchant' ), |
| 29 |
'<strong>' . esc_html__( 'Agency plan', 'merchant' ) . '</strong>' |
| 30 |
); |
| 31 |
|
| 32 |
$merchant_wl_bonus = sprintf( |
| 33 |
/* translators: 1: the word "Bonus:" in bold, 2: the discount, in bold. */ |
| 34 |
esc_html__( '%1$s Merchant users get %2$s regular price, automatically applied at checkout.', 'merchant' ), |
| 35 |
'<strong>' . esc_html__( 'Bonus:', 'merchant' ) . '</strong>', |
| 36 |
'<strong class="merchant-white-label-modal-bonus-highlight">' . esc_html__( '20% off', 'merchant' ) . '</strong>' |
| 37 |
); |
| 38 |
|
| 39 |
$merchant_wl_footer = sprintf( |
| 40 |
/* translators: %s: a link reading "Activate your license". */ |
| 41 |
esc_html__( 'Already purchased? %s to unlock this feature', 'merchant' ), |
| 42 |
'<a href="' . esc_url( $merchant_wl_license_url ) . '">' . esc_html__( 'Activate your license', 'merchant' ) . '</a>' |
| 43 |
); |
| 44 |
|
| 45 |
?> |
| 46 |
|
| 47 |
<div id="merchant-white-label-modal" class="merchant-white-label-modal-overlay" aria-hidden="true"> |
| 48 |
<div class="merchant-white-label-modal-box" role="dialog" aria-modal="true" aria-labelledby="merchant-white-label-modal-title"> |
| 49 |
|
| 50 |
<button type="button" class="merchant-white-label-modal-close" aria-label="<?php esc_attr_e( 'Close', 'merchant' ); ?>"> |
| 51 |
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 52 |
<path d="M2 2L16 16M16 2L2 16" stroke="currentColor" stroke-width="2" stroke-linecap="round"/> |
| 53 |
</svg> |
| 54 |
</button> |
| 55 |
|
| 56 |
<div class="merchant-white-label-modal-lock"> |
| 57 |
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"> |
| 58 |
<path d="M24 4c-6.075 0-11 4.925-11 11v5h5v-5a6 6 0 0 1 12 0v5h5v-5c0-6.075-4.925-11-11-11Z" fill="currentColor"/> |
| 59 |
<rect x="9" y="20" width="30" height="24" rx="3" fill="currentColor"/> |
| 60 |
</svg> |
| 61 |
</div> |
| 62 |
|
| 63 |
<h3 id="merchant-white-label-modal-title" class="merchant-white-label-modal-title"> |
| 64 |
<?php esc_html_e( 'This White Label is in Agency Plan', 'merchant' ); ?> |
| 65 |
</h3> |
| 66 |
|
| 67 |
<p class="merchant-white-label-modal-body"> |
| 68 |
<?php echo wp_kses_post( $merchant_wl_body ); ?> |
| 69 |
</p> |
| 70 |
|
| 71 |
<a class="merchant-white-label-modal-cta button button-primary" href="<?php echo esc_url( $merchant_wl_upgrade_url ); ?>" target="_blank" rel="noopener noreferrer"> |
| 72 |
<?php esc_html_e( 'Upgrade to Agency', 'merchant' ); ?> |
| 73 |
</a> |
| 74 |
|
| 75 |
<div class="merchant-white-label-modal-bonus"> |
| 76 |
<span class="merchant-white-label-modal-bonus-badge" aria-hidden="true"> |
| 77 |
<svg width="13" height="13" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" focusable="false"> |
| 78 |
<path d="M13.2 4.4 6.4 11.2 2.8 7.6" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/> |
| 79 |
</svg> |
| 80 |
</span> |
| 81 |
<?php echo wp_kses_post( $merchant_wl_bonus ); ?> |
| 82 |
</div> |
| 83 |
|
| 84 |
<div class="merchant-white-label-modal-footer"> |
| 85 |
<?php echo wp_kses_post( $merchant_wl_footer ); ?> |
| 86 |
</div> |
| 87 |
|
| 88 |
</div> |
| 89 |
</div> |
| 90 |
|