Update 2.0.6 - BEAR - WooCommerce Bulk Editor and Products Manag
[/] Home FAQ Documentation Video Downloads Support More Pre-sale questions Translations Compatibility Changelog Sitemap Get More Tools BEAR - WooCommerce Bulk Editor and Products Manager Professional Home News Info Update 2.0.6 June 18, 2020, Updated : March 3, 2021 Small fixes Some customers ideas In filter added ability to filter products by its empty fields Added Filter by range of the products count in stock: stock quantity from - stock quantity to New option ' Add fields to the quick search ' - Adds more fields to quick search fields drop-down on the tools panel. Works only for text fields. Syntax : post_name:Product slug,post_content: Content. The same is possible to realize with hook: woobe_quick_search_options add_filter('woobe_quick_search_options', function($filters) { $filters['post_name'] = 'Post slug'; $filters['post_content'] = 'Content'; return $filters; }); 1 2 3 4 5 add_filter ( 'woobe_quick_search_options' , function ( $ filters ) { $ filters [ 'post_name' ] = 'Post slug' ; $ filters [ 'post_content' ] = 'Content' ; return $ filters ; } ) ; New hook ' woobe_before_update_product_field ' which adds ability to make any custom operations with field new value before its updating: add_filter('woobe_before_update_product_field', function($value, $product_id, $field_key) { //$condition= your code here //example if ($field_key === 'post_title' AND $condition) { $value .= " Some text"; } return $value; }, 10, 3); 1 2 3 4 5 6 7 8 9 10 11 add_filter ( 'woobe_before_update_product_field' , function ( $ value , $ product_id , $ field_key ) { //$condition= your code here //example if ( $ field_key === 'post_title' AND $ condition ) { $ value . = " Some text" ; } return $ value ; } , 10 , 3 ) ; New hook ' woobe_user_can_edit ' - for control the ability of editing fields depending of the user/role. add_filter('woobe_user_can_edit', function($is_forbidden, $field_key, $shop_manager_visibility_array) { $user = wp_get_current_user(); //print_r($shop_manager_visibility_array); if (in_array('author', (array) $user->roles)) { if ($field_key == 'sku') { $is_forbidden = 1; } } return $is_forbidden; }, 10, 3); 1 2 3 4 5 6 7 8 9 10 11 add_filter ( 'woobe_user_can_edit' , function ( $ is_forbidden , $ field_key , $ shop_manager_visibility_array ) { $ user = wp_get_current_user ( ) ; //print_r($shop_manager_visibility_array); if ( in_array ( 'author' , ( array ) $ user - > roles ) ) { if ( $ field_key == 'sku' ) { $ is_forbidden = 1 ; } } return $ is_forbidden ; } , 10 , 3 ) ; New hook ' woobe_filter_include_children ' - Include child terms in filter results. By default if to filter by any term will be found products with this selected term and will be not found another products even if they has any child of this selected parent term. add_filter('woobe_filter_include_children', function($include, $tax) { $alow = ['product_cat', 'pa_color']; if (in_array($tax, $alow)) { $include = true; } return $include; }, 10, 2); 1 2 3 4 5 6 7 8 9 add_filter ( 'woobe_filter_include_children' , function ( $ include , $ tax ) { $ alow = [ 'product_cat' , 'pa_color' ] ; if ( in_array ( $ tax , $ alow ) ) { $ include = true ; } return $ include ; } , 10 , 2 ) ; New hook ' woobe_show_tabs ' - to exclude tabs for specific users/roles add_filter('woobe_show_tabs', function ($show, $slug) { $rules = array('settings', 'meta', 'info'); if (!current_user_can('administrator') AND in_array($slug, $rules)) { $show = false; } return $show; }, 99, 2); 1 2 3 4 5 6 7 8 add_filter ( 'woobe_show_tabs' , function ( $ show , $ slug ) { $ rules = array ( 'settings' , 'meta' , 'info' ) ; if ( ! current_user_can ( 'administrator' ) AND in_array ( $ slug , $ rules ) ) { $ show = false ; } return $ show ; } , 99 , 2 ) ; New hook ' woobe_set_per_page_values ' allows to set values to set products count per page. Be care with big values ( memory overflow ) add_filter('woobe_set_per_page_values', function($add) { return '10,30,100,150,200'; }); 1 2 3 add_filter ( 'woobe_set_per_page_values' , function ( $ add ) { return '10,30,100,150,200' ; } ) ; Export to XML Prev: "Update 2.0.5" Get BEAR on: Questions? Get Answers! Our team specializes in development of WordPress and WooCommerce plugins. Information About us Contact Us Changelog Sitemap Privacy Policy Help Downloads Documentation FAQ Support News You may be interested in: © 2012 - 2021 with by PluginUs.NET . All rights reserved. We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it. Ok Read more