wp-admin

Set the product type to “variable” by default in admin new product pages

微笑、不失礼 提交于 2021-01-28 05:40:59
问题 I'm creating a WooCommerce store with variable products only. When creating new products I always need to manually change the Product Data to Variable Product. When you have hundreds of products, this is becoming kind of a pain :) I've searched around the Internet but wasn't able to find anything... <php? // Code here ?> I'm looking for a PHP snippet to set Variable Product as default when creating new products, any ideas? 回答1: Updated - The following code will select "variable" by default on

Add a custom taxonomy filter after product category filter in Woocommerce Admin products list

你离开我真会死。 提交于 2019-12-12 07:04:27
问题 In my woocommerce storefront child theme, I have added several taxonomies. Now I would like to add a few category filters for those custom taxonomies. I have added such a filter using this code (credit: Rodolfo Melogli) add_filter( 'woocommerce_product_filters', 'admin_filter_products_by_din' ); function admin_filter_products_by_din( $output ) { global $wp_query; $output .= wc_product_dropdown_categories( array( 'show_option_all' => 'All DIN/ISO/ANSI', 'taxonomy' => 'din-iso-ansi', 'name' =>

How can I move admin menu top-level items to submenu

独自空忆成欢 提交于 2019-12-11 14:32:38
问题 I'm using the code at https://markwilkinson.me/2014/11/altering-wordpress-admin-menus/ to change plugin-created top-level admin-menu items to submenu items of a 'misc' top-level item. It works fine on those items which don't have their own submenu, but on items which have their own submenu the submenu disappears. I don't know if the code can be appropriately modified, or if it can how to do it. 回答1: Wordpress does not allow you to add a 3rd level of menus in WP admin. See the answer to How to

Wordpress login page redirecting to Woocommerce My-Account Page for Normal Users

心已入冬 提交于 2019-12-06 09:49:14
问题 I am in a deep trouble. Please help me to find a solution for the following. I have wordpress site which uses Woocommerce Plugin. Normally Woocommerce doesn't allow normal Users (Customer,User - These are roles that you can Select from Wordpress Admin Area > Add new User > Role). The problem is that only Administrator(Role) privilege guys have the access to see the Admin area dashboard and full settings. I need all users to enter into dashboard area without redirecting to my-account page .

Wordpress login page redirecting to Woocommerce My-Account Page for Normal Users

人盡茶涼 提交于 2019-12-04 16:26:43
I am in a deep trouble. Please help me to find a solution for the following. I have wordpress site which uses Woocommerce Plugin. Normally Woocommerce doesn't allow normal Users (Customer,User - These are roles that you can Select from Wordpress Admin Area > Add new User > Role). The problem is that only Administrator(Role) privilege guys have the access to see the Admin area dashboard and full settings. I need all users to enter into dashboard area without redirecting to my-account page . Because now when users with Role Customer or something like, tried to enter login credentials of admin,