我正在努力找到一个实际上做的
我的产品有几个属性,因此当前显示的页面为:
>MY GREAT PRODUCT
>Price from: £x
>long winded description about how great it is - long winded description about how great it is - long winded description about how great it is.
>Attribute selection box 1
>Attribute selection box 2
>Price & Add To Cart Button
到目前为止很棒,但我也在运行扩展Woocommerce产品附加组件,它提供了两种额外配置的选择,所以现在它:
>MY GREAT PRODUCT
>Price from: £x
>long winded description about how great it is - long winded description about how great it is - long winded description about how great it is.
>Attribute selection box 1
>Attribute selection box 2
>Product Add-On 1
>Product Add-On 2
>Price & Add To Cart Button
不太好,因为当客户选择属性时,他仍然看不到价格,除非他向下滚动页面超过产品附加组件。所以,最后,这就是我要做的事情:
>MY GREAT PRODUCT
>Price from: £x
>long winded description about how great it is - long winded description about how great it is - long winded description about how great it is.
>Attribute selection box 1
>Attribute selection box 2
>**Price**
>Product Add-On 1
>Product Add-On 2
>Price & Add To Cart Button
好的,所以我发现我之后的钩子是'woocommerce_template_single_excerpt',我想编辑它只是为了获取页面底部显示的价格副本,然后放置它在属性框后面的页面上。我可以在任何地方找到一个文件来定义调用woocommerce_template_single_excerpt动作时会发生什么吗?我可以哎呀!