diff --git a/class-gwiz-gf-openai.php b/class-gwiz-gf-openai.php index 6390ad1..bc3edec 100644 --- a/class-gwiz-gf-openai.php +++ b/class-gwiz-gf-openai.php @@ -47,8 +47,8 @@ class GWiz_GF_OpenAI extends GFFeedAddOn { protected $_path = 'gravityforms-openai/gravityforms-openai.php'; protected $_full_path = __FILE__; protected $_slug = 'gravityforms-openai'; - protected $_title = 'Gravity Forms OpenAI'; - protected $_short_title = 'OpenAI (Free)'; + protected $_title = 'Gravity Forms OpenAI (deprecated).'; + protected $_short_title = 'OpenAI (Deprecated)'; /** * Defines the capabilities needed for the Add-On. @@ -253,6 +253,55 @@ public function init() { add_filter( 'gform_validation_message', array( $this, 'modify_validation_message' ), 15, 2 ); add_filter( 'gform_entry_is_spam', array( $this, 'moderations_endpoint_spam' ), 10, 3 ); add_filter( 'gform_pre_replace_merge_tags', array( $this, 'replace_merge_tags' ), 10, 7 ); + + add_action( 'admin_notices', array( $this, 'maybe_display_deprecation_notice' ) ); + add_action( 'wp_ajax_gwiz_gf_openai_dismiss_deprecation_notice', array( $this, 'dismiss_deprecation_notice' ) ); + } + + /** + * Displays a one-time deprecation notice in wp-admin. + */ + public function maybe_display_deprecation_notice() { + if ( ! current_user_can( 'activate_plugins' ) || $this->is_deprecation_notice_dismissed() ) { + return; + } + ?> +
The Gravity Forms OpenAI plugin has been deprecated and is no longer actively maintained. The plugin will continue to function as-is, but it will not receive future updates, improvements, or bug fixes.
+For continued development, enhanced features, and ongoing support, we recommend upgrading to Gravity Connect OpenAI, our premium solution built specifically for long-term reliability and expansion.
+