Do not sell or share my personal information Skip to content

Cart and Checkout – Hook support and common extensibility paths

Hook compatibility

These are the hooks that run when loading the Cart/Checkout shortcodes and blocks. Some are general WooCommerce lifecycle hooks, some are specific to the Cart and Checkout pages. These were generated by logging each call to do_action and apply_filters and reviewing the issues mentioning “hooks” and “filter(s)” in the old WooCommerce Blocks repository.

Legend

Icon Description
✅ Fully supported
🔶 Partially supported
❌ Not supported
❓ Unknown

If a hook is marked as ❓(Unknown) it means we were not able to verify whether the hook is supported for some reason. As time goes on, we will attempt to validate more of these hooks. The goal is to have no hooks with a ❓status remaining in any of the tables.

WooCommerce lifecycle actions

These hooks run on every Woo page load, some affect the blocks, some don’t, some only affect them partially.

Old hook Works in blocks? Notes
woocommerce_load_cart_from_session ✅
woocommerce_cart_loaded_from_session ✅
woocommerce_cart_updated ✅
woocommerce_set_cart_cookies ✅
woocommerce_shipping_zone_loaded ✅
woocommerce_check_cart_items ✅ May be better to use woocommerce_store_api_validate_cart_item
woocommerce_before_calculate_totals ✅
woocommerce_shipping_init ✅
woocommerce_load_shipping_methods ✅
woocommerce_cart_calculate_fees ✅
woocommerce_calculate_totals ✅
woocommerce_after_calculate_totals ✅
woocommerce_cart_updated ✅
woocommerce_before_get_rates_for_package ✅
woocommerce_after_get_rates_for_package ✅
woocommerce_checkout_init ✅
woocommerce_customer_loaded ✅

WooCommerce lifecycle filters

