As per this post (https://stackoverflow.com/questions/43621049/woocommerce-multiple-single-product-templates-using-single-product-php-to-redire) I would update your code to look like this:
function so_43621049_template_include( $template ) {
if ( is_singular('product') ) {
$template = plugin_dir_path( __FILE__ ).'woocommerce/single-product.php';
}
return $template;
}
add_filter( 'template_include', 'so_43621049_template_include', 20 );
I haven’t had a chance to test this but I believe it will work.
Related Posts:
- Order by rating not works in wp_query
- WooCommerce: Add New Report Tab
- Change WooCommerce Image Size in One Product CAtegory
- Is there a way to get customers logged out without calling wp-login.php?
- How to filter Post using Meta Data REST API
- WooCommerce checkout: How can I change $field_container of a checkout field?
- Woocommerce Shop Price Position
- How to disable users from editing billing address in WooCommerce checkout?
- Move WooCommerce product tabs out of the tabs [closed]
- Is it possible to recalculate cart prices? [closed]
- Woocommerce: Get Cart ID
- Woocommerce – remove sale price field from dashboard [closed]
- Show add to cart button on shop woocommerce
- How do I hide the purchase note in the WooCommerce ‘order completed’ email?
- Woocommerce – Override the default templates location under the theme directory
- How to hide out of stock products in Related Products via custom query in WooCommerce
- Changing Woocommerce language without changing the language in Dashboard admin WordPress
- WooCommerce Country Drop Down colours CSS [closed]
- Fatal error: Call to undefined method WooCommerce::nonce_field()
- Where do I find where woocommerce stores product data in cpanel file manager?
- Woocommerce wp-admin search products through custom meta value too
- show shop instead of 404 page for missing products
- if statement for search results
- Function to recalculate shipping costs on subscriptions after renewal with Automatewoo
- Creating a multisite registration form that also creates a woocommerce post
- Server-Based CRON Job
- How to incluide custom field in WooCommerce email using placeholder
- Woocommerce: Can’t put items in cart in iframe and on iphone
- How to show tag count for individual product post in wordpress woocommerce
- Checkout is blocked with blockUI when using action woocommerce_cart_calculate_fees
- Checkout form looks terrible [closed]
- How to upload multiple image using wp_insert_post
- How can i manage total price in checkout page? [closed]
- In WooCommerce product archive, how can you also set the quantity to be added to cart by typing, instead of just by using +/-?
- API returns blank response after installing & uninstalling WP-rest-api plugin
- Tried to create a user role that can only edit user information, but my test account cannot view the dashboard. What am I missing?
- Filtering variable WooCommerce products by stock level using meta_query
- How can I run a multi language WordPress site in two folders in one install? [closed]
- Dropdown menu not displaying WordPress
- Redirect no product url’s to static url
- Adding a custom Shipping methods field to an order
- WooCommerce – Create multiple product tags via rest api endpoint
- WooCommerce which roles and capabilities control user login re-direct to Woo Account Page?
- how do i remove a woo-commerce widget?
- How can I convert woocommerce checkout fields in capital letters
- Conditional action hook
- Sending Email upon registration
- Migrating data from Woocommerce to another webapp
- Options to develop a non-ecommerce catalog?
- wp_set_object_terms setting only first id from array
- I need to export all products and images but I don’t know which table the images are in
- Add only sku to product url woocoomerce
- What is better way to sync wp multisite woocommerce products
- Remove required from a custom field created from WooCommerce Checkout Field Editor plugin
- Purchase/order statistics plugin for viewing per payment menthod?
- Displaying Woocommerce Product Attributes on single product page
- WooCommerce – Child Category wont show, but Parent does
- How to hide a random text with a div tag using a class on product pages with a specific tag
- Categories on attribute archive pages
- How to solve `Error getting remote image` in woocommerce rest api script?
- Woocommerce digital download not working – database error Cannot add or update a child row: a foreign key constraint fails [closed]
- How to force Woocommerce to deliver the product to the paypal adress which was used?
- Add username and password section in WooCommerce’s my account page
- Recently viewed products – Order by viewed
- How can i add product Accessories from front-end using custom php form?
- How to save order item custom attributes save into custom table
- Woocommerce: Search by custom attribute
- How to change user role after login?
- WooCommerce free shipping twice a week
- Product overlapping header
- merge tabs in woocommerce
- How to import products to Woo Commerce given that WP All Import keeps timing out
- WooCommerce subscriptions give option of manual renewal on checkout [closed]
- How to make a custom redirect in WooCommerce?
- Firstname and lastname greyout or hidden Billing details at next checkout like username is hidden [closed]
- How to use woo commerce login to authenticate code php pages?
- Change order status after checkout
- Is it safe to update an old site after backing it up and activating a child theme?
- how to add custom reviews button in woocommerce order complete generated mail
- Click Count on Download a File
- How to add coupon expiry date into the followup emails?
- Disable Woocommerce main shop page, but not the product category archive pages
- Not all strings are translated
- Custom Woocommerce checkout filed yields a Json error when validating [closed]
- access Woo commerce | WordPress methods externally
- How to display Woocommerce catagories
- Woocommerce set single city to sell to
- Trying to link to a custom css file in a new folder
- eCommerce solution doesn’t want to display its shortcodes or any content where it’s set to [closed]
- Woocommerce hidden fields with meta keys and values. how?
- How do I make a diagonal strikethrough on wordpress? [closed]
- Woocommerce – Remove ‘Buy Product’ Button from shop page [closed]
- Add woocommerce.css in template?
- registration_errors not working
- Translate Woocommerce tab
- Woocommerce -> gallery images per variation without a plugin? [closed]
- Why is my WordPress admin not working
- Create bookings after subscription renewal
- Change variants URL
- Hook for Woocommerce checkout fields