我想使用woocommerce_single_product_summary而不是woocommerce_short_description。
怎么做?如果我只是更改“woocommerce_short_description”,它仍会显示简短说明。
谢谢
<?php break;
case 'description': ?>
<div class="wcpc-compare-row">
<div class="wcpc-compare-cell" data-compare="<?php echo $k; ?>">
<div class="wcpc-compare-description">
<?php $post = get_post($product->get_id()); echo apply_filters( 'woocommerce_short_description', $post->post_excerpt ); ?>
</div>
</div>
</div>
如果您想获得产品描述而不是简短描述,则需要使用以下内容:
$post->post_content;
代替 :
$post->post_excerpt;