admin管理员组文章数量:1130349
I'm trying to add some labels after woocommrce order email items.
Example: We can do that on cart by using this filter.
add_filter( 'woocommerce_cart_item_name', array( $this, 'wc_esd_show_date_cart_page' ), 10, 2 );
This calls the wc_esd_show_date_cart_page() function and show its data after the item name.
I want to do the same for order email items, anyone know there have some filter for it, or another way to do this.
I'm trying to add some labels after woocommrce order email items.
Example: We can do that on cart by using this filter.
add_filter( 'woocommerce_cart_item_name', array( $this, 'wc_esd_show_date_cart_page' ), 10, 2 );
This calls the wc_esd_show_date_cart_page() function and show its data after the item name.
I want to do the same for order email items, anyone know there have some filter for it, or another way to do this.
Share Improve this question edited Dec 19, 2018 at 17:21 rudtek 6,4035 gold badges30 silver badges52 bronze badges asked Dec 19, 2018 at 17:07 Suneth KalharaSuneth Kalhara 1031 silver badge5 bronze badges1 Answer
Reset to default 1you can do this with a differnent woocommerce hook:
woocommerce_order_item_meta_end ($item_id, $item, $order, $plain_text)
use it similarly to the cart filter above.
For a visual representation if you want the additional information somewhere else see this link:
https://businessbloomer/woocommerce-visual-hook-guide-emails/
You can also always go right to the source and see all the hooks/filters/actions in woocommerce: https://docs.woocommerce/wc-apidocs/hook-docs.html
as an example:
add_action( 'woocommerce_order_item_meta_end', 'rt_order_item_meta_end', 10, 4 );
function rt_order_item_meta_end( $item_id, $item, $order, $plain_text ){
echo '<p>cool item detail</p>';
}
I'm trying to add some labels after woocommrce order email items.
Example: We can do that on cart by using this filter.
add_filter( 'woocommerce_cart_item_name', array( $this, 'wc_esd_show_date_cart_page' ), 10, 2 );
This calls the wc_esd_show_date_cart_page() function and show its data after the item name.
I want to do the same for order email items, anyone know there have some filter for it, or another way to do this.
I'm trying to add some labels after woocommrce order email items.
Example: We can do that on cart by using this filter.
add_filter( 'woocommerce_cart_item_name', array( $this, 'wc_esd_show_date_cart_page' ), 10, 2 );
This calls the wc_esd_show_date_cart_page() function and show its data after the item name.
I want to do the same for order email items, anyone know there have some filter for it, or another way to do this.
Share Improve this question edited Dec 19, 2018 at 17:21 rudtek 6,4035 gold badges30 silver badges52 bronze badges asked Dec 19, 2018 at 17:07 Suneth KalharaSuneth Kalhara 1031 silver badge5 bronze badges1 Answer
Reset to default 1you can do this with a differnent woocommerce hook:
woocommerce_order_item_meta_end ($item_id, $item, $order, $plain_text)
use it similarly to the cart filter above.
For a visual representation if you want the additional information somewhere else see this link:
https://businessbloomer/woocommerce-visual-hook-guide-emails/
You can also always go right to the source and see all the hooks/filters/actions in woocommerce: https://docs.woocommerce/wc-apidocs/hook-docs.html
as an example:
add_action( 'woocommerce_order_item_meta_end', 'rt_order_item_meta_end', 10, 4 );
function rt_order_item_meta_end( $item_id, $item, $order, $plain_text ){
echo '<p>cool item detail</p>';
}
本文标签: pluginsWoocomerce add info after order email prouct item
版权声明:本文标题:plugins - Woocomerce add info after order email prouct item 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749084052a2313494.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论