• Trang chủ
  • Windows
  • Mac OS
  • Điện thoại
  • Game hay
  • Thủ thuật
  • Website
  • Hướng dẫn
  • Tài liệu
Thursday, 28 May, 2026
Chia sẻ thủ thuật IT, tải phần mềm miễn phí
No Result
View All Result
  • Trang chủ
  • Windows
  • Mac OS
  • Điện thoại
  • Game hay
  • Thủ thuật
  • Website
  • Hướng dẫn
  • Tài liệu
  • Trang chủ
  • Windows
  • Mac OS
  • Điện thoại
  • Game hay
  • Thủ thuật
  • Website
  • Hướng dẫn
  • Tài liệu
No Result
View All Result
Chia sẻ thủ thuật IT, tải phần mềm miễn phí
No Result
View All Result
Home Website

WooCommerce Hooks Guide: Full List and Examples

Harris by Harris
10/05/2023
in Hướng dẫn, Tài liệu, Thủ thuật, Website
Reading Time: 10 mins read
0
huanvmdotcom hooks woo
27
SHARES
83
VIEWS
Share to FacebookShare to TwitterPin on Pinterest

Mục lục bài viết

  1. WooCommerce Global Hooks
  2. WooCommmerce Cart Hooks
    1. The hooks that are displayed before the product list in the cart
    2. Hooks displayed after the product list in the cart
    3. The hooks that are displayed at the end of an order
    4. In case there are no products in the cart
  3. WooCommerce Checkout Hooks
    1. Hooks used before the user contact information form
    2. The hooks that are used for setting markup of billing details
    3. The hooks that are used before the order’s product summary
    4. The hooks that are displayed below the order form
    5. The hooks that are displayed in the product list of an order:
  4. WooCommerce Product Hooks
    1. The hooks that are displayed at the top and at the foot of the Product page
    2. The hooks that are displayed above  and below  a product description
    3. The hooks that are displayed at the top and at the foot of the Product page
    4. The hooks that are displayed in the short product description
    5. The hooks that are displayed in the comments
  5. WooCommerce Category Hooks
  6. WooCommerce My Account Hooks
    1. The main hooks for setting markup of the My Account page
    2. The additional hooks for setting markup of the My Account page
  7. WooCommerce Mini Cart Hooks
  8. WooCommerce Email Hooks
  9. Other Hooks

WooCommerce Hooks are a powerful tool for extending the functionality of an online store without modifying the core code of the theme. In this blog post, we will provide a comprehensive list of WooCommerce Hooks, explain their main uses, and give examples of where they can be placed.

By using WooCommece Hooks, it’s possible to create independent plugins and extensions without altering the core code of WordPress, WooCommerce, or other plugins. This approach ensures the stability and updatability of the software.

WooCommerce Hooks are a well-documented and straightforward way to expand the capabilities of an online store. By the end of this post, you’ll have a solid understanding of how to use them effectively.

WooCommerce Global Hooks

We’ve referred three hooks to global and they are displayed on the main pages allowing to make some considerable modifications. Among them:

pre_get_product_search_form

It enables adding some data above the basic search of products.

WooCommerce Hooks Guide: Full List and Examples

woocommerce_breadcrumb

It allows to display data above the breadcrumbs URLs.

WooCommerce Hooks Guide: Full List and Examples

woocommerce_no_products_found

It allows to display the needed data on the Search page if no products have been found.

WooCommerce Hooks Guide: Full List and Examples

WooCommmerce Cart Hooks

In general, the Cart page on WooCommerce is marked very well. We’ve divided all the hooks, that are used on the Cart page, into three groups for convenience.

The hooks that are displayed before the product list in the cart

They are:

  • woocommerce_before_cart
  • woocommerce_before_cart_table
  • woocommerce_before_cart_contents
  • woocommerce_cart_contents
  • woocommerce_after_cart_contents
WooCommerce Hooks Guide: Full List and Examples

Hooks displayed after the product list in the cart

The hooks displayed after the product list in the cart are:

  • woocommerce_cart_coupon
  • woocommerce_cart_actions
  • woocommerce_after_cart_table
  • woocommerce_cart_collaterals
  • woocommerce_before_cart_totals
WooCommerce Hooks Guide: Full List and Examples

The hooks that are displayed at the end of an order

