PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.4.0
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.4.0
2.4.0 2.4.1 2.3.8 2.3.7 2.3.6 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.2.0 2.1.21 2.1.20 2.1.19 2.1.18 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.2 All 57 releases
← All changes | includes/Services/PromotionService.php +8 -2 2.2.02.4.0 View file →
@@ -48,13 +48,19 @@
48 48 /**
49 49 * Initialize the promotion service
50 50 */
51 51 public static function init() {
52 + // Gate every promotion surface behind `easy_invoice_show_upgrade_prompts`.
53 + // White-label addon (Agency tier) flips this off so end-clients never see upsells.
54 + if (!apply_filters('easy_invoice_show_upgrade_prompts', true)) {
55 + return;
56 + }
57 +
52 58 add_action('admin_notices', [__CLASS__, 'maybeShowPromotionBanner']);
53 59 add_action('wp_ajax_easy_invoice_dismiss_promotion', [__CLASS__, 'handleDismissPromotion']);
54 60 add_action('admin_enqueue_scripts', [__CLASS__, 'enqueueScripts']);
55 61 add_action('admin_menu', [__CLASS__, 'addUpgradeToProMenu']);
56 -
62 +
57 63 // Add plugin row action
58 64 add_filter('plugin_action_links_' . plugin_basename(EASY_INVOICE_PLUGIN_FILE), [__CLASS__, 'addPluginRowAction']);
59 65 }
60 66
@@ -231,9 +237,9 @@
231 237 public static function handleDismissPromotion() {
232 238 check_ajax_referer('easy_invoice_promotion_nonce', 'nonce');
233 239
234 240 if (!current_user_can('manage_options')) {
235 - wp_die(__('You do not have sufficient permissions to access this page.', 'easy-invoice'));
241 + wp_die(esc_html__('You do not have sufficient permissions to access this page.', 'easy-invoice'));
236 242 }
237 243
238 244 $dismiss_count = get_option('easy_invoice_promotion_dismiss_count', 0);
239 245 $dismiss_count++;