Forum Replies Created
-
AuthorPosts
-
usevincParticipant
Yes it all works great in the end. Thank you so much for all your support, Vladimir. =)
Finally, some of the wordpress plug-ins I’ve used as a WordPress User Role Editor before. Adminimize, User Roles and Capabilities, Members, Capability Manager Enhanced, WPFront. But none of them had as detailed and quality product support as the User Role Editor Pro plugin. If you like the User Role Editor plugin and you want to buy it, you can click on one of the links to User Role Editor Pro or WordPress User Roles And Capabilities Manager. Thank you again for everything, Vladimir. 🙂
add_filter('woocommerce_product_data_tabs', 'block_wc_product_tabs'); function block_wc_product_tabs($tabs) { if (!current_user_can('wc_product_vendors_admin_vendor', 'wc_product_vendors_manager_vendor', 'wc_product_vendors_pending_vendor', 'shop_manager', 'customer', 'subscriber', 'employer', 'editor', 'contributor', 'author')) { // replace role/roles ID with your own return $tabs; } remove_action( 'woocommerce_product_write_panel_tabs', array( $GLOBALS['Product_Addon_Admin'], 'tab' ) ); //If you do not use WooCommerce product add-ons, delete this line starting with the "remove_action" section. // If you want to restrict in the following woocommerce tabs, add "//" at the beginning of the line. Example: // unset ($ tabs ['general']); unset($tabs['general']); unset($tabs['inventory']); unset($tabs['shipping']); unset($tabs['linked_product']); unset($tabs['attribute']); unset($tabs['variations']); unset($tabs['advanced']); unset($tabs['wc_pao_params']); return $tabs; }
usevincParticipantI’m sending the Gdrive link I’ve authorized for your email address to your “[email protected]” email address. Thank you for your time and effort, Vladimir. =)
usevincParticipantOf course!
usevincParticipantI’ve reviewed Product Add-ons and woocommerce plug-in files. I’ve tried every possible and more name I’ve listed below. But unfortunately it doesn’t work. I don’t know what the problem is, I can’t figure it out. Help me please. 🙁
unset($tabs[‘wc_pao_params’]);
unset($tabs[‘wc_pao’]);
unset($tabs[‘woocommerce_product_addons’]);
unset($tabs[‘woocommerce-product-addons’]);
unset($tabs[‘product_page_addons’]);
unset($tabs[‘product_addons’]);
unset($tabs[‘product_add-ons’]);
unset($tabs[‘product_add_ons’]);
unset($tabs[‘_product_addons’]);
unset($tabs[‘global_product_addon’]);
unset($tabs[‘addons’]);
unset($tabs[‘addon’]);
unset($tabs[‘add-ons’]);
unset($tabs[‘Add-ons’]);
unset($tabs[‘_wc_pao_addon’]);
unset($tabs[‘_wc_pao_addon_value’]);usevincParticipantEverything looks great, Vladimir. However, I cannot remove the woocommerce product add-ons tab. I added it to the bottom of the tabs to be restricted, but it didn’t work. What should I do, I’d appreciate it if you could help. THANK YOU! =)
unset ($ tabs [ ‘woocommerce-product-addons’]);
And I tried that.
unset ($ tabs [ ‘add-ons’]);
usevincParticipantOh, my God … I searched in the forum with the words “role-based restriction” and “product data tabs” but I couldn’t find it. That’s a great plugin, brother. Thank you! 😉 =)
usevincParticipant[/user_role_editor]
I’m sorry the short code closure code will be like this. I copied the sample incorrectly.
I’m waiting for your help to solve the problem, thank you.
-
AuthorPosts