我有2种变化的产品。我想隐藏元素的一种变化。我找到一个代码:
add_action( 'woocommerce_single_product_summary', 'hide_element', 8 );
function hide_element() {
global $product;
if( $product->is_type('variable') ) {
?>
<style> .wc-pao-addon { display: none; } </style>
如何将其用于指定的版本ID?