在 WooCommerce 快速购物档案页面上添加额外的选项字段。

huangapple go评论45阅读模式
英文:

add extra option field on woocommerce quick shop archive page

问题

I recently added a plugin to my WordPress WooCommerce named "Extra product options For WooCommerce". I added a URL getter field to single product pages as shown below: url field on single product page

but I need it to also show on the quick shop archive page as well. Look at the image below: I need the URL getter field to go in the red section I drew on the image

How can I do that? Is there any hook to solve the problem?

英文:

I recently added a plugin to my wordpress woocommerce named "Extra product options For WooCommerce".
I added a url getter field to single product pages as shown as below:
url field on single product page

but I need that it shows on the quick shop archive page too as well. look at the image below:
I need url getter field goes on the red section I draw on image

how can I do that ? is there any hook to solve the problem ?

答案1

得分: 0

我找到答案了,只需将以下代码添加到你的function.php文件中:

add_filter('thwepof_hook_name_before_single_product','thwepof_change_prepare_hook');
function thwepof_change_prepare_hook(){
    return 'woocommerce_before_add_to_cart_button';
}
英文:

nevermind..I found the answer:
just add the code below to your function.php:

add_filter('thwepof_hook_name_before_single_product','thwepof_change_prepare_hook');
    function thwepof_change_prepare_hook(){
    return 'woocommerce_before_add_to_cart_button';
}

huangapple
  • 本文由 发表于 2023年2月10日 15:49:12
  • 转载请务必保留本文链接:https://go.coder-hub.com/75408238.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定