Old hook Works in blocks? Notes
woocommerce_notice_types ❓ WC Blocks does not handle additional notice types outside of the core ones. Non-supported notices would be displayed as “info” notices.
woocommerce_kses_notice_allowed_tags ❓
woocommerce_product_get_stock_status ✅
woocommerce_product_is_in_stock ✅
woocommerce_product_get_manage_stock ❓
woocommerce_product_get_tax_class ✅
woocommerce_product_get_tax_status ❓
woocommerce_prices_include_tax ❓
woocommerce_apply_base_tax_for_local_pickup ❓
woocommerce_local_pickup_methods ❌ Does not affect the blocks-based local pickup methods
woocommerce_customer_get_shipping_postcode ✅
woocommerce_customer_get_shipping_city ✅
woocommerce_customer_taxable_address ❓
woocommerce_shipping_methods ✅
woocommerce_format_localized_price ❓
woocommerce_shipping_local_pickup_option ❌ Does not affect the blocks-based local pickup methods
woocommerce_shipping_pickup_location_option ❓ Unsure if changing this changes the way local pickup shows in the Cart/Checkout
woocommerce_shipping_method_supports ✅
woocommerce_get_tax_location ❓
woocommerce_format_postcode ❓
woocommerce_matched_tax_rates ❓
woocommerce_find_rates ❓
woocommerce_matched_rates ❓
woocommerce_cart_totals_get_item_tax_rates ✅
woocommerce_adjust_non_base_location_prices ❓
woocommerce_product_is_taxable ✅
woocommerce_price_ex_tax_amount ✅
woocommerce_tax_round ✅
woocommerce_calc_tax ✅
woocommerce_calculate_item_totals_taxes ✅
woocommerce_cart_ready_to_calc_shipping ✅
woocommerce_product_get_virtual ✅
woocommerce_is_virtual ✅
woocommerce_product_needs_shipping ✅
woocommerce_cart_needs_shipping ✅
woocommerce_customer_get_shipping_address_1 ✅
woocommerce_customer_get_shipping_address_2 ✅
woocommerce_cart_display_prices_including_tax ✅
woocommerce_cart_get_subtotal ✅
woocommerce_cart_shipping_packages ✅
woocommerce_product_get_shipping_class_id ✅
woocommerce_countries_shipping_countries ✅
woocommerce_get_zone_criteria ✅
woocommerce_shipping_zone_shipping_methods ✅
woocommerce_shipping_free_shipping_is_available ❓
woocommerce_product_get_name ✅
woocommerce_shipping_method_add_rate ✅
woocommerce_shipping_flat_rate_is_available ✅
woocommerce_evaluate_shipping_cost_args ✅
woocommerce_calc_shipping_tax ✅
woocommerce_localisation_address_formats ✅
woocommerce_countries_base_country ❓
woocommerce_formatted_address_force_country_display ❓
woocommerce_states ✅
woocommerce_formatted_address_replacements ❓
woocommerce_package_rates ✅
woocommerce_shipping_packages ✅
woocommerce_shipping_rate_method_id ✅
woocommerce_shipping_rate_taxes ✅
woocommerce_shipping_rate_cost ✅
woocommerce_cart_totals_get_fees_from_cart_taxes ✅
woocommerce_calculated_total ❌ This does not seem to have any effect
woocommerce_cart_get_discount_total ✅
woocommerce_cart_get_cart_contents_total ✅
woocommerce_get_price_excluding_tax ❌ This does not seem to have any effect
raw_woocommerce_price ❌ This does not seem to have any effect
formatted_woocommerce_price ❌ This does not seem to have any effect
woocommerce_price_trim_zeros ❌ This does not seem to have any effect
woocommerce_get_cart_page_permalink ❌ This does not seem to have any effect
woocommerce_get_cart_url ❌ This does not seem to have any effect
woocommerce_checkout_registration_enabled ✅ This does not seem to have any effect
woocommerce_get_checkout_page_permalink ❌ This does not seem to have any effect
woocommerce_get_checkout_url ❌ This does not seem to have any effect
woocommerce_checkout_get_value ❌ This does not seem to have any effect
woocommerce_default_address_fields ❌ This does not seem to have any effect
default_checkout_billing_country ❌ This does not seem to have any effect
default_checkout_shiping_country ❌ This does not seem to have any effect
woocommerce_get_country_locale ✅
woocommerce_get_country_locale_default ❓
woocommerce_get_country_locale_base ❓
woocommerce_billing_fields 🔶 Editing core fields is not supported, but adding them is via Additional Checkout Fields API
woocommerce_shipping_fields 🔶 Editing core fields is not supported, but adding them is via Additional Checkout Fields API
woocommerce_checkout_fields 🔶 Editing core fields is not supported, but adding them is via Additional Checkout Fields API
woocommerce_cart_item_product ❌ Modifying individual cart items is not possible
woocommerce_payment_gateway_supports ✅
woocommerce_customer_get_billing_first_name ✅
woocommerce_customer_get_billing_last_name ✅
woocommerce_customer_get_billing_company ✅
woocommerce_customer_get_billing_address_1 ✅
woocommerce_customer_get_billing_address_2 ✅
woocommerce_customer_get_billing_city ✅
woocommerce_customer_get_billing_postcode ✅
woocommerce_customer_get_billing_phone ✅
woocommerce_customer_get_shipping_first_name ✅
woocommerce_customer_get_shipping_last_name ✅
woocommerce_customer_get_shipping_company ✅
woocommerce_get_item_data ✅
woocommerce_cart_get_subtotal_tax ❌ This does not seem to have any effect
woocommerce_shipping_package_name ✅
woocommerce_shipping_rate_id ❓
woocommerce_shipping_rate_label ✅
woocommerce_cart_get_shipping_taxes ✅
woocommerce_cart_get_fee_taxes ✅
woocommerce_cart_get_taxes ✅
woocommerce_rate_code ❓
woocommerce_rate_compound ❓
woocommerce_rate_label ✅
woocommerce_cart_hide_zero_taxes ❓
woocommerce_cart_tax_totals ✅
woocommerce_cart_needs_payment ✅
woocommerce_order_class ✅
woocommerce_checkout_registration_required ❓
woocommerce_privacy_policy_page_id ✅
woocommerce_get_terms_page_id ❓
woocommerce_terms_and_conditions_page_id ❓
woocommerce_cart_contents_count ❓
woocommerce_country_locale_field_selectors ❌
woocommerce_get_return_url ✅
woocommerce_cart_hash ✅
woocommerce_cart_get_fee_tax ✅
woocommerce_customer_default_location_array ✅
woocommerce_countries ✅
woocommerce_sort_countries ❌ This does not seem to have any effect
woocommerce_countries_allowed_countries ✅
woocommerce_customer_default_location_array ✅
woocommerce_customer_get_billing_country ✅
woocommerce_customer_get_shipping_country ✅
woocommerce_customer_get_billing_state ✅
woocommerce_customer_get_shipping_state ✅
woocommerce_customer_get_billing_email ✅
woocommerce_cart_session_initialize ✅
woocommerce_get_checkout_page_id ✅
woocommerce_get_cart_page_id ✅
woocommerce_is_checkout ✅
woocommerce_currency ✅
woocommerce_currency_symbols ✅
woocommerce_currency_symbol ✅
woocommerce_price_format ✅
woocommerce_coupons_enabled ✅
woocommerce_get_shop_page_id ✅
current_theme_supports-woocommerce ✅
woocommerce_payment_gateways 🔶 Integration with WC Blocks is still required, beyond unsetting gateways, manipulating the payment gateways here may not work in the Cart and Checkout blocks
woocommerce_get_base_location ✅
woocommerce_gateway_icon ❌ This hook has no effect since icons are not displayed.
woocommerce_get_image_size_thumbnail ✅
woocommerce_get_image_size_single ✅
woocommerce_product_stock_status_options ✅
woocommerce_cart_item_name ❌ Use the itemName checkout filter.
woocommerce_product_get_status ✅
woocommerce_product_get_price ✅
woocommerce_is_purchasable ✅
woocommerce_cart_item_is_purchasable ✅
woocommerce_cart_item_data_to_validate ✅
woocommerce_get_cart_item_from_session ✅
woocommerce_cart_contents_changed ✅
woocommerce_get_cart_contents ✅
woocommerce_stock_amount ✅
woocommerce_cart_item_remove_link ❌ Use the showRemoveItemLink checkout filter.
woocommerce_cart_item_quantity ❌ This is possible by modifying the quantity_limits property of the cart item in the woocommerce_store_api_product_quantity_{$value_type} filter.
woocommerce_product_get_image ❌ Use woocommerce_store_api_cart_item_images (PR Link with example.)
woocommerce_cart_no_shipping_available_html ❌ This is not editable
woocommerce_available_payment_gateways 🔶 Integration with WC Blocks is still required, beyond unsetting gateways, manipulating the payment gateways here may not work in the Cart and Checkout blocks
woocommerce_cart_get_total ✅
woocommerce_cart_get_fee_tax ✅
woocommerce_cart_get_cart_contents_tax ✅
woocommerce_cart_get_shipping_tax ✅
woocommerce_cart_get_shipping_total ✅

