Skip to content

Instantly share code, notes, and snippets.

@tuongpgjz
Last active February 23, 2022 04:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuongpgjz/9e5fab6c3186b8d5d010518b4e213f16 to your computer and use it in GitHub Desktop.
Save tuongpgjz/9e5fab6c3186b8d5d010518b4e213f16 to your computer and use it in GitHub Desktop.
Force related product by tags instead of category on Woocommerce
<?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