问题标签 [hook-woocommerce]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
php - 重命名 WooCommerce 订单状态
我想将 WooCommerce 订单状态从“已完成”重命名为“已收到订单”。我可以编辑以下位于 wc-order-functions.php 中的脚本,但我不希望修改任何核心文件或使用插件。
是否可以使用子主题文件中的脚本覆盖 woocoomerce 函数functions.php
?
php - 使用 add_filter 自定义 WooCommerce 通知
我正在尝试自定义 WooCommerce 通知。这是我要替换的通知:
基于这个有用的答案WooCommerce 通知消息,我该如何编辑它们?,我想出了这个:
这会导致 HTTP500 错误,我不知道究竟是为什么。
谢谢!
php - WooCommerce 操作 - 挂钩名称
我一直在寻找年龄,找不到真正的答案
我正在寻找可以在add_action
woocommerce 的 wp 函数中使用的所有操作
我已经检查了 woocommerce 文档,但它似乎没有列出钩子的名称
php - 伍科默斯。如何从目录和搜索结果中排除(隐藏)产品?
我们有这样的功能:
如何使用此功能从 woocomerce 目录(商店)和搜索结果中隐藏产品?
php - woocommerce 自定义“添加到购物车”文本/链接
如何更改 woocommerce(v2.4)中的“添加到购物车”按钮文本/链接?
我试图将此代码添加到我的functions.php,但它似乎不起作用:
php - 如何在woocommerce中更改单个产品页面上星级评分的位置?
我目前正在努力将星级评分从添加到购物车按钮下方移动到单个产品标题位置下方。
为此,我在子主题的 function.php 文件中使用了钩子:
但是我得到了奇怪的结果,你自己看看
好消息是我有第二个评分,但为什么 remove_action 没有删除原来的星级?如您所见,现在我有两个重复的星级。
这是网站的链接>>>
wordpress - Woocommerce - 按关键字搜索产品类别
这是我的搜索表格。我使用 woocommerce。并且需要通过关键字和类别搜索产品。
这是我的过滤器代码
但是 wordpress 按关键字显示所有类别的所有产品。怎么了?
php - 如何以编程方式在 Woocommerce 中为客户的第一笔订单应用优惠券?
在 Woocommerce 中,我试图找到一种方法,对新客户的第一笔订单应用 20% 的折扣。看来我可以使用这些功能woocommerce_after_checkout_validation
并check_new_customer_coupon
做到这一点,但它不起作用。
函数.php:
php - Automatic text in short description of WooCommerce products
I am trying to create an automatic text in the description of the WooCommerce articles and put "article only available in the store."
I thought about putting it inside a function like this:
But this replace the text that is already written in the short description of the product. If I have not put text, nothing appears.
Is possible put the text of the code "article only available in the store" without a short description of the product?
Thank you.
php - WooCommerce 在存档中显示自定义分类
试图显示我在产品下注册的自定义分类法“w_label”。但是,当我尝试使用以下代码显示它时:
我不断收到“警告:为 foreach() 提供的参数无效”
不知道我错过了什么。如果我将此代码用于默认的 WooCommerce 类别,它可以工作,但不适用于我在此处注册的自定义分类法。