Cart actions

Old hook Works in blocks? Notes
woocommerce_before_cart ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Cart items” block could work, but it would have to be positioned manually by the merchant. It is also possible to use the render_block_{$name} filter to render before and after blocks using PHP.
woocommerce_before_cart_table ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Cart items” block could work, but it would have to be positioned manually by the merchant.
woocommerce_before_cart_contents ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Cart items” block could work, but it would have to be positioned manually by the merchant.
woocommerce_after_cart_item_name ❌ Use the itemName checkout filter.
woocommerce_before_quantity_input_field ❌ No equivalent now.
woocommerce_after_quantity_input_field ❌ No equivalent now.
woocommerce_cart_contents ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Cart items” block could work, but it would have to be positioned manually by the merchant.
woocommerce_cart_coupon ❌ ExperimentalDiscountsMeta slot/fill
woocommerce_cart_actions ❌ ExperimentalOrderMeta slot/fill
woocommerce_after_cart_contents ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Cart items” block could work, but it would have to be positioned manually by the merchant.
woocommerce_after_cart_table ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Cart items” block could work, but it would have to be positioned manually by the merchant.
woocommerce_before_cart_collaterals ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Cart items” block could work, but it would have to be positioned manually by the merchant.
woocommerce_cart_collaterals ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Cart items” block could work, but it would have to be positioned manually by the merchant.
woocommerce_before_cart_totals ❌ ExperimentalOrderMeta slot/fill
woocommerce_cart_totals_before_shipping ❌ ExperimentalOrderShippingPackages
woocommerce_after_shipping_rate ❌ ExperimentalOrderShippingPackages
woocommerce_before_shipping_calculator ❌ No specific equivalent. Closest thing is ExperimentalOrderShippingPackages
woocommerce_after_shipping_calculator ❌ No specific equivalent. Closest thing is ExperimentalOrderShippingPackages
woocommerce_cart_totals_after_shipping ❌ No specific equivalent. Closest thing is ExperimentalOrderShippingPackages
woocommerce_cart_totals_before_order_total ❌ No specific equivalent but we do have the totals footer item filters
woocommerce_cart_totals_after_order_total ❌ No specific equivalent but we do have the totals footer item filters
woocommerce_proceed_to_checkout ❌ No specific equivalent but the Checkout and Place Order button filters may work
woocommerce_after_cart_totals ❌ ExperimentalOrderMeta slot/fill
woocommerce_after_cart ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Cart items” block could work, but it would have to be positioned manually by the merchant.

