Changeset 3479503
- Timestamp:
- 03/10/2026 08:15:29 PM (3 weeks ago)
- Location:
- preview-ai
- Files:
-
- 4 edited
- 26 copied
-
tags/1.3.1 (copied) (copied from preview-ai/trunk)
-
tags/1.3.1/admin (copied) (copied from preview-ai/trunk/admin)
-
tags/1.3.1/admin/class-preview-ai-admin-catalog.php (copied) (copied from preview-ai/trunk/admin/class-preview-ai-admin-catalog.php)
-
tags/1.3.1/admin/class-preview-ai-admin-onboarding.php (copied) (copied from preview-ai/trunk/admin/class-preview-ai-admin-onboarding.php)
-
tags/1.3.1/admin/class-preview-ai-admin-product.php (copied) (copied from preview-ai/trunk/admin/class-preview-ai-admin-product.php)
-
tags/1.3.1/admin/class-preview-ai-admin-settings.php (copied) (copied from preview-ai/trunk/admin/class-preview-ai-admin-settings.php)
-
tags/1.3.1/admin/class-preview-ai-admin.php (copied) (copied from preview-ai/trunk/admin/class-preview-ai-admin.php)
-
tags/1.3.1/admin/css/preview-ai-admin.css (copied) (copied from preview-ai/trunk/admin/css/preview-ai-admin.css)
-
tags/1.3.1/admin/js/preview-ai-admin.js (copied) (copied from preview-ai/trunk/admin/js/preview-ai-admin.js)
-
tags/1.3.1/admin/partials/preview-ai-admin-display.php (copied) (copied from preview-ai/trunk/admin/partials/preview-ai-admin-display.php)
-
tags/1.3.1/includes (copied) (copied from preview-ai/trunk/includes)
-
tags/1.3.1/includes/class-preview-ai-ajax.php (copied) (copied from preview-ai/trunk/includes/class-preview-ai-ajax.php)
-
tags/1.3.1/includes/class-preview-ai-api.php (copied) (copied from preview-ai/trunk/includes/class-preview-ai-api.php) (1 diff)
-
tags/1.3.1/includes/class-preview-ai-tracking.php (copied) (copied from preview-ai/trunk/includes/class-preview-ai-tracking.php)
-
tags/1.3.1/includes/class-preview-ai.php (copied) (copied from preview-ai/trunk/includes/class-preview-ai.php)
-
tags/1.3.1/index.php (copied) (copied from preview-ai/trunk/index.php)
-
tags/1.3.1/languages (copied) (copied from preview-ai/trunk/languages)
-
tags/1.3.1/languages/preview-ai-es_ES.po (copied) (copied from preview-ai/trunk/languages/preview-ai-es_ES.po)
-
tags/1.3.1/languages/preview-ai.pot (copied) (copied from preview-ai/trunk/languages/preview-ai.pot)
-
tags/1.3.1/preview-ai.php (copied) (copied from preview-ai/trunk/preview-ai.php) (2 diffs)
-
tags/1.3.1/public (copied) (copied from preview-ai/trunk/public)
-
tags/1.3.1/public/class-preview-ai-public.php (copied) (copied from preview-ai/trunk/public/class-preview-ai-public.php) (2 diffs)
-
tags/1.3.1/public/js/preview-ai-api.js (copied) (copied from preview-ai/trunk/public/js/preview-ai-api.js)
-
tags/1.3.1/public/js/preview-ai-storage.js (copied) (copied from preview-ai/trunk/public/js/preview-ai-storage.js)
-
tags/1.3.1/readme.txt (copied) (copied from preview-ai/trunk/readme.txt) (3 diffs)
-
tags/1.3.1/uninstall.php (copied) (copied from preview-ai/trunk/uninstall.php)
-
trunk/includes/class-preview-ai-api.php (modified) (1 diff)
-
trunk/preview-ai.php (modified) (2 diffs)
-
trunk/public/class-preview-ai-public.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
preview-ai/tags/1.3.1/includes/class-preview-ai-api.php
r3473838 r3479503 140 140 141 141 return $result; 142 }143 144 /**145 * Check if widget can be displayed.146 * Returns false if no API key or deactivated.147 *148 * @return bool149 */150 public static function is_widget_available() {151 $api_key = get_option( 'preview_ai_api_key', '' );152 153 // No API key = don't show widget.154 if ( empty( $api_key ) ) {155 return false;156 }157 158 // Check account status.159 $status = self::get_account_status();160 161 // Account deactivated by the service.162 if ( isset( $status['active'] ) && ! $status['active'] ) {163 return false;164 }165 166 return true;167 142 } 168 143 -
preview-ai/tags/1.3.1/preview-ai.php
r3473838 r3479503 10 10 * Plugin URI: https://previewai.app/ 11 11 * Description: Preview AI is a plugin that allows your customers to preview your products in real-time using AI image generation. 12 * Version: 1.3. 012 * Version: 1.3.1 13 13 * Author: Preview AI 14 14 * Author URI: https://profiles.wordpress.org/previewai/ … … 28 28 * Current plugin version. 29 29 */ 30 define( 'PREVIEW_AI_VERSION', '1.3. 0' );30 define( 'PREVIEW_AI_VERSION', '1.3.1' ); 31 31 define( 'PREVIEW_AI_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); 32 32 -
preview-ai/tags/1.3.1/public/class-preview-ai-public.php
r3454451 r3479503 176 176 */ 177 177 public function render_widget() { 178 // Check if widget is available (API key + tokens).179 if ( ! PREVIEW_AI_Api::is_widget_available() ) {180 return;181 }182 183 178 if ( ! function_exists( 'is_product' ) || ! is_product() ) { 184 179 return; … … 214 209 */ 215 210 public static function render_widget_output( $product_id, $overrides = array() ) { 216 // Check if widget is available (API key + tokens).217 if ( ! PREVIEW_AI_Api::is_widget_available() ) {218 return '';219 }220 221 211 if ( ! $product_id ) { 222 212 return ''; -
preview-ai/tags/1.3.1/readme.txt
r3473838 r3479503 8 8 WC requires at least: 8.0 9 9 WC tested up to: 10.5.1 10 Stable tag: 1.3. 010 Stable tag: 1.3.1 11 11 License: GPLv2 or later 12 12 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 160 160 == Changelog == 161 161 162 = 1.3.1 = 163 – Fixed widget visibility: the try-on button no longer disappears due to account status changes. Errors are shown at generation time instead. 164 162 165 = 1.3.0 = 163 166 – Added automatic product analysis on publish: Preview AI now activates automatically for supported products when they are first published. … … 202 205 == Upgrade Notice == 203 206 207 = 1.3.1 = 208 Fixed: try-on button no longer disappears silently when account status changes. 209 204 210 = 1.3.0 = 205 211 Automatic product analysis on publish: Preview AI now activates automatically for supported products when they are first published. -
preview-ai/trunk/includes/class-preview-ai-api.php
r3473838 r3479503 140 140 141 141 return $result; 142 }143 144 /**145 * Check if widget can be displayed.146 * Returns false if no API key or deactivated.147 *148 * @return bool149 */150 public static function is_widget_available() {151 $api_key = get_option( 'preview_ai_api_key', '' );152 153 // No API key = don't show widget.154 if ( empty( $api_key ) ) {155 return false;156 }157 158 // Check account status.159 $status = self::get_account_status();160 161 // Account deactivated by the service.162 if ( isset( $status['active'] ) && ! $status['active'] ) {163 return false;164 }165 166 return true;167 142 } 168 143 -
preview-ai/trunk/preview-ai.php
r3473838 r3479503 10 10 * Plugin URI: https://previewai.app/ 11 11 * Description: Preview AI is a plugin that allows your customers to preview your products in real-time using AI image generation. 12 * Version: 1.3. 012 * Version: 1.3.1 13 13 * Author: Preview AI 14 14 * Author URI: https://profiles.wordpress.org/previewai/ … … 28 28 * Current plugin version. 29 29 */ 30 define( 'PREVIEW_AI_VERSION', '1.3. 0' );30 define( 'PREVIEW_AI_VERSION', '1.3.1' ); 31 31 define( 'PREVIEW_AI_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); 32 32 -
preview-ai/trunk/public/class-preview-ai-public.php
r3454451 r3479503 176 176 */ 177 177 public function render_widget() { 178 // Check if widget is available (API key + tokens).179 if ( ! PREVIEW_AI_Api::is_widget_available() ) {180 return;181 }182 183 178 if ( ! function_exists( 'is_product' ) || ! is_product() ) { 184 179 return; … … 214 209 */ 215 210 public static function render_widget_output( $product_id, $overrides = array() ) { 216 // Check if widget is available (API key + tokens).217 if ( ! PREVIEW_AI_Api::is_widget_available() ) {218 return '';219 }220 221 211 if ( ! $product_id ) { 222 212 return ''; -
preview-ai/trunk/readme.txt
r3473838 r3479503 8 8 WC requires at least: 8.0 9 9 WC tested up to: 10.5.1 10 Stable tag: 1.3. 010 Stable tag: 1.3.1 11 11 License: GPLv2 or later 12 12 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 160 160 == Changelog == 161 161 162 = 1.3.1 = 163 – Fixed widget visibility: the try-on button no longer disappears due to account status changes. Errors are shown at generation time instead. 164 162 165 = 1.3.0 = 163 166 – Added automatic product analysis on publish: Preview AI now activates automatically for supported products when they are first published. … … 202 205 == Upgrade Notice == 203 206 207 = 1.3.1 = 208 Fixed: try-on button no longer disappears silently when account status changes. 209 204 210 = 1.3.0 = 205 211 Automatic product analysis on publish: Preview AI now activates automatically for supported products when they are first published.
Note: See TracChangeset
for help on using the changeset viewer.