The hooks that are displayed at the end of an order are:

  • woocommerce_cart_totals_before_shipping
  • woocommerce_cart_totals_after_shipping
  • woocommerce_cart_totals_before_order_total
  • woocommerce_cart_totals_after_order_total
  • woocommerce_after_shipping_rate
  • woocommerce_before_shipping_calculator
  • woocommerce_proceed_to_checkout
  • woocommerce_after_cart_totals
  • woocommerce_after_cart
WooCommerce Hooks Guide: Full List and Examples

In case there are no products in the cart

If there are no products in the cart we see:

woocommerce_cart_is_empty

WooCommerce Hooks Guide: Full List and Examples

WooCommerce Checkout Hooks

As the Checkout page on WooCommerce is very functional, we’ve decided to divide all the hooks that are used here into several categories.

Hooks used before the user contact information form

They are:

  • woocommerce_before_checkout_form
  • woocommerce_checkout_before_customer_details
  • woocommerce_checkout_billing
  • woocommerce_before_checkout_billing_form
WooCommerce Hooks Guide: Full List and Examples

The hooks that are used for setting markup of billing details

They are:

  • woocommerce_after_checkout_billing_form
  • woocommerce_checkout_shipping
  • woocommerce_before_order_notes
  • woocommerce_after_order_notes
  • woocommerce_checkout_after_order_review
WooCommerce Hooks Guide: Full List and Examples

The hooks that are used before the order’s product summary

They are:

  • woocommerce_checkout_after_customer_details
  • woocommerce_checkout_before_order_review
  • woocommerce_review_order_before_cart_contents
  • woocommerce_review_order_after_cart_contents
  • woocommerce_review_order_before_shipping
  • woocommerce_review_order_after_shipping
  • woocommerce_review_order_before_order_total
  • woocommerce_review_order_after_order_total
WooCommerce Hooks Guide: Full List and Examples

The hooks that are displayed below the order form

They are:

  • woocommerce_checkout_order_review
  • woocommerce_review_order_before_payment
  • woocommerce_review_order_before_submit
  • woocommerce_review_order_after_submit
  • woocommerce_review_order_after_payment
  • woocommerce_after_checkout_form
WooCommerce Hooks Guide: Full List and Examples

The hooks that are displayed in the product list of an order:

They are:

  • woocommerce_order_items_table
  • woocommerce_order_item_meta_start
  • woocommerce_order_item_meta_end
  • woocommerce_order_details_after_order_table
  • woocommerce_thankyou
WooCommerce Hooks Guide: Full List and Examples

WooCommerce Product Hooks

In this part, we’ll review all hooks that are used on the Product page. There is a number possible hooks here and that’s why we’ve divided them into several categories according to their purpose. We use them with our WooCommerce Product Filter Plugin for filtering results without reloading the page.

The hooks that are displayed at the top and at the foot of the Product page

They are:

  • woocommerce_before_main_content
  • woocommerce_after_main_content
WooCommerce Hooks Guide: Full List and Examples

The hooks that are displayed above  and below  a product description

They are:

  • woocommerce_before_single_product_summary
  • woocommerce_after_single_product_summary
WooCommerce Hooks Guide: Full List and Examples

The hooks that are displayed at the top and at the foot of the Product page

They are:

  • woocommerce_before_single_product
  • woocommerce_after_single_product
WooCommerce Hooks Guide: Full List and Examples

The hooks that are displayed in the short product description

They are:

  • woocommerce_single_product_summary
  • woocommerce_product_meta_start
  • woocommerce_product_meta_end
  • woocommerce_share
WooCommerce Hooks Guide: Full List and Examples

The hooks that are displayed in the comments

They are:

  • woocommerce_review_before
  • woocommerce_review_before_comment_meta
  • woocommerce_review_meta
  • woocommerce_review_before_comment_text
  • woocommerce_review_comment_text
  • woocommerce_review_after_comment_text
WooCommerce Hooks Guide: Full List and Examples

WooCommerce Category Hooks

WooCommerce provides some hooks for working with the product categories. Let’s review them with screenshots for better visualization. These ones we use with our Premmerce WooCommerce Variation Swatches Plugin to optimize the WooCommerce based online stores with large databases of products, attributes and variations.

woocommerce_archive_description

It is displayed below the category title

WooCommerce Hooks Guide: Full List and Examples

woocommerce_shop_loop

It is displayed before the Product card in the list.

WooCommerce Hooks Guide: Full List and Examples

woocommerce_before_shop_loop

It is displayed above the product list in the category.

WooCommerce Hooks Guide: Full List and Examples

woocommerce_after_shop_loop

It is displayed below the product list in the category.

WooCommerce Hooks Guide: Full List and Examples

woocommerce_after_shop_loop_item

It is displayed at the end of every Product card description.

WooCommerce Hooks Guide: Full List and Examples

The hooks that additionally  mark the Product card in the list.

They are:

  • woocommerce_after_shop_loop_item_title
  • woocommerce_shop_loop_item_title
  • woocommerce_before_shop_loop_item_title
WooCommerce Hooks Guide: Full List and Examples

WooCommerce My Account Hooks

These hooks are for the detailed marking of the My Account page. We’ve also divided them into two categories.

The main hooks for setting markup of the My Account page

They are:

  • woocommerce_before_account_navigation
  • woocommerce_after_account_navigation
  • woocommerce_account_navigation
  • woocommerce_before_edit_account_address_form
  • woocommerce_after_edit_account_address_form
  • woocommerce_account_content
WooCommerce Hooks Guide: Full List and Examples

The additional hooks for setting markup of the My Account page

They are:

  • woocommerce_account_dashboard
  • woocommerce_before_my_account
  • woocommerce_after_my_account
WooCommerce Hooks Guide: Full List and Examples

WooCommerce Mini Cart Hooks

These hooks serve to set markup the mini cart that is displayed in the sidebar if you use advanced WooCommerce display settings.

They are:

  • woocommerce_before_mini_cart
  • woocommerce_before_mini_cart_contents
  • woocommerce_mini_cart_contents
  • woocommerce_widget_shopping_cart_before_buttons
  • woocommerce_widget_shopping_cart_buttons
  • woocommerce_after_mini_cart
WooCommerce Hooks Guide: Full List and Examples

WooCommerce Email Hooks

They are used for setting email markup. The emails that are sent to the customers after the purchase are marked up  and they usually contain a product list.

They are:

  • woocommerce_email_after_order_table
  • woocommerce_email_before_order_table
  • woocommerce_email_customer_details
  • woocommerce_email_footer
  • woocommerce_email_header
  • woocommerce_email_order_details
  • woocommerce_email_order_meta
WooCommerce Hooks Guide: Full List and Examples

Other Hooks

We’ve described the main hooks that are usually used for setting markup and extension of the basic WooCommerce functionality.

There are also some Hooks that are not so often used. Here is the whole list of them:

  • woocommerce_after_account_downloads
  • woocommerce_after_account_orders
  • woocommerce_after_account_payment_methods
  • woocommerce_before_account_download
  • woocommerce_before_account_order
  • woocommerce_before_account_orders_paginatio
  • woocommerce_before_account_payment_method
  • woocommerce_edit_account_for
  • woocommerce_edit_account_form_en
  • woocommerce_edit_account_form_star
  • woocommerce_resetpassword_for
  • woocommerce_after_available_downloads
  • woocommerce_after_checkout_registration_form
  • woocommerce_after_checkout_shipping_form
  • woocommerce_after_edit_account_form
  • woocommerce_after_subcategor
  • woocommerce_after_subcategory_titl
  • woocommerce_auth_page_foote
  • woocommerce_auth_page_heade
  • woocommerce_available_download_en
  • woocommerce_available_download_star
  • woocommerce_before_available_download
  • woocommerce_before_checkout_registration_for
  • woocommerce_before_checkout_shipping_for
  • woocommerce_before_edit_account_for
  • woocommerce_before_subcategor
  • woocommerce_before_subcategory_titl
  • woocommerce_cart_has_error
  • woocommerce_checkout_after_terms_and_condition
  • woocommerce_checkout_before_terms_and_condition
  • woocommerce_lostpassword_for
  • woocommerce_order_details_after_customer_detail
  • woocommerce_pay_order_after_submi
  • woocommerce_pay_order_before_submi
  • woocommerce_product_thumbnail
  • woocommerce_shop_loop_subcategory_titl
  • woocommerce_view_order

In case you need some additional explanations on any hook usage you’re welcome to leave your comments and we’ll give more information on the topic you’re interested in promptly, or you see see how we use hooks in our products at our WooCommerce Plugins list.

Digiprove sealCopyright protected by Digiprove © 2023
5/5 - (1 vote)
Chào ! Bạn thấy nội dung này thế nào?
Hữu ích 486Tạm được 477
Tags: woocommerce hook
Previous Post

Hướng dẫn tạo Mega Menu tuỳ chỉnh trên Flatsome

Next Post

Mẫu contact form 7 đơn giản và đẹp

Harris

Harris

Thích du lịch, khám phá và thích vọc vạch

Next Post
Mẫu contact form 7 đơn giản và đẹp

Mẫu contact form 7 đơn giản và đẹp

guest
guest
0 Bình luận
Phản hồi nội tuyến
Xem tất cả bình luận

KHUYÊN DÙNG

Auto Draft

5 bước xây dựng Studio Youtube với ngân sách thấp

05/03/2022
175
[ Hướng dẫn ] Cách đăng kí 100GB Google One miễn phí trong 4 năm

[ Hướng dẫn ] Cách đăng kí 100GB Google One miễn phí trong 4 năm

30/06/2023
134

ĐANG THỊNH HÀNH

Download Wondershare Filmora X 10.7.8.12 (Full + Repack)

Download Wondershare Filmora X 10.7.8.12 (Full + Repack)

14/08/2023
14.2k
Download Cubase 10 Pro All in One – Hướng dẫn cài đặt chi tiết

Download Cubase 10 Pro All in One – Hướng dẫn cài đặt chi tiết

24/09/2025
3.7k
Cách hiển thị số lượng sản phẩm đã bán khi dùng Woocommerce

Cách hiển thị số lượng sản phẩm đã bán khi dùng Woocommerce

28/12/2022
106
WooCommerce Hook Guide: Archive / Shop / Category Pages

WooCommerce Hook Guide: Archive / Shop / Category Pages

31/05/2023
33
Chia sẻ code nút liên hệ hiển thị bên trái

Chia sẻ code nút liên hệ hiển thị bên trái

30/08/2023
59

GIỚI THIỆU

Chia sẻ thủ thuật IT, tải phần mềm miễn phí

Xin chào! Mình là Mạnh Huấn, website này mình xây dựng nhằm mục đích chia sẻ miễn phí các kiến thức, thủ thuật máy tính, làm web WordPress, SEO, MMO, các phần mềm hay... mà mình biết cho tất cả mọi người. Cảm ơn các bạn đã ghé qua, nếu thấy bài viết hay, hãy chia sẻ để ủng hộ tinh thần cho mình nhé!

Theo dõi mình tại đây:

BÀI VIẾT GẦN ĐÂY

Hướng dẫn cài đặt ZeroSSL trên DirectAdmin

Hướng dẫn cài đặt ZeroSSL trên DirectAdmin

12/10/2023
Set all products instock without edit manual in Woocommerce

Set all products instock without edit manual in Woocommerce

18/08/2023
Rearrange WooCommerce checkout page data fields

Rearrange WooCommerce checkout page data fields

18/08/2023

HV MEDIA ON FACEBOOK

  • Giới thiệu
  • Chính sách bảo mật
  • Bản quyền
  • Liên hệ
  • Quảng cáo
  • Gửi yêu cầu
  • Báo link hỏng

© 2020 HV Media - Chia sẻ thủ thuật IT, phần mềm by HV Media Center.

No Result
View All Result
  • Home
  • Mac OS
    • Adobe
    • Developer Tools
    • Graphics & Design
    • Internet – Security
    • Productivity
    • Utilities
    • Video – Audio
  • Windows
    • Anti Virus
    • Development
    • Graphics & Design
    • Office – Study
    • Tools
    • Utilities
    • Video – Audio
  • Điện thoại
    • Apps, Game Cho iOS
    • Phần mềm Android
  • Thủ thuật
    • Thủ thuật máy tính
    • Thủ thuật Mobile
    • Thủ thuật Facebook
  • Game hay
    • Game MacOS
    • Game Windows
  • Website
  • Hướng dẫn
  • Tài liệu

© 2020 HV Media - Chia sẻ thủ thuật IT, phần mềm by HV Media Center.

wpDiscuz
0
0
Bạn đang nghĩ gì, hãy để lại bình luận nhé !x
()
x
| Phản hồi