Cart filters

Old hook Works in blocks? Notes
woocommerce_cart_item_product_id ❌ This does not seem to have any effect
woocommerce_cart_item_visible ❌ This does not seem to have any effect
woocommerce_get_remove_url ❌ The removal of items is handled async in the Cart block.
woocommerce_cart_item_remove_link ❌ The removal of items is handled async in the Cart block.
woocommerce_cart_item_thumbnail ❌ Changing the thumbnail this way is not supported. See woocommerce_store_api_cart_item_images (PR Link with example.)
woocommerce_cart_product_price ❌
woocommerce_cart_item_price ❌
woocommerce_quantity_input_classes ❌
woocommerce_quantity_input_max ❌ This is possible by modifying the quantity_limits property of the cart item in the woocommerce_store_api_product_quantity_{$value_type} filter.
woocommerce_quantity_input_min ❌ This is possible by modifying the quantity_limits property of the cart item in the woocommerce_store_api_product_quantity_{$value_type} filter.
woocommerce_quantity_input_step ❌ This is possible by modifying the quantity_limits property of the cart item in the woocommerce_store_api_product_quantity_{$value_type} filter.
woocommerce_quantity_input_pattern ❌ This is possible by modifying the quantity_limits property of the cart item in the woocommerce_store_api_product_quantity_{$value_type} filter.
woocommerce_quantity_input_inputmode ❌ This is possible by modifying the quantity_limits property of the cart item in the woocommerce_store_api_product_quantity_{$value_type} filter.
woocommerce_quantity_input_placeholder ❌ This is possible by modifying the quantity_limits property of the cart item in the woocommerce_store_api_product_quantity_{$value_type} filter.
woocommerce_quantity_input_autocomplete ❌ This is possible by modifying the quantity_limits property of the cart item in the woocommerce_store_api_product_quantity_{$value_type} filter.
woocommerce_quantity_input_args ❌ This is possible by modifying the quantity_limits property of the cart item in the woocommerce_store_api_product_quantity_{$value_type} filter.
woocommerce_quantity_input_type ❌ This is possible by modifying the quantity_limits property of the cart item in the woocommerce_store_api_product_quantity_{$value_type} filter.
woocommerce_cart_item_quantity ❌ This is possible by modifying the quantity_limits property of the cart item in the woocommerce_store_api_product_quantity_{$value_type} filter.
woocommerce_cart_product_subtotal ❌
woocommerce_cart_item_subtotal ❌
woocommerce_cross_sells_columns ❌ The cross sells are rendered as an inner block.
woocommerce_cross_sells_orderby ❌ The cross sells are rendered as an inner block.
woocommerce_cross_sells_order ❌ The cross sells are rendered as an inner block.
woocommerce_cross_sells_total ❌ The cross sells are rendered as an inner block.
woocommerce_product_cross_sells_products_heading ❌ This can be modified in the editor.
woocommerce_is_downloadable ❌ Does not seem to have any effect in Cart/Checkout blocks.
woocommerce_loop_product_link ❌ Changing the product links is not supported in the Cart block.
woocommerce_product_loop_title_classes ❌ Changing classes to product titles is not supported in the Cart block.
woocommerce_product_add_to_cart_aria_describedby ❌ Changing aria-describedby on products is not supported in the Cart block.
woocommerce_sale_flash ❌ This can be modified with the saleBadgePriceFormat checkout filter.
woocommerce_cart_subtotal ❌ Modifying the cart subtotal display is not supported in the Cart/Checkout blocksw
oocommerce_shipping_package_details_array ❌ This hook is not fired during Cart block rendering
woocommerce_shipping_show_shipping_calculator ❌ This is only used when rendering cart templates, which does not happen in the blocks.
woocommerce_cart_shipping_method_full_label ❌ This hook has no effect in the Cart/Checkout blocks.
woocommerce_get_shipping_tax ❌ This filter is not used in the Cart/Checkout blocks.
woocommerce_shipping_calculator_enable_country ❌ This filter is not used in the Cart/Checkout blocks.
woocommerce_shipping_calculator_enable_state ❌ This filter is not used in the Cart/Checkout blocks.
woocommerce_shipping_calculator_enable_city ❌ This filter is not used in the Cart/Checkout blocks.
woocommerce_shipping_calculator_enable_postcode ❌ This filter is not used in the Cart/Checkout blocks.
woocommerce_cart_totals_fee_html ❌ Modifying the fees display is not supported in the Cart/Checkout blocks
woocommerce_countries_estimated_for_prefix ❌
woocommerce_cart_total ❌ Modifying the cart total using this hook is not supported in the Cart/Checkout blocks
woocommerce_cart_totals_order_total_html ❌ Modifying the cart total using this hook is not supported in the Cart/Checkout blocks

