Changeset 2390309
- Timestamp:
- 09/29/2020 01:31:34 PM (5 years ago)
- Location:
- wupo-group-attributes/trunk
- Files:
-
- 7 edited
-
CHANGELOG.txt (modified) (1 diff)
-
README.txt (modified) (2 diffs)
-
admin/class-wugrat-admin-attributes-in-group.php (modified) (1 diff)
-
admin/class-wugrat-admin.php (modified) (5 diffs)
-
includes/class-wugrat.php (modified) (1 diff)
-
public/class-wugrat-public.php (modified) (3 diffs)
-
wupo-group-attributes.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wupo-group-attributes/trunk/CHANGELOG.txt
r2306222 r2390309 1 ## [1.2.0] - 2020-09-29 2 ### Added 3 - Compatibility with WooCommerce 4.5 4 5 ### Fixed 6 - Fix title rendering conditions 7 1 8 ## [1.1.0] - 2020-05-16 2 9 ### Added -
wupo-group-attributes/trunk/README.txt
r2306222 r2390309 4 4 Requires at least: 5.0 5 5 Tested up to: 5.4 6 Stable tag: 1. 1.06 Stable tag: 1.2.0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 44 44 == Changelog == 45 45 46 = 1.1.0 = 47 * Compatibility with WooCommerce 4.1 48 * Better detection of custom product attributes 49 * Title rendering conditions 46 = 1.2.0 = 47 * Fix title rendering conditions 50 48 51 49 == Installation == -
wupo-group-attributes/trunk/admin/class-wugrat-admin-attributes-in-group.php
r2299119 r2390309 201 201 it is strongly advised to use only one of these groups for a product afterwards.<br /> 202 202 For example an attribute 'Resolution' with terms like Full-HD or 4K could be part of a group 'Screen', 203 but also of another group 'Camera'. When both groups are used in a product like a mobile phone204 it is not possible to assign t he attribute to just oneof the two groups. This results in arbitrary203 but also of another group 'Camera'. When both groups are used for a product like a mobile phone 204 it is not possible to assign to this attribute different values for each of the two groups. This results in arbitrary 205 205 and wrong rendering. This is a limitation from Wordpress/WooCommerce.<br /> 206 206 To circumvent the issue this plugin has a feature to duplicate existing attributes. On the attributes page -
wupo-group-attributes/trunk/admin/class-wugrat-admin.php
r2306194 r2390309 88 88 public function enqueue_script() { 89 89 $screen = get_current_screen(); 90 wupo_log('@enqueue_script, screen id', $screen->id);91 90 92 91 if ($screen->id == 'edit-wugrat_group' || $screen->id == 'product_page_wugrat_attributes_in_group') { … … 519 518 foreach ( $attribute_group_terms as $attribute_group_term ) { 520 519 $attribute_group_term_id = wc_sanitize_taxonomy_name( $attribute_group_term->term_id ); 521 $label = $attribute_group_term->name; 522 echo '<option value="' . esc_attr( $attribute_group_term_id ) . '">' . esc_html( $label ) . '</option>'; 520 $label = $attribute_group_term->name; 521 $name = $attribute_group_term->slug; 522 echo '<option value="' . esc_attr( $attribute_group_term_id ) . '">'.esc_html($label).' ('.esc_html($name).')</option>'; 523 523 } 524 524 } … … 547 547 $group_term_id = $group->term_id; 548 548 $label = $group->name; 549 echo '<option value="'.esc_attr($group_term_id).'">'.esc_html( $label ).'</option>'; 549 $name = $group->slug; 550 echo '<option value="'.esc_attr($group_term_id).'">'.esc_html( $label ).' ('.esc_html($name).')</option>'; 550 551 } 551 552 } … … 599 600 function ajax_add_attribute_group() { 600 601 global $wpdb; 601 wupo_log('@ajax_add_attribute_group');602 602 603 603 ob_start(); … … 659 659 function ajax_group_attributes_ordering() { 660 660 global $wpdb; 661 wupo_log('@ajax_group_attributes_ordering');662 661 663 662 $screen_id = isset( $_POST['screen_id'] ) ? sanitize_text_field( wp_unslash( $_POST['screen_id'] ) ) : null; -
wupo-group-attributes/trunk/includes/class-wugrat.php
r2299119 r2390309 204 204 if ($is_plugin_active === 'yes') { 205 205 $layout_id = get_option('wc_wugrat_settings_tab_styling_layout'); 206 wupo_log("Product rendering", "is plugin active: {$is_plugin_active}, layout_id: {$layout_id}");207 206 208 207 if (class_exists('Wugrat_Free_Version') || $layout_id == 1) { 209 wupo_log('Preparing product attributes for WooCommerce template');210 208 $this->loader->add_filter('woocommerce_display_product_attributes', $plugin_public, 'wugrat_display_product_attributes', 10, 2); 211 209 } -
wupo-group-attributes/trunk/public/class-wugrat-public.php
r2306194 r2390309 73 73 } 74 74 75 $attributes_name = implode('|', $attributes_keys); 75 if (!empty($attributes_keys)) { 76 $attributes_name = implode(',|', $attributes_keys); 77 $attributes_name = $attributes_name.','; 78 } else { 79 $attributes_name = ''; 80 } 76 81 77 82 if (!empty($attributes_name)) { … … 81 86 $this->option_group_order = explode(',', get_option($this->option_key_group_order), -1); 82 87 usort($attribute_groups, array( $this, 'group_table_sorting_compare' )); 88 } else { 89 $attribute_groups = ''; 83 90 } 84 91 … … 185 192 } 186 193 187 wupo_log('Product attributes', $product_attributes);194 //wupo_log('Product attributes', $product_attributes); 188 195 189 196 return $product_attributes; -
wupo-group-attributes/trunk/wupo-group-attributes.php
r2306224 r2390309 9 9 * Description: Grouping of attributes for WooCommerce to present your products in the most understandable way. 10 10 * Plugin URI: https://wupoplugins.com/wupo-group-attributes 11 * Version: 1. 1.011 * Version: 1.2.0 12 12 * Author: WUPO Plugins 13 13 * Author URI: https://wupoplugins.com … … 17 17 * Domain Path: /languages 18 18 * Requires at least: 5.0.0 19 * Tested up to: 5. 4.019 * Tested up to: 5.5.1 20 20 * WC requires at least: 3.0.0 21 * WC tested up to: 4. 1.021 * WC tested up to: 4.5.2 22 22 * License: GPL-2.0+ 23 23 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
Note: See TracChangeset
for help on using the changeset viewer.