Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Limit results to current user only (orders page)
Hi all, I'm desperately trying to tweak woocommerce to to one unusual thing : allow customers (more like partners) to search and delete orders. The website is not about selling stuff, it's a tool for partners to generate quotes for their customers and those partners want some control. My idea was to give them a limited access to the WP backend as the admin orders page would be perfect for them. It's editable and searchable BUT it displays ALL the shop orders and I want to limit the results to only the currently logged user's orders. In the URL I saw that the called post type for this page is "shop_order" and I thought that tweaking with the "class-wc-post-types.php" file would be a good start but I'm no developper. Is there a parameter that I can add to the wc_register_order_type('shop_order' section ? If not any other suggestion ? Thanks in advance