Checkout actions

Old hook Works in blocks? Notes
woocommerce_before_checkout_form_cart_notices ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block could work, but it would have to be positioned manually by the merchant.
woocommerce_before_checkout_form ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block could work, but it would have to be positioned manually by the merchant.
woocommerce_checkout_before_customer_details ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block could work, but it would have to be positioned manually by the merchant.
woocommerce_checkout_billing ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block could work, but it would have to be positioned manually by the merchant.
woocommerce_before_checkout_billing_form ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block could work, but it would have to be positioned manually by the merchant.
woocommerce_after_checkout_billing_form ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block could work, but it would have to be positioned manually by the merchant.
woocommerce_checkout_shipping ❌ Not directly equivalent due to positioning, but ExperimentalOrderShippingPackages could work – so could adding an inner block to the shipping block
woocommerce_before_checkout_shipping_form ❌ Not directly equivalent due to positioning, but ExperimentalOrderShippingPackages could work – so could adding an inner block to the shipping block
woocommerce_after_checkout_shipping_form ❌ Not directly equivalent due to positioning, but ExperimentalOrderShippingPackages could work – so could adding an inner block to the shipping block
woocommerce_before_order_notes ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block could work, but it would have to be positioned manually by the merchant.
woocommerce_after_order_notes ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block could work, but it would have to be positioned manually by the merchant.
woocommerce_checkout_after_customer_details ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block could work, but it would have to be positioned manually by the merchant.
woocommerce_checkout_before_order_review_heading ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Order Summary” block could work, but it would have to be positioned manually by the merchant.
woocommerce_checkout_before_order_review ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Order Summary” block could work, but it would have to be positioned manually by the merchant.
woocommerce_checkout_order_review ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Order Summary” block could work, but it would have to be positioned manually by the merchant.
woocommerce_review_order_before_cart_contents ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Order Summary” block could work, but it would have to be positioned manually by the merchant.
woocommerce_review_order_after_cart_contents ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Order Summary” block could work, but it would have to be positioned manually by the merchant.
woocommerce_review_order_before_shipping ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Order Summary” block could work, but it would have to be positioned manually by the merchant.
woocommerce_after_shipping_rate ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Order Summary” block could work, but it would have to be positioned manually by the merchant.
woocommerce_review_order_after_shipping ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Order Summary” block could work, but it would have to be positioned manually by the merchant.
woocommerce_review_order_before_order_total ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Order Summary” block could work, but it would have to be positioned manually by the merchant.
woocommerce_review_order_after_order_total ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Order Summary” block could work, but it would have to be positioned manually by the merchant.
woocommerce_review_order_before_payment ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block or Payment block could work, but it would have to be positioned manually by the merchant.
woocommerce_checkout_before_terms_and_conditions ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block could work, but it would have to be positioned manually by the merchant.
woocommerce_checkout_terms_and_conditions ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block could work, but it would have to be positioned manually by the merchant.
woocommerce_checkout_after_terms_and_conditions ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block could work, but it would have to be positioned manually by the merchant.
woocommerce_review_order_before_submit ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block could work, but it would have to be positioned manually by the merchant.
woocommerce_review_order_after_submit ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block could work, but it would have to be positioned manually by the merchant.
woocommerce_review_order_after_payment ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block or Payment block could work, but it would have to be positioned manually by the merchant.
woocommerce_checkout_after_order_review ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Order Summary” block could work, but it would have to be positioned manually by the merchant.
woocommerce_after_checkout_form ❌ No specific equivalent and no Slot/fill for this area. Maybe adding an inner block to the “Checkout Fields” block could work, but it would have to be positioned manually by the merchant.
woocommerce_checkout_update_order_review ❌ These type of AJAX events do not occur when using the Cart/Checkout blocks

