Skip to main content

Hook alternatives

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​

IconDescription
βœ…Fully supported
πŸ”ΆPartially supported
❌Not supported
❓Unknown

If a hook is marked as Unknown ❓(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 an Unknown ❓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 hookWorks in blocks?Notes
woocommerce_load_cart_from_sessionFully supported βœ…
woocommerce_cart_loaded_from_sessionFully supported βœ…
woocommerce_set_cart_cookiesFully supported βœ…
woocommerce_shipping_zone_loadedFully supported βœ…
woocommerce_check_cart_itemsFully supported βœ…May be better to use woocommerce_store_api_validate_cart_item
woocommerce_before_calculate_totalsFully supported βœ…
woocommerce_shipping_initFully supported βœ…
woocommerce_load_shipping_methodsFully supported βœ…
woocommerce_cart_calculate_feesFully supported βœ…
woocommerce_calculate_totalsFully supported βœ…
woocommerce_after_calculate_totalsFully supported βœ…
woocommerce_cart_updatedFully supported βœ…
woocommerce_before_get_rates_for_packageFully supported βœ…
woocommerce_after_get_rates_for_packageFully supported βœ…
woocommerce_checkout_initFully supported βœ…
woocommerce_customer_loadedFully supported βœ…

WooCommerce lifecycle filters​

Old hookWorks in blocks?Notes
woocommerce_notice_typesUnknown ❓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_tagsUnknown ❓
woocommerce_product_get_stock_statusFully supported βœ…
woocommerce_product_is_in_stockFully supported βœ…
woocommerce_product_get_manage_stockUnknown ❓
woocommerce_product_get_tax_classFully supported βœ…
woocommerce_product_get_tax_statusUnknown ❓
woocommerce_prices_include_taxUnknown ❓
woocommerce_apply_base_tax_for_local_pickupUnknown ❓
woocommerce_local_pickup_methodsNot supported ❌Does not affect the blocks-based local pickup methods
woocommerce_customer_get_shipping_postcodeFully supported βœ…
woocommerce_customer_get_shipping_cityFully supported βœ…
woocommerce_customer_taxable_addressUnknown ❓
woocommerce_shipping_methodsFully supported βœ…
woocommerce_format_localized_priceUnknown ❓
woocommerce_shipping_local_pickup_optionNot supported ❌Does not affect the blocks-based local pickup methods
woocommerce_shipping_pickup_location_optionUnknown ❓Unsure if changing this changes the way local pickup shows in the Cart/Checkout
woocommerce_shipping_method_supportsFully supported βœ…
woocommerce_get_tax_locationUnknown ❓
woocommerce_format_postcodeUnknown ❓
woocommerce_matched_tax_ratesUnknown ❓
woocommerce_find_ratesUnknown ❓
woocommerce_matched_ratesUnknown ❓
woocommerce_cart_totals_get_item_tax_ratesFully supported βœ…
woocommerce_adjust_non_base_location_pricesUnknown ❓
woocommerce_product_is_taxableFully supported βœ…
woocommerce_price_ex_tax_amountFully supported βœ…
woocommerce_tax_roundFully supported βœ…
woocommerce_calc_taxFully supported βœ…
woocommerce_calculate_item_totals_taxesFully supported βœ…
woocommerce_cart_ready_to_calc_shippingFully supported βœ…
woocommerce_product_get_virtualFully supported βœ…
woocommerce_is_virtualFully supported βœ…
woocommerce_product_needs_shippingFully supported βœ…
woocommerce_cart_needs_shippingFully supported βœ…
woocommerce_customer_get_shipping_address_1Fully supported βœ…
woocommerce_customer_get_shipping_address_2Fully supported βœ…
woocommerce_cart_display_prices_including_taxFully supported βœ…
woocommerce_cart_get_subtotalFully supported βœ…
woocommerce_cart_shipping_packagesFully supported βœ…
woocommerce_product_get_shipping_class_idFully supported βœ…
woocommerce_countries_shipping_countriesFully supported βœ…
woocommerce_get_zone_criteriaFully supported βœ…
woocommerce_shipping_zone_shipping_methodsFully supported βœ…
woocommerce_shipping_free_shipping_is_availableUnknown ❓
woocommerce_product_get_nameFully supported βœ…
woocommerce_shipping_method_add_rateFully supported βœ…
woocommerce_shipping_flat_rate_is_availableFully supported βœ…
woocommerce_evaluate_shipping_cost_argsFully supported βœ…
woocommerce_calc_shipping_taxFully supported βœ…
woocommerce_localisation_address_formatsFully supported βœ…
woocommerce_countries_base_countryUnknown ❓
woocommerce_formatted_address_force_country_displayUnknown ❓
woocommerce_statesFully supported βœ…
woocommerce_formatted_address_replacementsUnknown ❓
woocommerce_package_ratesFully supported βœ…
woocommerce_shipping_packagesFully supported βœ…
woocommerce_shipping_rate_method_idFully supported βœ…
woocommerce_shipping_rate_taxesFully supported βœ…
woocommerce_shipping_rate_costFully supported βœ…
woocommerce_cart_totals_get_fees_from_cart_taxesFully supported βœ…
woocommerce_calculated_totalNot supported ❌This does not seem to have any effect
woocommerce_cart_get_discount_totalFully supported βœ…
woocommerce_cart_get_cart_contents_totalFully supported βœ…
woocommerce_get_price_excluding_taxNot supported ❌This does not seem to have any effect
raw_woocommerce_priceNot supported ❌This does not seem to have any effect
formatted_woocommerce_priceNot supported ❌This does not seem to have any effect
woocommerce_price_trim_zerosNot supported ❌This does not seem to have any effect
woocommerce_get_cart_page_permalinkNot supported ❌This does not seem to have any effect
woocommerce_get_cart_urlNot supported ❌This does not seem to have any effect
woocommerce_checkout_registration_enabledFully supported βœ…This does not seem to have any effect
woocommerce_get_checkout_page_permalinkNot supported ❌This does not seem to have any effect
woocommerce_get_checkout_urlNot supported ❌This does not seem to have any effect
woocommerce_checkout_get_valueNot supported ❌This does not seem to have any effect
woocommerce_default_address_fieldsNot supported ❌This does not seem to have any effect
default_checkout_billing_countryNot supported ❌This does not seem to have any effect
default_checkout_shiping_countryNot supported ❌This does not seem to have any effect
woocommerce_get_country_localeFully supported βœ…
woocommerce_get_country_locale_defaultUnknown ❓
woocommerce_get_country_locale_baseUnknown ❓
woocommerce_billing_fieldsPartially supported πŸ”ΆEditing core fields is not supported, but adding them is via Additional Checkout Fields API
woocommerce_shipping_fieldsPartially supported πŸ”ΆEditing core fields is not supported, but adding them is via Additional Checkout Fields API
woocommerce_checkout_fieldsPartially supported πŸ”ΆEditing core fields is not supported, but adding them is via Additional Checkout Fields API
woocommerce_cart_item_productNot supported ❌Modifying individual cart items is not possible
woocommerce_payment_gateway_supportsFully supported βœ…
woocommerce_customer_get_billing_first_nameFully supported βœ…
woocommerce_customer_get_billing_last_nameFully supported βœ…
woocommerce_customer_get_billing_companyFully supported βœ…
woocommerce_customer_get_billing_address_1Fully supported βœ…
woocommerce_customer_get_billing_address_2Fully supported βœ…
woocommerce_customer_get_billing_cityFully supported βœ…
woocommerce_customer_get_billing_postcodeFully supported βœ…
woocommerce_customer_get_billing_phoneFully supported βœ…
woocommerce_customer_get_shipping_first_nameFully supported βœ…
woocommerce_customer_get_shipping_last_nameFully supported βœ…
woocommerce_customer_get_shipping_companyFully supported βœ…
woocommerce_get_item_dataFully supported βœ…
woocommerce_cart_get_subtotal_taxNot supported ❌This does not seem to have any effect
woocommerce_shipping_package_nameFully supported βœ…
woocommerce_shipping_rate_idUnknown ❓
woocommerce_shipping_rate_labelFully supported βœ…
woocommerce_cart_get_shipping_taxesFully supported βœ…
woocommerce_cart_get_fee_taxesFully supported βœ…
woocommerce_cart_get_taxesFully supported βœ…
woocommerce_rate_codeUnknown ❓
woocommerce_rate_compoundUnknown ❓
woocommerce_rate_labelFully supported βœ…
woocommerce_cart_hide_zero_taxesUnknown ❓
woocommerce_cart_tax_totalsFully supported βœ…
woocommerce_cart_needs_paymentFully supported βœ…
woocommerce_order_classFully supported βœ…
woocommerce_checkout_registration_requiredUnknown ❓
woocommerce_privacy_policy_page_idFully supported βœ…
woocommerce_get_terms_page_idUnknown ❓
woocommerce_terms_and_conditions_page_idUnknown ❓
woocommerce_cart_contents_countUnknown ❓
woocommerce_country_locale_field_selectorsNot supported ❌
woocommerce_get_return_urlFully supported βœ…
woocommerce_cart_hashFully supported βœ…
woocommerce_cart_get_fee_taxFully supported βœ…
woocommerce_customer_default_location_arrayFully supported βœ…
woocommerce_countriesFully supported βœ…
woocommerce_sort_countriesNot supported ❌This does not seem to have any effect
woocommerce_countries_allowed_countriesFully supported βœ…
woocommerce_customer_default_location_arrayFully supported βœ…
woocommerce_customer_get_billing_countryFully supported βœ…
woocommerce_customer_get_shipping_countryFully supported βœ…
woocommerce_customer_get_billing_stateFully supported βœ…
woocommerce_customer_get_shipping_stateFully supported βœ…
woocommerce_customer_get_billing_emailFully supported βœ…
woocommerce_cart_session_initializeFully supported βœ…
woocommerce_get_checkout_page_idFully supported βœ…
woocommerce_get_cart_page_idFully supported βœ…
woocommerce_is_checkoutFully supported βœ…
woocommerce_currencyFully supported βœ…
woocommerce_currency_symbolsFully supported βœ…
woocommerce_currency_symbolFully supported βœ…
woocommerce_price_formatFully supported βœ…
woocommerce_coupons_enabledFully supported βœ…
woocommerce_get_shop_page_idFully supported βœ…
current_theme_supports-woocommerceFully supported βœ…
woocommerce_payment_gatewaysPartially supported πŸ”Ά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_locationFully supported βœ…
woocommerce_gateway_iconNot supported ❌This hook has no effect since icons are not displayed.
woocommerce_get_image_size_thumbnailFully supported βœ…
woocommerce_get_image_size_singleFully supported βœ…
woocommerce_product_stock_status_optionsFully supported βœ…
woocommerce_cart_item_nameNot supported ❌Use the itemName checkout filter.
woocommerce_product_get_statusFully supported βœ…
woocommerce_product_get_priceFully supported βœ…
woocommerce_is_purchasableFully supported βœ…
woocommerce_cart_item_is_purchasableFully supported βœ…
woocommerce_cart_item_data_to_validateFully supported βœ…
woocommerce_get_cart_item_from_sessionFully supported βœ…
woocommerce_cart_contents_changedFully supported βœ…
woocommerce_get_cart_contentsFully supported βœ…
woocommerce_stock_amountFully supported βœ…
woocommerce_cart_item_remove_linkNot supported ❌Use the showRemoveItemLink checkout filter.
woocommerce_cart_item_quantityNot supported ❌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_imageNot supported ❌Use woocommerce_store_api_cart_item_images (PR Link with example.)
woocommerce_cart_no_shipping_available_htmlNot supported ❌This is not editable
woocommerce_available_payment_gatewaysPartially supported πŸ”Ά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_totalFully supported βœ…
woocommerce_cart_get_fee_taxFully supported βœ…
woocommerce_cart_get_cart_contents_taxFully supported βœ…
woocommerce_cart_get_shipping_taxFully supported βœ…
woocommerce_cart_get_shipping_totalFully supported βœ…

Cart actions​

Old hookWorks in blocks?Notes
woocommerce_before_cartNot supported ❌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_tableNot supported ❌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_contentsNot supported ❌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_nameNot supported ❌Use the itemName checkout filter.
woocommerce_before_quantity_input_fieldNot supported ❌No equivalent now.
woocommerce_after_quantity_input_fieldNot supported ❌No equivalent now.
woocommerce_cart_contentsNot supported ❌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_couponNot supported ❌ExperimentalDiscountsMeta slot/fill
woocommerce_cart_actionsNot supported ❌ExperimentalOrderMeta slot/fill
woocommerce_after_cart_contentsNot supported ❌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_tableNot supported ❌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_collateralsNot supported ❌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_collateralsNot supported ❌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_totalsNot supported ❌ExperimentalOrderMeta slot/fill
woocommerce_cart_totals_before_shippingNot supported ❌ExperimentalOrderShippingPackages
woocommerce_after_shipping_rateNot supported ❌ExperimentalOrderShippingPackages
woocommerce_before_shipping_calculatorNot supported ❌No specific equivalent. Closest thing is ExperimentalOrderShippingPackages
woocommerce_after_shipping_calculatorNot supported ❌No specific equivalent. Closest thing is ExperimentalOrderShippingPackages
woocommerce_cart_totals_after_shippingNot supported ❌No specific equivalent. Closest thing is ExperimentalOrderShippingPackages
woocommerce_cart_totals_before_order_totalNot supported ❌No specific equivalent but we do have the totals footer item filters
woocommerce_cart_totals_after_order_totalNot supported ❌No specific equivalent but we do have the totals footer item filters
woocommerce_proceed_to_checkoutNot supported ❌No specific equivalent but the Checkout and Place Order button filters may work
woocommerce_after_cart_totalsNot supported ❌ExperimentalOrderMeta slot/fill
woocommerce_after_cartNot supported ❌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 hookWorks in blocks?Notes
woocommerce_cart_item_product_idNot supported ❌This does not seem to have any effect
woocommerce_cart_item_visibleNot supported ❌This does not seem to have any effect
woocommerce_get_remove_urlNot supported ❌The removal of items is handled async in the Cart block.
woocommerce_cart_item_remove_linkNot supported ❌The removal of items is handled async in the Cart block.
woocommerce_cart_item_thumbnailNot supported ❌Changing the thumbnail this way is not supported. See woocommerce_store_api_cart_item_images (PR Link with example.)
woocommerce_cart_product_priceNot supported ❌
woocommerce_cart_item_priceNot supported ❌
woocommerce_quantity_input_classesNot supported ❌
woocommerce_quantity_input_maxNot supported ❌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_minNot supported ❌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_stepNot supported ❌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_patternNot supported ❌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_inputmodeNot supported ❌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_placeholderNot supported ❌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_autocompleteNot supported ❌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_argsNot supported ❌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_typeNot supported ❌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_quantityNot supported ❌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_subtotalNot supported ❌
woocommerce_cart_item_subtotalNot supported ❌
woocommerce_cross_sells_columnsNot supported ❌The cross sells are rendered as an inner block.
woocommerce_cross_sells_orderbyNot supported ❌The cross sells are rendered as an inner block.
woocommerce_cross_sells_orderNot supported ❌The cross sells are rendered as an inner block.
woocommerce_cross_sells_totalNot supported ❌The cross sells are rendered as an inner block.
woocommerce_product_cross_sells_products_headingNot supported ❌This can be modified in the editor.
woocommerce_is_downloadableNot supported ❌Does not seem to have any effect in Cart/Checkout blocks.
woocommerce_loop_product_linkNot supported ❌Changing the product links is not supported in the Cart block.
woocommerce_product_loop_title_classesNot supported ❌Changing classes to product titles is not supported in the Cart block.
woocommerce_product_add_to_cart_aria_describedbyNot supported ❌Changing aria-describedby on products is not supported in the Cart block.
woocommerce_sale_flashNot supported ❌This can be modified with the saleBadgePriceFormat checkout filter.
woocommerce_cart_subtotalNot supported ❌Modifying the cart subtotal display is not supported in the Cart/Checkout blocksw
oocommerce_shipping_package_details_arrayNot supported ❌This hook is not fired during Cart block rendering
woocommerce_shipping_show_shipping_calculatorNot supported ❌This is only used when rendering cart templates, which does not happen in the blocks.
woocommerce_cart_shipping_method_full_labelNot supported ❌This hook has no effect in the Cart/Checkout blocks.
woocommerce_get_shipping_taxNot supported ❌This filter is not used in the Cart/Checkout blocks.
woocommerce_shipping_calculator_enable_countryNot supported ❌This filter is not used in the Cart/Checkout blocks.
woocommerce_shipping_calculator_enable_stateNot supported ❌This filter is not used in the Cart/Checkout blocks.
woocommerce_shipping_calculator_enable_cityNot supported ❌This filter is not used in the Cart/Checkout blocks.
woocommerce_shipping_calculator_enable_postcodeNot supported ❌This filter is not used in the Cart/Checkout blocks.
woocommerce_cart_totals_fee_htmlNot supported ❌Modifying the fees display is not supported in the Cart/Checkout blocks
woocommerce_countries_estimated_for_prefixNot supported ❌
woocommerce_cart_totalNot supported ❌Modifying the cart total using this hook is not supported in the Cart/Checkout blocks
woocommerce_cart_totals_order_total_htmlNot supported ❌Modifying the cart total using this hook is not supported in the Cart/Checkout blocks

Checkout actions​

Old hookWorks in blocks?Notes
woocommerce_before_checkout_form_cart_noticesNot supported ❌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_formNot supported ❌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_detailsNot supported ❌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_billingNot supported ❌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_formNot supported ❌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_formNot supported ❌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_shippingNot supported ❌Not directly equivalent due to positioning, but ExperimentalOrderShippingPackages could work - so could adding an inner block to the shipping block
woocommerce_before_checkout_shipping_formNot supported ❌Not directly equivalent due to positioning, but ExperimentalOrderShippingPackages could work - so could adding an inner block to the shipping block
woocommerce_after_checkout_shipping_formNot supported ❌Not directly equivalent due to positioning, but ExperimentalOrderShippingPackages could work - so could adding an inner block to the shipping block
woocommerce_before_order_notesNot supported ❌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_notesNot supported ❌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_detailsNot supported ❌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_headingNot supported ❌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_reviewNot supported ❌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_reviewNot supported ❌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_contentsNot supported ❌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_contentsNot supported ❌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_shippingNot supported ❌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_rateNot supported ❌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_shippingNot supported ❌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_totalNot supported ❌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_totalNot supported ❌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_paymentNot supported ❌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_conditionsNot supported ❌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_conditionsNot supported ❌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_conditionsNot supported ❌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_submitNot supported ❌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_submitNot supported ❌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_paymentNot supported ❌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_reviewNot supported ❌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_formNot supported ❌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_reviewNot supported ❌These type of AJAX events do not occur when using the Cart/Checkout blocks

Checkout filters​

Old hookWorks in blocks?Notes
woocommerce_add_noticePartially supported πŸ”Ά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_messageNot supported ❌The coupon message cannot be customised using this filter.
woocommerce_form_field_argsNot supported ❌Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_form_field_textNot supported ❌Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_form_fieldNot supported ❌Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_form_field_countryNot supported ❌Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_form_field_stateNot supported ❌Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_form_field_telNot supported ❌Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_form_field_emailNot supported ❌Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_cart_needs_shipping_addressNot supported ❌The wc/store/cart data store should be used to control this.
woocommerce_ship_to_different_address_checkedNot supported ❌The wc/store/checkout data store should be used to check if this checkbox is checked.
woocommerce_enable_order_notes_fieldNot supported ❌This block must be removed in the editor, this filter will not affect its presence in the Checkout block
woocommerce_form_field_textareaNot supported ❌Modifying core form fields is not supported yet in the Cart/Checkout blocks.
woocommerce_checkout_cart_item_visibleNot supported ❌It is not possible to filter cart items from the order summary in the Cart/Checkout blocks.
woocommerce_cart_item_classNot supported ❌It is not possible to add classes to specific cart items in the order summary in the Cart/Checkout blocks.
woocommerce_checkout_cart_item_quantityNot supported ❌It is not possible to modify the quantity display of cart items in the order summary in the Cart/Checkout blocks.
woocommerce_cart_product_subtotalNot supported ❌Modifying the product subtotal display is not supported in the Cart/Checkout blocks
woocommerce_cart_item_subtotalNot supported ❌Modifying the product subtotal display is not supported in the Cart/Checkout blocks
woocommerce_cart_subtotalNot supported ❌Modifying the cart subtotal display is not supported in the Cart/Checkout blocks
woocommerce_cart_shipping_method_full_labelNot supported ❌Modifying the shipping method display is not supported in the Cart/Checkout blocks
woocommerce_get_shipping_taxNot supported ❌This filter is not used in the Cart/Checkout blocks.
woocommerce_cart_totals_fee_htmlNot supported ❌Modifying the fees display is not supported in the Cart/Checkout blocks
woocommerce_cart_totalNot supported ❌Modifying the cart total using this hook is not supported in the Cart/Checkout blocks
woocommerce_cart_totals_order_total_htmlNot supported ❌Modifying the order total html using this hook is not supported in the Cart/Checkout blocks - edit it using the editor.
woocommerce_order_button_textNot supported ❌Modifying the order button html using this hook is not supported in the Cart/Checkout blocks - edit it using the editor.
woocommerce_gateway_titleNot supported ❌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_iconNot supported ❌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_descriptionNot supported ❌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_termsNot supported ❌This is not controllable via this filter. The block can be removed in the editor.
woocommerce_get_privacy_policy_textNot supported ❌Modifying the privacy policy text using this filter is not supported. It can be modified in the editor.
woocommerce_order_button_htmlNot supported ❌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_fragmentsNot supported ❌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)