Launch offer
Business website $150 USD Custom plugin $200 USD Ready in 5 days
Get a quote
WooCommerce Plugin Development

Nonces and Permissions in Woo Plugins

Protect admin/AJAX/REST actions with nonces and manage_woocommerce-style caps.

Nonces and Permissions in Woo Plugins — a practical guide to WooCommerce nonce capabilities with clear examples you can reuse in real projects.

WooCommerce Plugin Development Series (81/101). Prefer one article? Read the complete WooCommerce plugin development tutorial.

Short description

Use `manage_woocommerce`, `edit_shop_orders`, etc. instead of only `manage_options` when appropriate.

Permission check

if (! current_user_can('manage_woocommerce')) {
    wp_die('Forbidden');
}
check_admin_referer('acme_woo_save');

Leave a reply

Your email address will not be published. Required fields are marked *