I think this hook fits your cause much better:
add_filter ('woocommerce_register_post_type_product', 'my_callback');
function my_callback ($args) {
$args ['query_var'] = false;
return $args;
}
not tested, but should work.
Related Posts:
- Attach a Custom Post Type to a Woocommerc product as a variation or add-on [closed]
- Exclude a term of a taxonomy with a custom post type in a search
- How to solve suspected memory issue in custom WordPress loop?
- Query for posts from any post type but only add instock products
- WooCommerce – Show orders for a specific product ? [closed]
- Set meta_query only for specific post type
- get_terms won’t display product_cat or any other custom taxonomies when specified
- Woocommerce query specific product from specific category
- Problem adding column to WC Subscription [closed]
- Create custom post type on successful woocommerce order [closed]
- how to get URL of media uploaded to WordPress via media_handle_sideload()
- How to display product subcategories into my custom post type single page
- Get post from custom post type order by two taxonomies
- changing meta value and meta key of price field
- Woocommerce search pagination not working
- WooCommerce Customer Role Delete Custom Post Type
- WooCommerce sort products by the actual product width(not the shipping width)
- Manage custom post type in woocommerce /my-account/ page
- Woocommerce custom field search in custom post type [closed]
- Hide a widget inside a div on specific type of post
- Allow add new post access to custom post but not wp post for some role
- How to Get WordPress custom post data in WooCommerce product meta panel? [closed]
- Display Woocommerce Orders for specific author [closed]
- Sort posts in loop by the WooCommerce Membership of the author
- How to set up Custom Post Type archive page as Front page
- Copy order items with metadata between orders – Woocommerce
- Update Post Status On Woocommerce Payment Complete
- Get all post from a post type
- Custom Post Type to replace Woocommerce products – page not found error
- CPT as Product in WooCommerce
- Change permalink for custom_post_type using custom_post_meta (woocommerce)
- Blank search results on custom search
- Get Terms from Custom Taxonomy and Current Post
- Is it a connection or relationship between 2 custom post types?
- Custom Post type to Woocommerce Product type
- How to display related posts using the same taxonomy for custom types (WordPress, Pods, Woo)
- How to display custom field in product description?
- Add two custom product type
- Duplicate the “Orders” list on Admin Page
- What’s the best way to do this: inquiry/ticket system?
- Sudden 404 pages on product category archives
- WordPress shortcode to pull product post data
- ‘Simple’ Reservation System
- Change display of product price on product show page only
- edit.php all post not working
- How to show link to product in custom fields?
- add action save post type and update post meta woocommerce
- WooCommerce – Custom related product (Spareparts)
- Convert attribute woocommerce terms (taxonomy terms) in posts of custom post type
- WooCommerce change
- WooThemes – Vendors / Bookings – Allow Vendors to manage resources
- Search in multiple specific post types
- woocommerce post_type conflict with existing post type
- Custom Taxonomy not working front side Woocommerce
- WooCommerce breadcrumb display custom posts instead of product data
- Custom Taxonomy is disabled on Edit page
- CPT or Custom Table for Repository of Serial Numbers
- Get Non-Paginated Index of Post in Paginated Query
- Complex strcuture as CPT or taxonomy for use in woocommerce product variations [closed]
- Custom Search Template for Custom Post Types
- WP_Query wooCommerce category
- WooCommerce – Complete Order when an action occurs
- How to manage a bookstore
- Issue On Listing Woocommerce Parent Tag List
- Create a WordPress Database query to find users who purchased specific product through WooCommerce [closed]
- WordPress Custom Post Types with a page as a parent?
- Custom post type URL with post ID that allows archiving and paging
- Page is defaulting to archive page and not designated template
- WordPress Custom Post Type Category Page
- Exclude post_type from admin comments_list
- Redirect a page based on last word in slug
- How to query different post types in specific order?
- How to make sure content doesn’t display if selection is empty
- Categories sorting
- Wp_query: sort by PHP variable
- Add tag to a custom post type doesn’t change the total of custom post type in backend
- How to display error message in password protected form using ajax jQuery?
- How to Create Columns with WordPress and CPTUI display page ?
- Add custom column to post list table
- Retrieve custom post types by custom taxonomies with WP_Query
- Custom taxonomy wp_query woes.
- Change custom taxonomy archive permalink
- Custom Post type loop with ACF not displaying properly
- Use different post formats on different post types
- How to display custom post type only on a certain page?
- Cannot upload featured image to a custom post type
- Custom post pagination trouble
- Custom post type post in custom menu
- Does “Custom Post Type” can have page hierarhy option?
- Retrieve posts by author
- Question about link two types of data in wordpress
- How to mass get post editor URLs
- Metabox is not saving
- WPML – Auto Duplicate Post Issue
- How do display gallery embedded to the custom post type
- Trying to access custom post redirects to home page
- Archive Page Pagination not working
- Missing categories for Custom Taxonomy and Custom Posts
- pre_get_posts causes Custom Posts appear under ‘Pages’ menu
- Categorizing Custom Posts in Bulk Based on Title