Plugin Directory

Changeset 2763450


Ignore:
Timestamp:
07/29/2022 11:54:53 AM (4 years ago)
Author:
HappyKite
Message:

1.6.1 Release

  • FIX - Issue in 1.6 that caused Out of Stock variations to appear in WooCommerce Hide Out of Stock setting is ticked.
Location:
force-default-variant-for-woocommerce
Files:
10 added
3 edited

Legend:

Unmodified
Added
Removed
  • force-default-variant-for-woocommerce/trunk/includes/variations.php

    r2750805 r2763450  
    11<?php /* Variant DropDown menu changes */
    22if ( hpy_fdv_wc_version_check( '3.0' ) ) {
    3     add_filter( 'woocommerce_product_get_default_attributes', 'hpy_fdv_default_attribute', 10, 1 );
    4     add_filter( 'woocommerce_dropdown_variation_attribute_options_html', 'hpy_fdv_attribute_v2', 20, 2 );
     3    add_filter( 'woocommerce_product_get_default_attributes', 'hpy_fdv_default_attribute', 10, 1 );
     4    add_filter( 'woocommerce_dropdown_variation_attribute_options_args', 'hpy_fdv_attribute_v2', 20, 2 );
    55} else {
    6     add_filter( 'woocommerce_dropdown_variation_attribute_options_args', 'hpy_fdv_attribute_args', 10, 1 );
     6    add_filter( 'woocommerce_dropdown_variation_attribute_options_args', 'hpy_fdv_attribute_args', 10, 1 );
    77}
    88
     
    1717 */
    1818function hpy_fdv_attribute_args( $args = array() ) {
    19     $sortby = !empty( get_option( 'hpy_variant_sort' ) ) ? get_option( 'hpy_variant_sort' ) : 'id';
    20 
    21     $product   = $args['product'];
    22     $attribute = strtolower( $args['attribute'] );
    23 
    24     $product_class = new WC_Product_Variable( $product );
    25     $children = $product_class->get_visible_children();
    26     $i = 0;
    27     if ( !empty( $children ) ) {
    28         foreach ( $children as $child ) {
    29             $required      = 'attribute_' . $attribute;
    30             $meta          = get_post_meta( $child );
    31             $to_use        = $meta[ $required ][ 0 ];
    32             $product_child = new WC_Product_Variation( $child );
    33             $prices[ $i ]  = array( $product_child->get_price(), $to_use );
    34             $i ++;
    35         }
    36 
    37         if ( $sortby == 'price-low' || $sortby == 'price-high' ) {
    38             if ( isset( $prices ) ) {
    39                 if ( $sortby == 'price-low' ) {
    40                     sort( $prices );
    41                 } else {
    42                     rsort( $prices );
    43                 }
    44             }
    45         }
    46         $args[ 'selected' ] = $prices[ 0 ][ 1 ];
    47 
    48         $args[ 'show_option_none' ] = '';
    49     }
    50 
    51     return $args;
     19    $sortby = !empty( get_option( 'hpy_variant_sort' ) ) ? get_option( 'hpy_variant_sort' ) : 'id';
     20
     21    $product   = $args['product'];
     22    $attribute = strtolower( $args['attribute'] );
     23
     24    $product_class = new WC_Product_Variable( $product );
     25    $children = $product_class->get_visible_children();
     26    $i = 0;
     27    if ( !empty( $children ) ) {
     28        foreach ( $children as $child ) {
     29            $required      = 'attribute_' . $attribute;
     30            $meta          = get_post_meta( $child );
     31            $to_use        = $meta[ $required ][ 0 ];
     32            $product_child = new WC_Product_Variation( $child );
     33            $prices[ $i ]  = array( $product_child->get_price(), $to_use );
     34            $i ++;
     35        }
     36
     37        if ( $sortby == 'price-low' || $sortby == 'price-high' ) {
     38            if ( isset( $prices ) ) {
     39                if ( $sortby == 'price-low' ) {
     40                    sort( $prices );
     41                } else {
     42                    rsort( $prices );
     43                }
     44            }
     45        }
     46        $args[ 'selected' ] = $prices[ 0 ][ 1 ];
     47
     48        $args[ 'show_option_none' ] = '';
     49    }
     50
     51    return $args;
    5252
    5353}
     
    5656 * Remove the Choose an Option text - if applicable
    5757 *
    58  * @param $html
    5958 * @param $args
    6059 *
    6160 * @return array|mixed|string|string[]
    6261 */
    63 function hpy_fdv_attribute_v2( $html, $args ) {
    64     if ( get_option('hpy_disabled_auto_remove_dropdown') == 'yes' ) {
    65         return $html;
    66     }
    67 
    68     $show_option_none_text = $args['show_option_none'] ? $args['show_option_none'] : __( 'Choose an option', 'woocommerce' );
    69     $show_option_none_html = '<option value="">' . esc_html( $show_option_none_text ) . '</option>';
    70 
    71     $html = str_replace($show_option_none_html, '', $html);
    72 
    73     return $html;
     62
     63function hpy_fdv_attribute_v2( $args ) {
     64    if ( get_option('hpy_disabled_auto_remove_dropdown') != 'yes' ) {
     65        $args['show_option_none'] = false;
     66    }
     67
     68    return $args;
    7469}
    7570
    7671function hpy_fdv_default_attribute( $defaults ) {
    77     global $product;
    78    
    79     if ( !$product ) {
    80         return $defaults;
    81     }
    82    
    83     if ( $product->post_type !== 'product' ) {
    84         return $defaults;
    85     }
    86    
    87     $respect = get_option( 'hpy_variant_respect' );
    88     $sortby = apply_filters( 'hpy_fdv_custom_sortby', !empty( get_option( 'hpy_variant_sort' ) ) ? get_option( 'hpy_variant_sort' ) : 'id' );
    89     $thensort = apply_filters( 'hpy_fdv_custom_then_sortby', !empty( get_option( 'hpy_variant_then_sort' ) ) ? get_option( 'hpy_variant_then_sort' ) : 'default' );
    90     $hide_oos = 'yes' == get_option( 'woocommerce_hide_out_of_stock_items' );
     72    global $product;
     73
     74    if ( !$product ) {
     75        return $defaults;
     76    }
     77
     78    if ( $product->post_type !== 'product' ) {
     79        return $defaults;
     80    }
     81
     82    $respect = get_option( 'hpy_variant_respect' );
     83    $sortby = apply_filters( 'hpy_fdv_custom_sortby', !empty( get_option( 'hpy_variant_sort' ) ) ? get_option( 'hpy_variant_sort' ) : 'id' );
     84    $thensort = apply_filters( 'hpy_fdv_custom_then_sortby', !empty( get_option( 'hpy_variant_then_sort' ) ) ? get_option( 'hpy_variant_then_sort' ) : 'default' );
     85    $hide_oos = 'yes' == get_option( 'woocommerce_hide_out_of_stock_items' );
    9186    $first_attribute = '';
    92    
    93     if ( $respect == 'yes' && !empty( $defaults ) ) {
    94         return $defaults;
    95     }
    96    
    97     if ( empty( $sortby ) ) {
    98         $sortby = 'id';
    99     }
    100    
    101     if ( !$product->is_type( 'variable' ) ) {
    102         return $defaults;
    103     }
    104    
    105     $children = $product->get_children();
    106     $attributes = array();
    107    
    108     foreach( $children as $key => $child ) {
    109         $_child = wc_get_product( $child );
    110         $position = array_search( $key, array_keys( $children ) );
    111         $menu_order = array();
     87
     88    if ( $respect == 'yes' && !empty( $defaults ) ) {
     89        return $defaults;
     90    }
     91
     92    if ( empty( $sortby ) ) {
     93        $sortby = 'id';
     94    }
     95
     96    if ( !$product->is_type( 'variable' ) ) {
     97        return $defaults;
     98    }
     99
     100    $children = $product->get_children();
     101    $attributes = array();
     102
     103    foreach( $children as $key => $child ) {
     104        $_child = wc_get_product( $child );
     105        $position = array_search( $key, array_keys( $children ) );
     106        $menu_order = array();
    112107        $stock_qty = $_child->get_stock_quantity();
    113         $sales = $_child->get_total_sales();
    114         $stock_status = $_child->is_in_stock();
     108        $sales = $_child->get_total_sales();
     109        $stock_status = $_child->is_in_stock();
    115110        $attrs = $_child->get_attributes();
    116111        foreach( $attrs as $akey => $attr ) {
     
    122117        }
    123118
    124         if ( $hide_oos && !$stock_status ) {
    125             //If Hide out of Stock is set, and this variant is out of stock, then skip.
    126             continue;
    127         }
    128        
    129         if ( $_child->get_status() == 'publish' ) {
    130             $attributes[] = apply_filters( 'hpy_fdv_build_attribute_filter', array( 'price' => !empty($_child->get_price()) ? $_child->get_price() : '0' , 'id' => $_child->get_id(), 'position' => $position, 'sales' => $sales, 'stock_level' => $stock_qty, 'menu_order' => $menu_order ) );
    131         }
    132     }
    133    
    134     $secondary_sort = false;
    135 
    136     switch( $sortby ) {
    137        
    138         case 'price-low':
    139             $secondary_sort = true;
    140             $attributes = hpy_fdv_multidimensional_sort( $attributes, 'price-low' );
    141             break;
    142            
    143         case 'price-high':
    144             $secondary_sort = true;
    145             $attributes = hpy_fdv_multidimensional_sort( $attributes, 'price-high' );
    146             break;
    147            
    148         case 'position':
    149             $attributes = hpy_fdv_multidimensional_sort( $attributes, 'position' );
    150             break;
    151            
    152         case 'id' :
    153             $attributes = hpy_fdv_multidimensional_sort( $attributes, 'id' );
    154             break;
     119        if ( $hide_oos && !$stock_status ) {
     120            //If Hide out of Stock is set, and this variant is out of stock, then skip.
     121            continue;
     122        }
     123
     124        if ( $_child->get_status() == 'publish' ) {
     125            $attributes[] = apply_filters( 'hpy_fdv_build_attribute_filter', array( 'price' => !empty($_child->get_price()) ? $_child->get_price() : '0' , 'id' => $_child->get_id(), 'position' => $position, 'sales' => $sales, 'stock_level' => $stock_qty, 'menu_order' => $menu_order ) );
     126        }
     127    }
     128
     129    $secondary_sort = false;
     130
     131    switch( $sortby ) {
     132
     133        case 'price-low':
     134            $secondary_sort = true;
     135            $attributes = hpy_fdv_multidimensional_sort( $attributes, 'price-low' );
     136            break;
     137
     138        case 'price-high':
     139            $secondary_sort = true;
     140            $attributes = hpy_fdv_multidimensional_sort( $attributes, 'price-high' );
     141            break;
     142
     143        case 'position':
     144            $attributes = hpy_fdv_multidimensional_sort( $attributes, 'position' );
     145            break;
     146
     147        case 'id' :
     148            $attributes = hpy_fdv_multidimensional_sort( $attributes, 'id' );
     149            break;
    155150
    156151        case 'menu_order':
    157152            $attributes = hpy_fdv_multidimensional_sort( $attributes, 'menu_order', $first_attribute );
    158153            break;
    159            
    160         default:
    161             $secondary_sort = apply_filters( 'hpy_fdv_do_secondary_sort', true );
    162             $attributes = apply_filters( 'hpy_fdv_trigger_sort', $attributes );
    163             break;
    164        
    165     }
    166    
    167     if ( empty( $attributes ) ) {
    168         return $defaults;
    169     }
    170    
    171     if ( $secondary_sort ) {
    172         $attributes = hpy_fdv_secondary_sort( $attributes, $thensort, $sortby );
    173     }
    174    
    175     $stock_status = array();
    176    
    177     $count = count( $attributes );
    178     for( $i = 0; $i < $count; $i++ ) {
    179         $_prod = wc_get_product( $attributes[$i]['id'] );
    180        
    181         $stock_limit = get_option( 'hpy_variant_stockLimit' );
    182        
    183         if ( !empty( $stock_limit ) ) {
    184             $stock_qty = $_prod->get_stock_quantity();
    185             if ( $stock_qty < $stock_limit && !is_null( $stock_qty ) ) {
    186                 $stock = 'outofstock';
    187             } else {
    188                 $stock = $_prod->get_stock_status();
    189             }
    190         } else {
    191             $stock = $_prod->get_stock_status();
    192         }
    193        
    194         if ( $stock == 'outofstock' ) {
    195             $stock_status[$i] = 'outofstock';
    196         } else {
    197             $stock_status[$i] = 'instock';
    198         }
    199     }
    200    
    201     if ( count( array_unique( $stock_status ) ) > 1 && count( array_unique( $stock_status ) ) < count( $attributes ) ) {
    202         foreach( $stock_status as $key => $value ) {
    203             if ( $value == 'outofstock' ) {
    204                 unset( $attributes[$key] );
    205             }
    206         }
    207     }
    208    
    209     $attributes = array_values($attributes);
    210    
    211     $_prod = !empty( $attributes[0]['id'] ) ? wc_get_product( $attributes[0]['id'] ) : false;
    212    
    213     if ( empty( $_prod ) ) {
    214         return apply_filters( 'hpy_fdv_attributes_return', $defaults );
    215     }
    216    
    217     $attr = hpy_fdv_populate_empty_attributes( $_prod->get_attributes(), $_prod );
    218    
    219     $defaults = array();
    220    
    221     foreach( $attr as $key => $value ) {
     154
     155        default:
     156            $secondary_sort = apply_filters( 'hpy_fdv_do_secondary_sort', true );
     157            $attributes = apply_filters( 'hpy_fdv_trigger_sort', $attributes );
     158            break;
     159
     160    }
     161
     162    if ( empty( $attributes ) ) {
     163        return $defaults;
     164    }
     165
     166    if ( $secondary_sort ) {
     167        $attributes = hpy_fdv_secondary_sort( $attributes, $thensort, $sortby );
     168    }
     169
     170    $stock_status = array();
     171
     172    $count = count( $attributes );
     173    for( $i = 0; $i < $count; $i++ ) {
     174        $_prod = wc_get_product( $attributes[$i]['id'] );
     175
     176        $stock_limit = get_option( 'hpy_variant_stockLimit' );
     177
     178        if ( !empty( $stock_limit ) ) {
     179            $stock_qty = $_prod->get_stock_quantity();
     180            if ( $stock_qty < $stock_limit && !is_null( $stock_qty ) ) {
     181                $stock = 'outofstock';
     182            } else {
     183                $stock = $_prod->get_stock_status();
     184            }
     185        } else {
     186            $stock = $_prod->get_stock_status();
     187        }
     188
     189        if ( $stock == 'outofstock' ) {
     190            $stock_status[$i] = 'outofstock';
     191        } else {
     192            $stock_status[$i] = 'instock';
     193        }
     194    }
     195
     196    if ( count( array_unique( $stock_status ) ) > 1 && count( array_unique( $stock_status ) ) < count( $attributes ) ) {
     197        foreach( $stock_status as $key => $value ) {
     198            if ( $value == 'outofstock' ) {
     199                unset( $attributes[$key] );
     200            }
     201        }
     202    }
     203
     204    $attributes = array_values($attributes);
     205
     206    $_prod = !empty( $attributes[0]['id'] ) ? wc_get_product( $attributes[0]['id'] ) : false;
     207
     208    if ( empty( $_prod ) ) {
     209        return apply_filters( 'hpy_fdv_attributes_return', $defaults );
     210    }
     211
     212    $attr = hpy_fdv_populate_empty_attributes( $_prod->get_attributes(), $_prod );
     213
     214    $defaults = array();
     215
     216    foreach( $attr as $key => $value ) {
    222217        if ( !empty( $value ) ) {
    223218            $defaults[$key] = $value;
    224219        }
    225     }
    226    
    227     return apply_filters( 'hpy_fdv_attributes_return', $defaults );
     220    }
     221
     222    return apply_filters( 'hpy_fdv_attributes_return', $defaults );
    228223}
    229224
    230225function hpy_fdv_secondary_sort( $attributes, $sortby, $origial_sort ) {
    231    
    232     $attribute_split = array();
    233     foreach( $attributes as $akey => $avalue ) {
    234         $attribute_split[$avalue['price']][] = $avalue;
    235     }
    236    
    237     foreach( $attribute_split as $skey => $split ) {
    238         switch ( apply_filters( 'hpy_fdv_secondary_sort_switch', $sortby ) ) {
    239            
    240             //Sort using the Secondary filter - Currently defaults to Position, so don't change anything if set to Position
    241             case 'then_sales':
    242                 $split = hpy_fdv_multidimensional_sort( $split, 'sales' );
    243                 break;
    244            
    245             case 'then_id':
    246                 $split = hpy_fdv_multidimensional_sort( $split, 'id' );
    247                 break;
    248            
    249             case 'then_stock' :
    250                 $split = hpy_fdv_multidimensional_sort( $split, 'stock' );
    251                 break;
    252            
    253             default:
    254                 $split = apply_filters( 'hpy_fdv_trigger_sort', $split );
    255                 break;
    256            
    257         }
    258        
    259         $attribute_split[$skey] = $split;
    260     }
    261    
    262     $attributes = hpy_fdv_array_flatten( $attribute_split );
    263    
    264     return apply_filters( 'hpy_fdv_secondary_sort_filter', $attributes );
    265    
     226
     227    $attribute_split = array();
     228    foreach( $attributes as $akey => $avalue ) {
     229        $attribute_split[$avalue['price']][] = $avalue;
     230    }
     231
     232    foreach( $attribute_split as $skey => $split ) {
     233        switch ( apply_filters( 'hpy_fdv_secondary_sort_switch', $sortby ) ) {
     234
     235            //Sort using the Secondary filter - Currently defaults to Position, so don't change anything if set to Position
     236            case 'then_sales':
     237                $split = hpy_fdv_multidimensional_sort( $split, 'sales' );
     238                break;
     239
     240            case 'then_id':
     241                $split = hpy_fdv_multidimensional_sort( $split, 'id' );
     242                break;
     243
     244            case 'then_stock' :
     245                $split = hpy_fdv_multidimensional_sort( $split, 'stock' );
     246                break;
     247
     248            default:
     249                $split = apply_filters( 'hpy_fdv_trigger_sort', $split );
     250                break;
     251
     252        }
     253
     254        $attribute_split[$skey] = $split;
     255    }
     256
     257    $attributes = hpy_fdv_array_flatten( $attribute_split );
     258
     259    return apply_filters( 'hpy_fdv_secondary_sort_filter', $attributes );
     260
    266261}
    267262
    268263function hpy_fdv_array_flatten($array) {
    269     if (!is_array($array)) {
    270         return FALSE;
    271     }
    272     $result = array();
    273     foreach ($array as $key => $value) {
    274         if (is_array($value)) {
    275             $result = array_merge($result, $value);
    276         }
    277         else {
    278             $result[$key] = $value;
    279         }
    280     }
    281     return $result;
     264    if (!is_array($array)) {
     265        return FALSE;
     266    }
     267    $result = array();
     268    foreach ($array as $key => $value) {
     269        if (is_array($value)) {
     270            $result = array_merge($result, $value);
     271        }
     272        else {
     273            $result[$key] = $value;
     274        }
     275    }
     276    return $result;
    282277}
    283278
    284279function hpy_fdv_populate_empty_attributes( $attributes, $product ) {
    285    
    286     foreach( $attributes as $a_key => $a_value ) {
    287         if ( empty( $a_value ) ) {
    288             $parent_id = wc_get_product( $product->get_id() )->get_parent_id();
    289             if ( strpos( $a_key, 'pa_' ) !== false ) {
    290                 $attrs = wc_get_product_terms( $parent_id, $a_key, array( 'fields' => 'names' ) );
    291             } else {
    292                 $attrs = hpy_fdv_get_product_attributes( $parent_id, $a_key );
    293             }
    294             $attr = array_shift( $attrs );
    295            
    296             if ( !empty( $attr ) ) {
    297                 $attributes[$a_key] = strtolower( str_replace( ' ', '_', $attr ) );
    298             }
    299         }
    300     }
    301    
    302     return apply_filters( 'hpy_fdv_empty_attribute_return', $attributes );
     280
     281    foreach( $attributes as $a_key => $a_value ) {
     282        if ( empty( $a_value ) ) {
     283            $parent_id = wc_get_product( $product->get_id() )->get_parent_id();
     284            if ( strpos( $a_key, 'pa_' ) !== false ) {
     285                $attrs = wc_get_product_terms( $parent_id, $a_key, array( 'fields' => 'names' ) );
     286            } else {
     287                $attrs = hpy_fdv_get_product_attributes( $parent_id, $a_key );
     288            }
     289            $attr = array_shift( $attrs );
     290
     291            if ( !empty( $attr ) ) {
     292                $attributes[$a_key] = strtolower( str_replace( ' ', '_', $attr ) );
     293            }
     294        }
     295    }
     296
     297    return apply_filters( 'hpy_fdv_empty_attribute_return', $attributes );
    303298}
    304299
    305300function hpy_fdv_get_product_attributes( $product_id, $a_key ) {
    306     $attributes = get_post_meta( $product_id, '_product_attributes', true )[$a_key];
    307    
    308     $attribute_array = array();
    309     if ( !empty( $attributes['value'] ) ) {
    310         $attribute_array = explode( '|', str_replace( ' | ', '|', $attributes['value'] ) );
    311     }
    312    
    313     return $attribute_array;
     301    $attributes = get_post_meta( $product_id, '_product_attributes', true )[$a_key];
     302
     303    $attribute_array = array();
     304    if ( !empty( $attributes['value'] ) ) {
     305        $attribute_array = explode( '|', str_replace( ' | ', '|', $attributes['value'] ) );
     306    }
     307
     308    return $attribute_array;
    314309}
    315310
    316311function hpy_fdv_multidimensional_sort( $array, $check, $attribute = '' ) {
    317312
    318     if ( $check == 'price-low' ) {
    319         usort( $array, 'hpy_fdv_sortByPrice' );
    320     } else if ( $check == 'price-high' ) {
    321         usort( $array, 'hpy_fdv_sortByPriceHigh' );
    322     } else if ( $check == 'position' ) {
    323         usort( $array, 'hpy_fdv_sortByPosition' );
    324     } else if ( $check == 'menu_order' ) {
     313    if ( $check == 'price-low' ) {
     314        usort( $array, 'hpy_fdv_sortByPrice' );
     315    } else if ( $check == 'price-high' ) {
     316        usort( $array, 'hpy_fdv_sortByPriceHigh' );
     317    } else if ( $check == 'position' ) {
     318        usort( $array, 'hpy_fdv_sortByPosition' );
     319    } else if ( $check == 'menu_order' ) {
    325320//        usort( $array, 'hpy_fdv_sortByAttribute', $attribute );
    326321        usort($array, function($a, $b) use ($attribute) {
     
    328323        });
    329324    } else {
    330         usort( $array, 'hpy_fdv_sortByID' );
    331     }
    332    
    333     return apply_filters( 'hpy_fdv_sort_filter', $array );
    334    
     325        usort( $array, 'hpy_fdv_sortByID' );
     326    }
     327
     328    return apply_filters( 'hpy_fdv_sort_filter', $array );
     329
    335330}
    336331
    337332function hpy_fdv_sortByPrice($a, $b) {
    338     return $a['price'] - $b['price'];
     333    return $a['price'] - $b['price'];
    339334}
    340335
    341336function hpy_fdv_sortByPriceHigh($a, $b) {
    342     return $b['price'] - $a['price'];
     337    return $b['price'] - $a['price'];
    343338}
    344339
    345340function hpy_fdv_sortByPosition($a, $b) {
    346     return $a['position'] - $b['position'];
     341    return $a['position'] - $b['position'];
    347342}
    348343
     
    352347
    353348function hpy_fdv_sortByID($a, $b) {
    354     return $a['id'] - $b['id'];
     349    return $a['id'] - $b['id'];
    355350}
    356351
     
    390385add_filter( 'woocommerce_hide_invisible_variations', 'hpy_fdv_hide_invisible_variants' );
    391386function hpy_fdv_hide_invisible_variants() {
    392     return apply_filters( 'hpy_fdv_hide_unavailable_variants', true );
    393 }
     387    return apply_filters( 'hpy_fdv_hide_unavailable_variants', true );
     388}
  • force-default-variant-for-woocommerce/trunk/readme.txt

    r2750805 r2763450  
    11=== WooCommerce Force Default Variant ===
    2 Contributors: HappyKite, morrowmedia, philmorrow
     2Contributors: HappyKite, morrowmedia, philmorrow, obailey
    33Tags: WooCommerce, Variable product, WooCommerce variant, eCommerce
    44Requires at least: 4.2
    55Tested up to: 6.0
    6 Stable tag: 1.6.0
     6Stable tag: 1.6.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3131
    3232== Changelog ==
     33= 1.6.1 - 29th July 2022 =
     34* FIX - Issue in 1.6 that caused Out of Stock variations to appear in WooCommerce Hide Out of Stock setting is ticked.
     35
    3336= 1.6.0 - 1st July 2022 =
    3437* FIX - Sort by Position fixed - This will now correctly sort by the variation order within the Variations tab on each Product page.
  • force-default-variant-for-woocommerce/trunk/woo-force-default-variant.php

    r2750805 r2763450  
    77Author URI: http://www.happykite.co.uk/
    88Text Domain: force-default-variant-for-woocommerce
    9 Version: 1.6.0
     9Version: 1.6.1
    1010WC requires at least: 2.4
    1111WC tested up to: 6.6.1
Note: See TracChangeset for help on using the changeset viewer.