ast_open_inline_tracking_form_fun permission hook | WordPress.org

[ad_1]

In some AST methods, the user needs “manage_woocommerce” permission in order to add tracking to a shipment.

This is WAY overkill as there is a permission for “edit_shop_orders”. We shouldn’t need to grant such broad ranging permission to add tracking to orders.

Please change the permissions need to add shipping to orders to “edit_shop_orders” or provide a filter for changing the permission needed.

Line 490 of /wp-content/plugins/woo-advanced-shipment-tracking/includes/class-wc-advanced-shipment-tracking-settings.php

if ( ! current_user_can( ‘edit_shop_orders’ ) ) {
exit( ‘You are not allowed’ );
}

or change current_user_can calls to use a filter/method that implements a filter

Thank you

  • This topic was modified 5 hours, 49 minutes ago by midwestE.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer