Skip to content
Advertisement

Tag: woocommerce

Allow access to any order on front-end on WooCommerce

My goal is to allow certain role to view any order in shop. While displaying all orders in “My Account” page is relatively easy, accessing particular order created by different user always ends up with “Invalid order. My account” error. So far I have added custom query on woocommerce_my_account_my_orders_query filter, so that one can view all orders made by accounts

use custome zone in woocommerce in wordpress plugin development

so this is my code and add_filter( ‘woocommerce_states’, ‘woo_custom_shipping_zones’ ); its not working inside in my function but if i put it outside and reactivate my plugin its working how can use this filter inside the function? Answer You could use Wordpress options to solve the problem: The code should work. Add it to your active theme’s functions.php.

Advertisement