预计阅读时间: 2 分钟

高级自定义字段插件是将自定义高级字段添加到WooCommerce单个产品页面的好方法。


add_action( 'woocommerce_product_thumbnails', 'bbloomer_display_acf_field_under_images', 30 );
  
function bbloomer_display_acf_field_under_images() {
  echo '<b>Trade Price:</b> ' . get_field('trade');
  // Note: 'trade' is the slug of the ACF
}
此文章对你有帮助吗? 已有 0 人说这篇文章是有用的。