Forum Replies Created
-
AuthorPosts
-
Vladimir
KeymasterJawad,
I found and fix the reported issue with PHP notice from admin-menu-access.php. I will publish it with the next update in 1-2 weeks.
Vladimir
KeymasterHi Jawad,
Thanks for the feedback. I very appreciate your help in making URE Pro better.
I can repeat the PHP notice from the admin-menu-access.php using your recent information.
I will develop a fix.Vladimir
KeymasterHi Jawad,
This post describes how to use
woocommerce_duplicate_product_capability
filter.What settings did you make in “Admin Menu” for the “Vendor” role, for which PHP notices are generated? Please show a screenshot.
Vladimir
KeymasterHi Jawad,
Metaboxes:
1) I found a bug in URE Pro with WC Vendors activated. Quick fix:
open user-role-editor-pro/includes/pro/classes/meta-boxes.php
and replaceupdate_meta_boxes_list_copy()
function at line #33 with this versionpublic function update_meta_boxes_list_copy() { global $wp_meta_boxes; if (empty($wp_meta_boxes) || self::$meta_boxes_list!=null) { return; } self::$meta_boxes_list = get_option(self::META_BOXES_LIST_COPY_KEY, array()); foreach($wp_meta_boxes as $screen=>$contexts) { foreach($contexts as $context=>$priorities) { foreach($priorities as $priority=>$meta_boxes) { foreach($meta_boxes as $meta_box) { if (empty($meta_box) || !isset($meta_box['id'])) { continue; } $mb = new StdClass(); $mb->id = $meta_box['id']; $mb->title = $meta_box['title']; $mb->screen = $screen; $mb->context = $context; $mb->priority = $priority; $mb_hash = md5($mb->id . $mb->screen . $mb->context); self::$meta_boxes_list[$mb_hash] = $mb; } } } } update_option(self::META_BOXES_LIST_COPY_KEY, self::$meta_boxes_list); } // end of update_meta_boxes_list_copy()
where this condition was added:
if (empty($meta_box) || !isset($meta_box['id'])) { continue; }
After this reopen Coupon editor page and you will find at User Role Editor -> Meta Boxes needed metaboxes from Coupon editor page.
Revolution Slider adds its options meta box for the posts only by default. So I can not test it myself for coupons. I suppose that some plugin or theme makes that at your installation. But URE processes a ‘Revolution Slider Options’ meta box from post editor normally, so you should see it for coupons too.
Let me know the result. Thanks.
Vladimir
KeymasterHi,
Plugin is fully functional and don’t need additional activation. Valid license key allows to get automatic updates from role-editor.com. Without Internet connection you have to update it manually.
Vladimir
KeymasterThanks for letting me know.
Vladimir
KeymasterHi Jawad,
1) By default WooCommerce allows to duplicate products to the user with ‘manage_woocommerce’ capability. User without this capability does not see the ‘Duplicate’ link. I think that if user should have read-only access to the Products, then ‘manage_woocommerce’ is not required for him. So remove it from his role.
If you need to change this capability to the custom one, you may use'woocommerce_duplicate_product_capability'
filter for that.2) I do not have any meta boxes except ‘Coupon Data’ with WooCommerce and Rev. Slider only installed. I suppose you have some other active plugin, which adds sections from the screenshot to the Coupon editor page. I need to know what plugin does that.
3) Try to deactivate/activate back user role editor plugin. Open User Role Editor – ‘Admin Menu’ for that role and re-save it.
Vladimir
KeymasterWhat is set for this user role at ‘Admin Menu’ module? Show a screenshot.
Vladimir
Keymaster– Go to “Network Admin->Users”.
– Select user, click ‘Capabilities’ under his row.
– Click ‘Network Update’.Pay attention that role and capabilities (assigned to the user) are shown here for the main site. So before replicate user to the full network assign him needed permissions for the main site.
Vladimir
KeymasterHi Jawad,
1) User can not see the list of products without ‘edit_products’ capability. So if you have activated with URE ‘create’ capability, giving user ‘read’, ‘edit_products’ may be enough to get a ‘read-only’ access’ to the list of products with assumption that this user did not created any product. He can not created a new product, he can not edit products created by others, he can not edit published products. Be aware that user should have at least ‘edit_posts’ or ‘manage_woocommerce’ capabilities or special filter should be set to give him access to the admin back-end.
2) I confirm the issue with ‘Products->Attributes’ access by direct link. I will investigate and fix this bug.
3) Let me know what additional plugin do you use. I installed ‘Revolution Slider’ but don’t see any additional meta box at WooCommerce Coupon edit page.
Vladimir
KeymasterHi,
Currently there is no such feature in URE – setup view restriction on the category level. Thanks for the good suggestion. I will look how to realize it.
Vladimir
KeymasterHi,
Is this user an author of this post? If he is not, ‘edit_others_posts’ capability is required.
This module does not give new permissions to the user. It just restricts the existing permissions.
Meta box at the bottom of the post is related to ‘view’ permission for this post at front-end. If you plan to show this post not to the pepperRole only, you don’t need to setup this view restriction.
Vladimir
KeymasterJawad,
Quick fix is open includes/pro/classes/meta-boxes.php file and replace 11 priority at lines 26,27,28 to the 99, like this
add_action('add_meta_boxes', array($this, 'remove_blocked_metaboxes'), 99); add_action('wp_dashboard_setup', array($this, 'remove_blocked_metaboxes'), 99); add_action('wp_user_dashboard_setup', array($this, 'remove_blocked_metaboxes'), 99);
As I discovered WooCommerce added its metaboxes with 20 and 30 priorities. So we should use higher priority to remove them later than they were added.
Vladimir
KeymasterJawad,
Please ignore my ask to send me debug information about meta boxes. I found that post edit page (including one belongs to WooCommerce) may contain an empty meta box data. I will update URE’s code for this case.
Vladimir
KeymasterWhen you said ‘Edit posts restrictions’ did you mean
I meant this add-on activated and its settings made at user profile:
Notice: Undefined index: id in /wp-content/plugins/user-role-editor-pro/includes/pro/classes/meta-boxes.php on line 46
It’s not error, just notice. If you set WP_DEBUG to false at wp-config.php file, this message will not be shown.
I can not repeat this. Every meta box should have ID. URE goes through the full list of meta boxes available at this page here. So you have some strange metabox.You may help if you open includes/pro/classes/meta-boxes.php file and insert at line 39:
var_dump($wp_meta_boxes); die;
Open ‘Add Order’ page, copy output and send it to support [at-sign] role-editor.com
Then remove this debug code.if I enable ‘delete_product’ should I also enable ‘delete_products’
I wrote above that it’s not required to include meta capability like ‘delete_product’ directly to the role. It’s enough ‘delete_products’. But WooCommerce does this for its own roles, like ‘Shop Manager’. So repeat it too, include both.
-
AuthorPosts