PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.2.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.2.0
2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.11.2 1.11.1 1.11.0 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.6 1.9.5 trunk 1.3.0 1.3.1 1.3.2 1.4.0 All 65 releases
subscription / includes / Admin / views / pro-upgrade-modal.php

pro-upgrade-modal.php in Subscriptions for WooCommerce with Stripe Recurring Payments 2.2.0, at includes/Admin/views/pro-upgrade-modal.php

47 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Reusable "Upgrade to Pro" modal — shown on load over a Pro feature preview page.
4 *
5 * Contained (`--contained`): the dim covers this plugin's screen only, not the
6 * admin bar or the admin menu. A paywall that greys out Plugins and Users reads
7 * like the site broke rather than like a feature is locked.
8 *
9 * Including file must set, before the include:
10 * string $modal_title — heading, e.g. "Unlock Subscription Health".
11 * string $modal_desc — supporting copy.
12 * string $upgrade_url — Pro upgrade URL.
13 *
14 * @package SpringDevs\Subscription\Admin
15 */
16
17 defined( 'ABSPATH' ) || exit;
18
19 $modal_title = isset( $modal_title ) ? $modal_title : __( 'Unlock this feature', 'subscription' );
20 $modal_desc = isset( $modal_desc ) ? $modal_desc : __( 'This feature requires WPSubscription Pro. Unlock advanced features, priority support, and more with WPSubscription Pro.', 'subscription' );
21 $upgrade_url = isset( $upgrade_url ) ? $upgrade_url : 'https://wpsubscription.co/?utm_source=plugin&utm_medium=admin&utm_campaign=upgrade_pro';
22 ?>
23
24 <div class="wpsubs-modal wpsubs-modal--contained" id="subscrpt-pro-modal" role="dialog" aria-modal="true" aria-labelledby="subscrpt-pro-modal-title" data-wpsubs-modal-autoopen hidden>
25 <div class="wpsubs-modal__backdrop" data-wpsubs-modal-close style="backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);"></div>
26 <div class="wpsubs-modal__dialog" role="document" style="width:min(440px,calc(100vw - 40px));">
27 <button type="button" class="wpsubs-modal__close" data-wpsubs-modal-close aria-label="<?php esc_attr_e( 'Close', 'subscription' ); ?>" style="position:absolute;top:12px;right:14px;">&times;</button>
28 <div class="wpsubs-modal__body" style="display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;padding:28px 28px 24px;">
29 <div style="position:relative;display:flex;align-items:center;justify-content:center;">
30 <div style="position:absolute;width:100px;height:100px;background:radial-gradient(circle,rgba(255,106,52,0.22) 0%,transparent 70%);border-radius:50%;"></div>
31 <div style="position:relative;width:56px;height:56px;border:1.5px solid #ff6a34;border-radius:14px;display:flex;align-items:center;justify-content:center;background:#fff;">
32 <svg width="24" height="24" fill="none" viewBox="0 0 24 24" stroke="#ff6a34" stroke-width="2" aria-hidden="true">
33 <rect x="5" y="11" width="14" height="10" rx="2"/>
34 <path stroke-linecap="round" d="M8 11V7a4 4 0 018 0v4"/>
35 </svg>
36 </div>
37 </div>
38 <h2 class="wpsubs-modal__title" id="subscrpt-pro-modal-title" style="font-size:1.25rem;line-height:1.25;margin:0;"><?php echo esc_html( $modal_title ); ?></h2>
39 <p style="margin:0;font-size:13px;line-height:1.55;color:var(--wpsubs-text-muted);"><?php echo esc_html( $modal_desc ); ?></p>
40 <a class="wpsubs-btn wpsubs-btn--primary" href="<?php echo esc_url( $upgrade_url ); ?>" target="_blank" rel="noreferrer noopener" style="box-sizing:border-box;width:100%;margin-top:4px;height:42px;font-size:14px;">
41 <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" style="margin-right:6px;"><path d="M13 2L3 14h7l-1 8 10-12h-7l1-8z" /></svg>
42 <?php esc_html_e( 'Upgrade to Pro', 'subscription' ); ?>
43 </a>
44 </div>
45 </div>
46 </div>
47