Checkout filters

Old hook Works in blocks? Notes
woocommerce_add_notice 🔶 These notices are only added on page load of the Cart/Checkout blocks. Any that happen during API requests are stored and output on the next full page load.
woocommerce_checkout_coupon_message ❌ The coupon message cannot be customised using this filter.
woocommerce_form_field_args ❌ Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_form_field_text ❌ Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_form_field ❌ Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_form_field_country ❌ Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_form_field_state ❌ Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_form_field_tel ❌ Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_form_field_email ❌ Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_cart_needs_shipping_address ❌ The wc/store/cart data store should be used to control this.
woocommerce_ship_to_different_address_checked ❌ The wc/store/checkout data store should be used to check if this checkbox is checked.
woocommerce_enable_order_notes_field ❌ This block must be removed in the editor, this filter will not affect its presence in the Checkout block
woocommerce_form_field_textarea ❌ Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_checkout_cart_item_visible ❌ It is not possible to filter cart items from the order summary in the Cart/Checkout blocks.
woocommerce_cart_item_class ❌ It is not possible to add classes to specific cart items in the order summary in the Cart/Checkout blocks.
woocommerce_checkout_cart_item_quantity ❌ It is not possible to modify the quantity display of cart items in the order summary in the Cart/Checkout blocks.
woocommerce_cart_product_subtotal ❌ Modifying the product subtotal display is not supported in the Cart/Checkout blocks
woocommerce_cart_item_subtotal ❌ Modifying the product subtotal display is not supported in the Cart/Checkout blocks
woocommerce_cart_subtotal ❌ Modifying the cart subtotal display is not supported in the Cart/Checkout blocks
woocommerce_cart_shipping_method_full_label ❌ Modifying the shipping method display is not supported in the Cart/Checkout blocks
woocommerce_get_shipping_tax ❌ This filter is not used in the Cart/Checkout blocks.
woocommerce_cart_totals_fee_html ❌ Modifying the fees display is not supported in the Cart/Checkout blocks
woocommerce_cart_total ❌ Modifying the cart total using this hook is not supported in the Cart/Checkout blocks
woocommerce_cart_totals_order_total_html ❌ Modifying the order total html using this hook is not supported in the Cart/Checkout blocks – edit it using the editor.
woocommerce_order_button_text ❌ Modifying the order button html using this hook is not supported in the Cart/Checkout blocks – edit it using the editor.
woocommerce_gateway_title ❌ These can be included in the “Content” rendered by gateways registered with the Cart/Checkout block but it is not possible to control this via PHP filters.
woocommerce_gateway_icon ❌ Gateway icons are not shown. They can be included in the “Content” rendered by gateways registered with the Cart/Checkout block but it is not possible to control this via PHP filters.
woocommerce_gateway_description ❌ Changing gateways this way is not possible, gateways need to register with the Cart/Checkout blocks using JavaScript and third party extensions can’t modify these front-end details.
woocommerce_checkout_show_terms ❌ This is not controllable via this filter. The block can be removed in the editor.
woocommerce_get_privacy_policy_text ❌ Modifying the privacy policy text using this filter is not supported. It can be modified in the editor.
woocommerce_order_button_html ❌ Modifying the order button html using this hook is not supported in the Cart/Checkout blocks – edit it using the editor.
woocommerce_update_order_review_fragments ❌ Fragments are not used on the Cart/Checkout blocks.

