get_key(); $arwc_or_key = (string) get_option( ARWC_OpenRouter::OPTION_API_KEY, '' ); $arwc_or_model = (string) get_option( ARWC_OpenRouter::OPTION_MODEL, '' ); $arwc_provider = (string) get_option( ARWC_OpenRouter::OPTION_PROVIDER, '' ); $arwc_openai_key = (string) get_option( ARWC_OpenRouter::OPTION_OPENAI_KEY, '' ); $arwc_claude_key = (string) get_option( ARWC_OpenRouter::OPTION_ANTHROPIC_KEY, '' ); $arwc_gemini_key = (string) get_option( ARWC_OpenRouter::OPTION_GEMINI_KEY, '' ); $arwc_provider = ( '' === $arwc_provider ) ? 'auto' : $arwc_provider; $arwc_is_pro = $license->is_pro(); $arwc_plan = $license->get_plan(); $arwc_cache = $license->get_cache(); $arwc_saved = isset( $_GET['arwc_settings'] ) && 'saved' === sanitize_key( wp_unslash( $_GET['arwc_settings'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- display-only flash flag. /** * Turn the raw validation `reason` from the endpoint into a friendly, * actionable message. The activation-limit case (a key already used on the * maximum number of sites) gets specific guidance instead of a bare slug. * * @param string $arwc_reason Reason slug from the API. * @return string */ $arwc_reason_message = static function ( $arwc_reason ) { switch ( $arwc_reason ) { case 'activation_limit': case 'limit_reached': case 'max_activations': return __( 'This key is already active on the maximum number of sites. Deactivate it on a site you no longer use, or contact AgenticTrack to raise the limit.', 'agentictrack-agent-readiness-for-woocommerce' ); case 'expired': return __( 'This license has expired. Renew it to re-enable Pro fixes.', 'agentictrack-agent-readiness-for-woocommerce' ); case 'inactive': return __( 'This license is not active. Check your AgenticTrack account, then save again.', 'agentictrack-agent-readiness-for-woocommerce' ); case 'not_found': return __( 'We could not find that license key. Double-check it and save again.', 'agentictrack-agent-readiness-for-woocommerce' ); case '': return __( 'This license key could not be validated.', 'agentictrack-agent-readiness-for-woocommerce' ); default: /* translators: %s: raw reason code returned by the licensing API. */ return sprintf( __( 'This license key is not valid (%s).', 'agentictrack-agent-readiness-for-woocommerce' ), $arwc_reason ); } }; ?>

is_local_site() ? ' ' . __( 'This looks like a local or staging site, which can block the outbound validation request.', 'agentictrack-agent-readiness-for-woocommerce' ) : ''; ?>

is_local_site() ) : ?>