Plugin Directory

Changeset 2390309


Ignore:
Timestamp:
09/29/2020 01:31:34 PM (5 years ago)
Author:
wupo
Message:
  • Fix title rendering conditions
Location:
wupo-group-attributes/trunk
Files:
7 edited

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
    18## [1.1.0] - 2020-05-16
    29### Added
  • wupo-group-attributes/trunk/README.txt

    r2306222 r2390309  
    44Requires at least: 5.0
    55Tested up to: 5.4
    6 Stable tag: 1.1.0
     6Stable tag: 1.2.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4444== Changelog ==
    4545
    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
    5048
    5149== Installation ==
  • wupo-group-attributes/trunk/admin/class-wugrat-admin-attributes-in-group.php

    r2299119 r2390309  
    201201                                        it is strongly advised to use only one of these groups for a product afterwards.<br />
    202202                                        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 phone
    204                                         it is not possible to assign the attribute to just one of the two groups. This results in arbitrary
     203                                        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
    205205                                        and wrong rendering. This is a limitation from Wordpress/WooCommerce.<br />
    206206                                        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  
    8888    public function enqueue_script() {
    8989        $screen = get_current_screen();
    90         wupo_log('@enqueue_script, screen id', $screen->id);
    9190
    9291        if ($screen->id == 'edit-wugrat_group' || $screen->id == 'product_page_wugrat_attributes_in_group') {
     
    519518                    foreach ( $attribute_group_terms as $attribute_group_term ) {
    520519                        $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>';
    523523                    }
    524524                }
     
    547547                        $group_term_id = $group->term_id;
    548548                        $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>';
    550551                    }
    551552                }
     
    599600    function ajax_add_attribute_group() {
    600601        global $wpdb;
    601         wupo_log('@ajax_add_attribute_group');
    602602
    603603        ob_start();
     
    659659    function ajax_group_attributes_ordering() {
    660660        global $wpdb;
    661         wupo_log('@ajax_group_attributes_ordering');
    662661
    663662        $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  
    204204        if ($is_plugin_active === 'yes') {
    205205            $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}");
    207206
    208207            if (class_exists('Wugrat_Free_Version') || $layout_id == 1) {
    209                 wupo_log('Preparing product attributes for WooCommerce template');
    210208                $this->loader->add_filter('woocommerce_display_product_attributes', $plugin_public, 'wugrat_display_product_attributes', 10, 2);
    211209            }
  • wupo-group-attributes/trunk/public/class-wugrat-public.php

    r2306194 r2390309  
    7373        }
    7474
    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        }
    7681
    7782        if (!empty($attributes_name)) {
     
    8186            $this->option_group_order = explode(',', get_option($this->option_key_group_order), -1);
    8287            usort($attribute_groups, array( $this, 'group_table_sorting_compare' ));
     88        } else {
     89            $attribute_groups = '';
    8390        }
    8491
     
    185192        }
    186193
    187         wupo_log('Product attributes', $product_attributes);
     194        //wupo_log('Product attributes', $product_attributes);
    188195
    189196        return $product_attributes;
  • wupo-group-attributes/trunk/wupo-group-attributes.php

    r2306224 r2390309  
    99 * Description:       Grouping of attributes for WooCommerce to present your products in the most understandable way.
    1010 * Plugin URI:        https://wupoplugins.com/wupo-group-attributes
    11  * Version:           1.1.0
     11 * Version:           1.2.0
    1212 * Author:            WUPO Plugins
    1313 * Author URI:        https://wupoplugins.com
     
    1717 * Domain Path:       /languages
    1818 * Requires at least: 5.0.0
    19  * Tested up to:      5.4.0
     19 * Tested up to:      5.5.1
    2020 * WC requires at least: 3.0.0
    21  * WC tested up to:   4.1.0
     21 * WC tested up to:   4.5.2
    2222 * License:           GPL-2.0+
    2323 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
Note: See TracChangeset for help on using the changeset viewer.