Place order actions

This section is a work in progress.

Place order filters

This section is a work in progress.

Order summary actions

This section is a work in progress.

Order summary filters

This section is a work in progress.

Common extensibility paths

Cart and Checkout blocks

Fully supported with no modification needed

  • Modifying fees and other prices on the cart (woocommerce_cart_calculate_fees)
  • Updating customer information during the WC lifecycle events, e.g. on woocommerce_init, updating a customer’s address would reflect in the Cart/Checkout blocks.
  • Adding Shipping methods
  • Changing product names using woocommerce_product_get_name

Partially supported or supported by alternative approach

  • Modifying the layout, e.g. inserting content before/after specific sections such as shipping, payment, and the billing/shipping addresses. Examples include: Outputting content in various places, e.g. before the cart contents are printed (woocommerce_cart_contents) and before the shipping rates (woocommerce_before_shipping_rate):
    • This is supported by our use of Slot/Fill and by registering inner blocks as children of the block you want to show them after.
  • Adding payment methods
    • Simply adding the payment method is not enough, developers need to register a React component to show in the payments block as well.
  • Adding shipping methods for local pickup
    • Should work as normal, but does require the method to support collectable
  • Modify the names of items in the cart
    • Requires the developer to use a JS filter rather than PHP filter

Not supported at all

  • Modifying individual cart line items to add or change content/change HTML (outside of what is offered by our checkout filters).

Checkout block

Fully supported with no modification needed

  • Pre-filling values on the form (Some merchants achieve this by overriding their values using woocommerce_checkout_get_value)
    • This is supported insofar as we respect what has been set on the cart/customer object when loading the cart. woocommerce_checkout_get_value is not supported in the Checkout block, but this is this hooks only use-case.

Partially supported or supported by alternative approach

  • Adding new Checkout fields (commonly achieved with the woocommerce_checkout_fields hook)
    • Supported by the Additional Checkout Fields API, not all field types are supported right now
  • Custom field validation using hooks such as woocommerce_checkout_process
    • Supported by hooking into the payment processing events – validation at the point of pressing “Place order” this is only be possible for payment methods. Other extensions could add validation errors to the data store prior to the button being pressed, and this would prevent checkout, but it is not a good solution, especially if the validation checks are expensive.
  • Updating orders/customers with hooks before/during/after order placement
    • We have some hooks that fire during checkout:
      • woocommerce_store_api_checkout_order_processed – fired when the order has been placed
      • woocommerce_store_api_checkout_update_customer_from_request – fired when the customer is being updated with data from the checkout request
      • woocommerce_store_api_checkout_update_order_meta – fired when order meta data is being updated with data from the request
    • Any other WC hooks that fire in the Shortcode process (e.g. woocommerce_checkout_order_processed will not fire on Store API requests from the blocks)
  • Customising the place order button text using woocommerce_order_button_text
    • Not supported with hooks but it is possible in the editor. There is no programmatic way to achieve this right now.

Not supported at all

  • Changing existing core fields (commonly achieved with the woocommerce_checkout_fields hook)
  • Removing billing/shipping addresses (using the above method)
  • Performanign actions just before the order is finalised (woocommerce_checkout_create_order)

Cart block

Fully supported with no modification needed

  • None that aren’t already covered by “both blocks” section.

Partially supported or supported by alternative approach

  • Limiting quantity selections on cart items, e.g. minimum, maximum or step values. Previously this would be done using filters such as woocommerce_quantity_input_step
    • This is possible by modifying the quantity_limits property of the cart item in the woocommerce_store_api_product_quantity_{$value_type} filter.

Not supported at all

  • Modifying the layout by altering template files (unless using a block theme and a custom template)

Last updated: December 20, 2024