%s

%s

%s

', __( 'You\'ve reached 80% of your monthly plan usage!', 'pojo-accessibility' ), __( 'Upgrade now to increase your limit and ensure all accessibility features stay fully available.', 'pojo-accessibility' ), SettingsModule::get_upgrade_link( 'acc-80-quota' ), __( 'Upgrade Now', 'pojo-accessibility' ), ); } public function maybe_add_quota_80_notice() : void { $plan_data = Settings::get( Settings::PLAN_DATA ); if ( ! $plan_data ) { $this->conditions = false; } if ( $plan_data->plan->name === 'Free' ) { $this->conditions = false; } $plan_usage = (int) SettingsModule::get_plan_usage(); if ( $plan_usage > 80 && $plan_usage < 100 ) { $this->conditions = true; } elseif ( $plan_usage < 80 ) { $this->undismiss(); $this->conditions = false; } else { $this->conditions = false; } } public function print_js() { // used to make sure we only print this js once per page $action = 'admin_notices_print_js'; if ( did_action( $action ) ) { return; } do_action( $action ); ?>