Changeset 2975753
- Timestamp:
- 10/07/2023 01:36:43 AM (2 years ago)
- Location:
- bulky-bulk-edit-products-for-woo/trunk
- Files:
-
- 8 edited
-
CHANGELOG.txt (modified) (1 diff)
-
admin/ajax.php (modified) (1 diff)
-
admin/editor.php (modified) (3 diffs)
-
admin/filters.php (modified) (3 diffs)
-
bulky-bulk-edit-products-for-woo.php (modified) (3 diffs)
-
includes/data.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
support/support.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bulky-bulk-edit-products-for-woo/trunk/CHANGELOG.txt
r2933105 r2975753 1 /** 1.1.5 - 2023.10.07 **/ 2 – Added: Filter multiple SKU with comma separate 3 – Fixed: Sort by SKU 4 1 5 /** 1.1.4 - 2023.07.03 **/ 2 6 – Updated: Compatible with WooCommerce HPOS(COT) -
bulky-bulk-edit-products-for-woo/trunk/admin/ajax.php
r2901636 r2975753 123 123 124 124 $args = [ 125 'posts_per_page' => $settings['products_per_page'],125 'posts_per_page' => 10, 126 126 'paged' => $page, 127 127 'paginate' => true, 128 128 'order' => $settings['order'], 129 'orderby' => $settings['order_by'],129 'orderby' => 'ID', 130 130 'status' => array( 'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit' ), 131 131 ]; 132 132 133 if ( $orderby == 'price' ) { 134 $args['orderby'] = [ 'meta_value_num' => $settings['order'] ]; 135 add_filter( 'woocommerce_product_data_store_cpt_get_products_query', [ $this, 'orderby_price' ] ); 136 } 133 switch ( $orderby ) { 134 case 'price': 135 $args['orderby'] = [ 'meta_value_num' => $settings['order'] ]; 136 add_filter( 'woocommerce_product_data_store_cpt_get_products_query', [ $this, 'orderby_price' ] ); 137 break; 138 139 case 'sku': 140 $args['orderby'] = 'meta_value'; 141 $args['meta_key'] = '_sku'; 142 break; 143 144 default: 145 $args['orderby'] = $orderby; 146 147 break; 148 } 149 150 remove_all_filters( 'woocommerce_product_object_query_args' ); 151 remove_all_filters( 'woocommerce_product_object_query' ); 137 152 138 153 $args = $filter->set_args( $args ); -
bulky-bulk-edit-products-for-woo/trunk/admin/editor.php
r2790645 r2975753 58 58 $full_screen_icon = get_option( 'vi_wbe_full_screen_option' ) ? 'window close outline' : 'external alternate'; 59 59 $full_screen_title = get_option( 'vi_wbe_full_screen_option' ) ? esc_html__( 'Exit full screen', 'bulky-woocommerce-bulk-edit-products' ) : esc_html__( 'Full screen', 'bulky-woocommerce-bulk-edit-products' ); 60 61 add_filter( 'bulky_filter_behaviors_list', [ $this, 'add_sku_behavior' ], 10, 2 ); 60 62 61 63 ?> … … 769 771 ]; 770 772 773 $behaviors = apply_filters( 'bulky_filter_behaviors_list', $behaviors, $id ); 774 771 775 $saved_behavior = $this->filter_saved['behavior'][ $id ] ?? ''; 772 776 ob_start(); … … 803 807 return ob_get_clean(); 804 808 } 809 810 811 public function add_sku_behavior( $behaviors, $id ) { 812 if ( $id == 'sku' ) { 813 $behaviors = [ 'in' => 'In' ] + $behaviors; 814 } 815 816 return $behaviors; 817 } 805 818 } -
bulky-bulk-edit-products-for-woo/trunk/admin/filters.php
r2823303 r2975753 295 295 296 296 $type = $item['type']; 297 $value = sanitize_text_field( wp_specialchars_decode( trim( $item['value']) ) );297 $value = sanitize_text_field( wp_specialchars_decode( trim( $item['value'] ) ) ); 298 298 299 299 $query = ''; … … 357 357 } 358 358 359 $sku = sanitize_text_field( wp_specialchars_decode( trim( $sku) ) );359 $sku = sanitize_text_field( wp_specialchars_decode( trim( $sku ) ) ); 360 360 $sku_condition = ''; 361 361 … … 377 377 break; 378 378 379 case 'like': 380 $sku_condition .= "postmeta.meta_value LIKE '%{$sku}%'"; 381 break; 382 379 383 default: 380 $sku_condition .= "postmeta.meta_value LIKE '%{$sku}%'"; 384 $skus = explode( ',', $sku ); 385 $skus = array_map( 'trim', $skus ); 386 $skus = implode( "','", $skus ); 387 $sku_condition .= "postmeta.meta_value IN ('{$skus}') "; 381 388 break; 382 389 } -
bulky-bulk-edit-products-for-woo/trunk/bulky-bulk-edit-products-for-woo.php
r2933105 r2975753 4 4 * Plugin URI: https://villatheme.com/extensions/bulky-woocommerce-bulk-edit-products/ 5 5 * Description: Bulky - Bulk Edit Products for WooCommerce helps easily work with products in bulk. The plugin offers sufficient simple and advanced tools to help filter various available attributes of simple and variable products such as ID, Title, Content, Excerpt, Slugs, SKU, Post date, range of regular price and sale price, Sale date, range of stock quantity, Product type, Categories.... Users can quickly search for wanted products fields and work with the product fields in bulk. The plugin promises to help users to save time and optimize manipulation when working with products in bulk. 6 * Version: 1.1. 46 * Version: 1.1.5 7 7 * Author: VillaTheme 8 8 * Author URI: https://villatheme.com … … 11 11 * Copyright 2021-2022 VillaTheme.com. All rights reserved. 12 12 * Requires at least: 5.0 13 * Tested up to: 6. 213 * Tested up to: 6.3 14 14 * WC requires at least: 5.0 15 15 * WC tested up to: 7.7 … … 37 37 public $plugin_name = 'Bulky - Bulk Edit Products for WooCommerce'; 38 38 39 public $version = '1.1. 4';39 public $version = '1.1.5'; 40 40 41 41 public $conditional = ''; -
bulky-bulk-edit-products-for-woo/trunk/includes/data.php
r2738966 r2975753 377 377 [ 378 378 'edit_fields' => [], 379 'products_per_page' => 20,379 'products_per_page' => 10, 380 380 'load_variations' => 'yes', 381 381 'order_by' => 'ID', -
bulky-bulk-edit-products-for-woo/trunk/readme.txt
r2933105 r2975753 261 261 == Changelog == 262 262 263 /** 1.1.5 - 2023.10.07 **/ 264 – Added: Filter multiple SKU with comma separate 265 – Fixed: Sort by SKU 266 263 267 /** 1.1.4 - 2023.07.03 **/ 264 268 – Updated: Compatible with WooCommerce HPOS(COT) -
bulky-bulk-edit-products-for-woo/trunk/support/support.php
r2933105 r2975753 1019 1019 1020 1020 case 'install': 1021 $this->notices[] = sprintf( "%s to be installed. < a href='%s' target='_blank' class='button button-primary' style='vertical-align: middle'>Install %s</a>",1021 $this->notices[] = sprintf( "%s to be installed. <br><a href='%s' target='_blank' class='button button-primary' style='vertical-align: middle; margin-top: 5px;'>Install %s</a>", 1022 1022 esc_html( $require_plugin_name ), 1023 1023 esc_url( ! empty( $status['url'] ) ? $status['url'] : '#' ), … … 1038 1038 ); 1039 1039 1040 $this->notices[] = sprintf( "%s is installed and activated. < a href='%s' target='_blank' class='button button-primary' style='vertical-align: middle'>Active %s</a>",1040 $this->notices[] = sprintf( "%s is installed and activated. <br> <a href='%s' target='_blank' class='button button-primary' style='vertical-align: middle; margin-top: 5px;'>Active %s</a>", 1041 1041 esc_html( $require_plugin_name ), 1042 1042 esc_url( $activate_url ),
Note: See TracChangeset
for help on using the changeset viewer.