1. I want to add the woocommerce clients as people who can publish calendars both from frontend and also admin.
Searched through codecanyon answers, and found I must edit abstract.plugin.php in your plugin, and "replace edit_posts" with "read" for user permissions both at line 11 and 104.
The solution works, is just what I wanted, however please guide me also to solve the two problems below (again, for woocommerce clients that will be the only wordpress users except admins on the website).
2. How can the woocommerce clients also sell tickets through your plugin? Probably another .php file must be edited in your plugin...
3. How can the woocommerce clients edit / delete only their own events? I tried this solutin (again, searched through codecanyon comments) but to no end result:
// Super admin sees everything if (is_super_admin()) { return $events; }
// Show only own events foreach ($events as $k => $event) { if ($event->get_author() !== get_current_user_id()) { unset($events[$k]); } }
return array_values($events); });
Please consider a solution that solves all three problems above concurrently. Maybe the solution at problem 1 (that works) is not compatible with what you are thinking of solving for me (problems 2 and 3).
Hello!
1. I want to add the woocommerce clients as people who can publish calendars both from frontend and also admin.
Searched through codecanyon answers, and found I must edit abstract.plugin.php in your plugin, and "replace edit_posts" with "read" for user permissions both at line 11 and 104.
The solution works, is just what I wanted, however please guide me also to solve the two problems below (again, for woocommerce clients that will be the only wordpress users except admins on the website).
2. How can the woocommerce clients also sell tickets through your plugin? Probably another .php file must be edited in your plugin...
3. How can the woocommerce clients edit / delete only their own events? I tried this solutin (again, searched through codecanyon comments) but to no end result:
add_filter('stec_admin_get_events', function($events) {
// Super admin sees everything
if (is_super_admin()) {
return $events;
}
// Show only own events
foreach ($events as $k => $event) {
if ($event->get_author() !== get_current_user_id()) {
unset($events[$k]);
}
}
return array_values($events);
});
Please consider a solution that solves all three problems above concurrently. Maybe the solution at problem 1 (that works) is not compatible with what you are thinking of solving for me (problems 2 and 3).
Thanks.
Hi,
What wordpress user role your clients have?
Stachethemes Developer
Woocommerce customer role is the only client / user role on the website, except wordpress admin
https://docs.woocommerce.com/document/roles-capabilities/
1) Remove any changes you've done to the calendar's core files.
2) Add following filters in your theme or child-theme functions.php file.
Keep in mind giving access to back-end poses security risks.
Stachethemes Developer