简体   繁体   English

在 Woocommerce 单个产品页面中移动库存可用性位置

[英]Move stock availability position in Woocommerce single product page

Can someone help me find a way to change the stock position on the product page?有人可以帮我找到一种方法来更改产品页面上的库存位置吗? Is there a hook for this?有这个钩子吗? Or is there another way?或者还有其他方法吗?

Is there a hook for this?有这个钩子吗?

No, unfortunately as it is hardcoded inside the woocommerce template.不,不幸的是,它是硬编码在 woocommerce 模板中的。

Probably a little late as an answer, but if someone else looks for this, here is an answer from another post:答案可能有点晚了,但如果其他人在寻找这个,这里是另一篇文章的答案:

woocommerce stock notification priority woocommerce 库存通知优先级

Some suggestion from me would be to make a folder inside your child theme of woocommerce so that you will not loose any of the updates.我的一些建议是在您的 woocommerce 子主题中创建一个文件夹,这样您就不会丢失任何更新。 You can find a more clear answer, straight from woocommerce, here: https://docs.woocommerce.com/document/template-structure/您可以直接从 woocommerce 中找到更明确的答案: https ://docs.woocommerce.com/document/template-structure/

Also the folders that are mentioned in the utl above can be found inside this firectory path in your server: wp-content -> plugins -> woocommerce -> templates -> single-product -> add-to-cart此外,上面 utl 中提到的文件夹可以在服务器的 firectory 路径中找到: wp-content -> plugins -> woocommerce -> templates -> single-product -> add-to-cart

you can either change the position of excerpt and other content to the bottom of SKU using hooks like CHANGE POSITION .您可以使用CHANGE POSITION 之类的挂钩将摘录和其他内容的位置更改为 SKU 的底部。 OR you can also cut & paste the code in stock.php under single-product folder to any other file where you want to show the sku of product like price.php/meta.php/title.php etc...或者,您也可以将单一产品文件夹下 stock.php 中的代码剪切并粘贴到任何其他要显示产品 sku 的文件中,例如 price.php/meta.php/title.php 等...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM