Skip to content

Instantly share code, notes, and snippets.

@DxDiagDx
Created August 4, 2020 20:24
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 DxDiagDx/951ebd3bec0e2fd9fbd18458d2d818fc to your computer and use it in GitHub Desktop.
Save DxDiagDx/951ebd3bec0e2fd9fbd18458d2d818fc to your computer and use it in GitHub Desktop.
Woo: условие вывода для похожих товаров
add_filter( 'woocommerce_variable_price_html', 'bbloomer_remove_variation_price', 10, 2 );
function bbloomer_remove_variation_price( $price ) {
global $woocommerce_loop;
if ( is_product() && $woocommerce_loop['name'] == 'related' ) {
$price = '';
}
return $price;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment