Last active
February 23, 2022 04:27
-
-
Save tuongpgjz/9e5fab6c3186b8d5d010518b4e213f16 to your computer and use it in GitHub Desktop.
Force related product by tags instead of category on Woocommerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Do not copy this line to your functions.php of theme | |
//copy from here then paste into functions.php of theme | |
add_filter( 'woocommerce_product_related_posts_relate_by_category', 'salesgen_product_related_posts_relate_by_category' ); | |
function salesgen_product_related_posts_relate_by_category(){ | |
return array(); | |
} | |
/* =========================== */ | |
// Author: Anthony from SalesGen.io | |
// Get WooCommerce Upsell plugin from https://salesgen.io/upsell-blast-upsell-machine/ | |
// Discount buy more save more | |
// upsell/cross-sell automatic by tabs, category ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment