Khi cần tùy biến một cái gì đó trong Woocommerce ngoài việc sửa các template thì chúng ta còn có một lựa chọn khác đó là tận dụng các action hook Woocommerce đã có sẵn để chúng ta có thể làm mọi thứ. Bài viết dưới đây tổng hợp các Hook Woocommerce thông dụng mà bạn nên biết.
Hook tìm kiếm sản phẩm cơ bản
- pre_get_product_search_form

Nó cho phép thêm một số dữ liệu bên trên thanh tìm kiếm sản phẩm cơ bản.
- woocommerce_breadcrumb

Hiển thị dữ liệu phía trên các URL đường dẫn.
- woocommerce_no_products_found

Cho phép hiển thị dữ liệu cần thiết trên trang Tìm kiếm nếu không thấy sản phẩm nào.
Hook Woocommerce tại trang giỏ hàng

- woocommerce_before_cart
- woocommerce_before_cart_table
- woocommerce_before_cart_contents
- woocommerce_cart_contents
- woocommerce_ after_cart_content

- woocommerce_cart_coupon
- woocommerce_cart_actions
- woocommerce_ after_cart_table
- woocommerce_cart_collaterals
- woocommerce_before_cart_totals
Hook Woocommerce hiển thị trang đơn đặt hàng
- 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

Hook woocommerce giỏ hàng trống
- woocommerce_cart_is_empty

Hook woocommerce trước thông tin liên hệ trang thanh toán
- woocommerce_before_checkout_form
- woocommerce_checkout_before_customer_details
- woocommerce_checkout_billing
- woocommerce_before_checkout_billing_form

Hook woocommerce thiết lập chi tiết trang thanh toán
- woocommerce_ after_checkout_billing_form
- woocommerce_checkout_shipping
- woocommerce_before_order_notes
- woocommerce_ after_order_notes
- woocommerce_checkout_ after_order_review

- 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

Hook woocommerce tóm tắt sản phẩm trang thanh toán
- 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

Hook woocommerce đặt hàng hoàn tất
- woocommerce_order_items_table
- woocommerce_order_item_meta_start
- woocommerce_order_item_meta_end
- woocommerce_order_details_ after_order_table
- woocommerce_thankyou

Hook woocommerce đầu và cuối sản phẩm
- woocommerce_before_main_content
- woocommerce_ after_main_content

Hook woocommerce bên trên và bên dưới mô tả sản phẩm
- woocommerce_before_single_product_summary
- woocommerce_ after_single_product_summary

Hook woocommerce đầu và cuối trang sản phẩm
- woocommerce_before_single_product
- woocommerce_ after_single_product

Hook woocommerce mô tả ngắn sản phẩm
- woocommerce_single_product_summary
- woocommerce_product_meta_start
- woocommerce_product_meta_end
- woocommerce_share

Hook woocommerce phần đánh giá sản phẩm
- 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

Hook woocommerce mô tả danh mục sản phẩm
- woocommerce_archive_description

Hook woocommerce danh sách sản phẩm
- woocommerce_shop_loop

- woocommerce_before_shop_loop

- woocommerce_ after_shop_loop

- woocommerce_ after_shop_loop_item

- woocommerce_ after_shop_loop_item_title
- woocommerce_shop_loop_item_title
- woocommerce_before_shop_loop_item_title

Hook woocommerce trang tài khoản
- 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_account_dashboard
- woocommerce_before_my_account
- woocommerce_ after_my_account

Hook woocommerce giỏ hàng
- 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

Hook woocommerce email đơn hàng
- 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

Hook woocommerce khác
- 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
