Changeset 3111209
- Timestamp:
- 07/02/2024 01:31:21 PM (21 months ago)
- Location:
- woo-variation-swatches
- Files:
-
- 62 added
- 11 edited
-
tags/2.1.1 (added)
-
tags/2.1.1/README.txt (added)
-
tags/2.1.1/assets (added)
-
tags/2.1.1/assets/css (added)
-
tags/2.1.1/assets/css/admin.css (added)
-
tags/2.1.1/assets/css/admin.min.css (added)
-
tags/2.1.1/assets/css/frontend.css (added)
-
tags/2.1.1/assets/css/frontend.min.css (added)
-
tags/2.1.1/assets/js (added)
-
tags/2.1.1/assets/js/admin.js (added)
-
tags/2.1.1/assets/js/admin.min.js (added)
-
tags/2.1.1/assets/js/frontend.js (added)
-
tags/2.1.1/assets/js/frontend.min.js (added)
-
tags/2.1.1/assets/js/jquery.serializejson.js (added)
-
tags/2.1.1/assets/js/jquery.serializejson.min.js (added)
-
tags/2.1.1/assets/js/wp-color-picker-alpha.js (added)
-
tags/2.1.1/assets/js/wp-color-picker-alpha.min.js (added)
-
tags/2.1.1/changelog.txt (added)
-
tags/2.1.1/images (added)
-
tags/2.1.1/images/placeholder.png (added)
-
tags/2.1.1/includes (added)
-
tags/2.1.1/includes/class-woo-variation-swatches-backend.php (added)
-
tags/2.1.1/includes/class-woo-variation-swatches-blocks.php (added)
-
tags/2.1.1/includes/class-woo-variation-swatches-cache.php (added)
-
tags/2.1.1/includes/class-woo-variation-swatches-compatibility.php (added)
-
tags/2.1.1/includes/class-woo-variation-swatches-deactivate-feedback.php (added)
-
tags/2.1.1/includes/class-woo-variation-swatches-export-import.php (added)
-
tags/2.1.1/includes/class-woo-variation-swatches-frontend.php (added)
-
tags/2.1.1/includes/class-woo-variation-swatches-manage-cache.php (added)
-
tags/2.1.1/includes/class-woo-variation-swatches-product-edit-panel.php (added)
-
tags/2.1.1/includes/class-woo-variation-swatches-product-page.php (added)
-
tags/2.1.1/includes/class-woo-variation-swatches-settings.php (added)
-
tags/2.1.1/includes/class-woo-variation-swatches-term-meta.php (added)
-
tags/2.1.1/includes/class-woo-variation-swatches-wc-api-response.php (added)
-
tags/2.1.1/includes/class-woo-variation-swatches.php (added)
-
tags/2.1.1/includes/functions.php (added)
-
tags/2.1.1/includes/getwooplugins (added)
-
tags/2.1.1/includes/getwooplugins/class-getwooplugins-admin-menus.php (added)
-
tags/2.1.1/includes/getwooplugins/class-getwooplugins-admin-settings.php (added)
-
tags/2.1.1/includes/getwooplugins/class-getwooplugins-plugin-deactivate-feedback.php (added)
-
tags/2.1.1/includes/getwooplugins/class-getwooplugins-settings-page.php (added)
-
tags/2.1.1/includes/getwooplugins/css (added)
-
tags/2.1.1/includes/getwooplugins/css/getwooplugins-settings.css (added)
-
tags/2.1.1/includes/getwooplugins/html (added)
-
tags/2.1.1/includes/getwooplugins/html/deactive-feedback-dialog.php (added)
-
tags/2.1.1/includes/getwooplugins/html/dialog.php (added)
-
tags/2.1.1/includes/getwooplugins/html/settings-page.php (added)
-
tags/2.1.1/includes/getwooplugins/js (added)
-
tags/2.1.1/includes/getwooplugins/js/getwooplugins-form-field-dependency.js (added)
-
tags/2.1.1/includes/getwooplugins/js/getwooplugins-settings.js (added)
-
tags/2.1.1/includes/getwooplugins/js/jquery.tipTip.js (added)
-
tags/2.1.1/includes/getwooplugins/js/wp-color-picker-alpha.js (added)
-
tags/2.1.1/includes/html-product-settings-panel.php (added)
-
tags/2.1.1/includes/html-settings-group.php (added)
-
tags/2.1.1/includes/html-settings-sidebar.php (added)
-
tags/2.1.1/includes/html-settings-tutorial.php (added)
-
tags/2.1.1/includes/themes-support.php (added)
-
tags/2.1.1/languages (added)
-
tags/2.1.1/languages/woo-variation-swatches.pot (added)
-
tags/2.1.1/uninstall.php (added)
-
tags/2.1.1/woo-variation-swatches.php (added)
-
tags/2.1.1/wpml-config.xml (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/assets/css/admin.css (modified) (1 diff)
-
trunk/assets/css/frontend.css (modified) (1 diff)
-
trunk/assets/js/admin.js (modified) (1 diff)
-
trunk/assets/js/frontend.js (modified) (1 diff)
-
trunk/assets/js/wp-color-picker-alpha.js (modified) (1 diff)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/includes/class-woo-variation-swatches-term-meta.php (modified) (3 diffs)
-
trunk/includes/getwooplugins/class-getwooplugins-admin-menus.php (modified) (3 diffs)
-
trunk/languages/woo-variation-swatches.pot (modified) (4 diffs)
-
trunk/woo-variation-swatches.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-variation-swatches/trunk/README.txt
r3098501 r3111209 6 6 Tested up to: 6.5 7 7 WC requires at least: 7.5 8 WC tested up to: 8.99 Stable tag: 2.1. 08 WC tested up to: 9.0 9 Stable tag: 2.1.1 10 10 License: GPLv3 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 615 615 == Changelog == 616 616 617 = 2.1.1 - 02-07-2024 = 618 619 * Fixed: Attribute meta save issue. 620 * Update: WooCommerce 9.0+ Compatibility. 621 617 622 = 2.1.0 - 06-06-2024 = 618 623 -
woo-variation-swatches/trunk/assets/css/admin.css
r3098501 r3111209 3 3 * 4 4 * Author: Emran Ahmed ( emran.bd.08@gmail.com ) 5 * Date: 6/6/2024, 4:31:57PM5 * Date: 7/2/2024, 7:27:48 PM 6 6 * Released under the GPLv3 license. 7 7 */ -
woo-variation-swatches/trunk/assets/css/frontend.css
r3098501 r3111209 3 3 * 4 4 * Author: Emran Ahmed ( emran.bd.08@gmail.com ) 5 * Date: 6/6/2024, 4:31:57PM5 * Date: 7/2/2024, 7:27:48 PM 6 6 * Released under the GPLv3 license. 7 7 */ -
woo-variation-swatches/trunk/assets/js/admin.js
r3098501 r3111209 3 3 * 4 4 * Author: Emran Ahmed ( emran.bd.08@gmail.com ) 5 * Date: 6/6/2024, 4:31:57PM5 * Date: 7/2/2024, 7:27:48 PM 6 6 * Released under the GPLv3 license. 7 7 */ -
woo-variation-swatches/trunk/assets/js/frontend.js
r3098501 r3111209 3 3 * 4 4 * Author: Emran Ahmed ( emran.bd.08@gmail.com ) 5 * Date: 6/6/2024, 4:31:57PM5 * Date: 7/2/2024, 7:27:48 PM 6 6 * Released under the GPLv3 license. 7 7 */ -
woo-variation-swatches/trunk/assets/js/wp-color-picker-alpha.js
r3098501 r3111209 3 3 * 4 4 * Author: Emran Ahmed ( emran.bd.08@gmail.com ) 5 * Date: 6/6/2024, 4:31:57PM5 * Date: 7/2/2024, 7:27:48 PM 6 6 * Released under the GPLv3 license. 7 7 */ -
woo-variation-swatches/trunk/changelog.txt
r3098501 r3111209 1 1 *** Variation Swatches for WooCommerce *** 2 3 2024-07-02 - version 2.1.1 4 5 * Fixed - Attribute meta save issue. 6 * Added - WooCommerce 9.0+ Compatibility. 2 7 3 8 2024-06-06 - version 2.1.0 -
woo-variation-swatches/trunk/includes/class-woo-variation-swatches-term-meta.php
r3098501 r3111209 18 18 // add_action( 'create_term', array( $this, 'create_term' ), 5, 3 ); 19 19 20 add_action( 'delete_term', array( $this, 'delete_term' ), 5, 4);20 add_action( 'delete_term', array( $this, 'delete_term' ), 5, 3 ); 21 21 22 22 // Add form … … 212 212 } 213 213 214 public function delete_term( $term_id, $tt_id, $taxonomy , $deleted_term) {214 public function delete_term( $term_id, $tt_id, $taxonomy ) { 215 215 global $wpdb; 216 216 … … 229 229 public function save( $term_id, $tt_id = '', $taxonomy = '' ) { 230 230 if ( $taxonomy === $this->taxonomy ) { 231 232 if ( !isset( $_POST['woo_variation_swatches_term_meta_nonce'] ) ) { 233 return; 234 } 231 235 232 236 check_admin_referer('woo_variation_swatches_term_meta', 'woo_variation_swatches_term_meta_nonce'); -
woo-variation-swatches/trunk/includes/getwooplugins/class-getwooplugins-admin-menus.php
r3098501 r3111209 136 136 */ 137 137 public function admin_menu() { 138 global $menu;139 138 140 139 $pages = $this->get_settings_pages(); … … 142 141 if ( empty( $pages ) ) { 143 142 return; 144 }145 146 if ( current_user_can( 'edit_theme_options' ) ) {147 $menu[ '45.4' ] = array( // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited148 '',149 'read',150 'separator-getwooplugins',151 '',152 'wp-menu-separator getwooplugins'153 );154 143 } 155 144 … … 179 168 */ 180 169 public function settings_menu() { 181 182 global $submenu, $menu;183 170 184 171 $settings_page = add_submenu_page( 'getwooplugins', esc_html__( 'GetWooPlugins Settings', 'woo-variation-swatches' ), esc_html__( 'Home', 'woo-variation-swatches' ), 'manage_options', 'getwooplugins-settings', array( -
woo-variation-swatches/trunk/languages/woo-variation-swatches.pot
r3098501 r3111209 8 8 "Content-Transfer-Encoding: 8bit\n" 9 9 "Language-Team: Emran Ahmed <emran.bd.08@gmail.com>\n" 10 "POT-Creation-Date: 2024-0 6-06 10:31+0000\n"10 "POT-Creation-Date: 2024-07-02 13:27+0000\n" 11 11 "X-Poedit-Basepath: ..\n" 12 12 "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" … … 727 727 msgstr "" 728 728 729 #: ../includes/class-woo-variation-swatches-term-meta.php:40 1729 #: ../includes/class-woo-variation-swatches-term-meta.php:405 730 730 msgid "Upload / Add image" 731 731 msgstr "" 732 732 733 #: ../includes/class-woo-variation-swatches-term-meta.php:4 07733 #: ../includes/class-woo-variation-swatches-term-meta.php:411 734 734 msgid "Remove image" 735 735 msgstr "" … … 937 937 msgstr "" 938 938 939 #: ../includes/getwooplugins/class-getwooplugins-admin-menus.php:1 56, ../includes/getwooplugins/class-getwooplugins-admin-menus.php:184939 #: ../includes/getwooplugins/class-getwooplugins-admin-menus.php:145, ../includes/getwooplugins/class-getwooplugins-admin-menus.php:171 940 940 msgid "GetWooPlugins Settings" 941 941 msgstr "" 942 942 943 #: ../includes/getwooplugins/class-getwooplugins-admin-menus.php:1 56943 #: ../includes/getwooplugins/class-getwooplugins-admin-menus.php:145 944 944 msgid "GetWooPlugins" 945 945 msgstr "" 946 946 947 #: ../includes/getwooplugins/class-getwooplugins-admin-menus.php:1 84947 #: ../includes/getwooplugins/class-getwooplugins-admin-menus.php:171 948 948 msgid "Home" 949 949 msgstr "" … … 997 997 msgstr "" 998 998 999 #: ../woo-variation-swatches.php:6 0999 #: ../woo-variation-swatches.php:65 1000 1000 msgid "<strong>Variation Swatches for WooCommerce</strong> is an add-on of " 1001 1001 msgstr "" 1002 1002 1003 #: ../woo-variation-swatches.php:6 21003 #: ../woo-variation-swatches.php:67 1004 1004 msgid "WooCommerce" 1005 1005 msgstr "" 1006 1006 1007 1007 #. translators: %s: Pro Plugin Version 1008 #: ../woo-variation-swatches.php:1 281008 #: ../woo-variation-swatches.php:140 1009 1009 msgid "You are running older version of \"Variation Swatches for WooCommerce - Pro\". Please upgrade to %s or upper and continue." 1010 1010 msgstr "" 1011 1012 #. translators: %s: Pro Plugin Version 1013 #: ../woo-variation-swatches.php:158 1014 msgid "You are running older version of \"Variation Swatches for WooCommerce - Pro\". Please upgrade to %s or upper." 1015 msgstr "" -
woo-variation-swatches/trunk/woo-variation-swatches.php
r3098501 r3111209 5 5 * Description: Beautiful colors, images and buttons variation swatches for woocommerce product attributes. Requires WooCommerce 7.5+ 6 6 * Author: Emran Ahmed 7 * Version: 2.1. 07 * Version: 2.1.1 8 8 * Domain Path: /languages 9 9 * Requires PHP: 7.4 … … 11 11 * Tested up to: 6.5 12 12 * WC requires at least: 7.5 13 * WC tested up to: 8.913 * WC tested up to: 9.0 14 14 * Text Domain: woo-variation-swatches 15 15 * Author URI: https://getwooplugins.com/ … … 22 22 23 23 if ( ! defined( 'WOO_VARIATION_SWATCHES_PLUGIN_VERSION' ) ) { 24 define( 'WOO_VARIATION_SWATCHES_PLUGIN_VERSION', '2.1. 0' );24 define( 'WOO_VARIATION_SWATCHES_PLUGIN_VERSION', '2.1.1' ); 25 25 } 26 26 … … 31 31 if ( ! defined( 'WOO_VARIATION_SWATCHES_PLUGIN_FILE' ) ) { 32 32 define( 'WOO_VARIATION_SWATCHES_PLUGIN_FILE', __FILE__ ); 33 } 34 35 if ( ! defined( 'WOO_VARIATION_SWATCHES_MAYBE_PRO_PLUGIN_FILE' ) ) { 36 $woo_variation_swatches_maybe_pro_plugin_file = sprintf('%s/woo-variation-swatches-pro/woo-variation-swatches-pro.php', wp_normalize_path( WP_PLUGIN_DIR )); 37 define( 'WOO_VARIATION_SWATCHES_MAYBE_PRO_PLUGIN_FILE', $woo_variation_swatches_maybe_pro_plugin_file ); 33 38 } 34 39 … … 76 81 } 77 82 78 if ( function_exists( 'woo_variation_swatches_pro' ) ) {83 if ( function_exists( 'woo_variation_swatches_pro' ) && woo_variation_swatches_using_correct_pro_version() ) { 79 84 return woo_variation_swatches_pro(); 80 85 } … … 90 95 * @return bool 91 96 */ 92 function woo_variation_swatches_using_correct_pro_version() {97 function woo_variation_swatches_using_correct_pro_version(): bool { 93 98 return defined( 'WOO_VARIATION_SWATCHES_PRO_PLUGIN_VERSION' ) && ( version_compare( constant('WOO_VARIATION_SWATCHES_PRO_PLUGIN_VERSION'), constant( 'WOO_VARIATION_SWATCHES_MINIMUM_COMPATIBLE_PRO_PLUGIN_VERSION' ) ) >= 0 ); 94 99 } … … 110 115 111 116 if ( is_plugin_active( 'woo-variation-swatches-pro/woo-variation-swatches-pro.php' ) ) { 117 118 // Suppress "Plugin activated." notice. 119 unset($_GET['activate']); // phpcs:ignore WordPress.Security.NonceVerification.Recommended 120 121 // Display notice why pro version cannot activate. 122 add_action('admin_notices', 'woo_variation_swatches_deactivate_notice_pro'); 112 123 // Deactivate the plugin silently, Prevent deactivation hooks from running. 113 124 deactivate_plugins( 'woo-variation-swatches-pro/woo-variation-swatches-pro.php', true ); … … 120 131 * @return void 121 132 */ 122 function woo_variation_swatches_ prevent_pro_active() {133 function woo_variation_swatches_deactivate_notice_pro() { 123 134 124 135 if ( woo_variation_swatches_using_correct_pro_version() ) { 125 136 return; 126 137 } 138 127 139 /* translators: %s: Pro Plugin Version */ 128 printf(esc_html__('You are running older version of "Variation Swatches for WooCommerce - Pro". Please upgrade to %s or upper and continue.', 'woo-variation-swatches'), esc_html(constant( 'WOO_VARIATION_SWATCHES_MINIMUM_COMPATIBLE_PRO_PLUGIN_VERSION' ))); 129 exit(); 140 $notice_text = sprintf(esc_html__('You are running older version of "Variation Swatches for WooCommerce - Pro". Please upgrade to %s or upper and continue.', 'woo-variation-swatches'), esc_html(constant( 'WOO_VARIATION_SWATCHES_MINIMUM_COMPATIBLE_PRO_PLUGIN_VERSION' ))); 141 142 printf( '<div class="%1$s"><p>%2$s</p></div>', 'notice notice-error', esc_html($notice_text) ); 143 } 144 145 /** 146 * Show notice on plugin row. 147 * 148 * @param string $plugin_file Refer to {@see 'plugin_row_meta'} filter. 149 * @param array $plugin_data Refer to {@see 'plugin_row_meta'} filter. 150 * 151 * @return void 152 */ 153 function woo_variation_swatches_row_meta_notice_pro( string $plugin_file, array $plugin_data) { 154 if ( plugin_basename( WOO_VARIATION_SWATCHES_MAYBE_PRO_PLUGIN_FILE ) === $plugin_file ) { 155 $current_version = $plugin_data['Version']; 156 if ( version_compare( $current_version, constant( 'WOO_VARIATION_SWATCHES_MINIMUM_COMPATIBLE_PRO_PLUGIN_VERSION' ), '<=' ) ) { 157 /* translators: %s: Pro Plugin Version */ 158 $notice_text = sprintf(esc_html__('You are running older version of "Variation Swatches for WooCommerce - Pro". Please upgrade to %s or upper.', 'woo-variation-swatches'), esc_html(constant( 'WOO_VARIATION_SWATCHES_MINIMUM_COMPATIBLE_PRO_PLUGIN_VERSION' ))); 159 160 printf( '<p style="color: darkred"><span class="dashicons dashicons-warning"></span> <strong>%s</strong></p>', esc_html($notice_text) ); 161 } 162 } 130 163 } 131 164 … … 143 176 add_action( 'before_woocommerce_init', 'woo_variation_swatches_hpos_compatibility' ); 144 177 add_action( 'plugins_loaded', 'woo_variation_swatches_deactivate_pro', 9 ); 145 add_action( 'a ctivate_woo-variation-swatches-pro/woo-variation-swatches-pro.php', 'woo_variation_swatches_prevent_pro_active');178 add_action( 'after_plugin_row_meta', 'woo_variation_swatches_row_meta_notice_pro', 10, 2 ); 146 179
Note: See TracChangeset
for help on using the changeset viewer.