WordPress action & filter hook
woocommerce_update_order_review_fragments
Defined by WooCommerce and fired by 7 plugins in total, running on 7.1M+ sites between them.
“Filter the HTML fragments returned with a checkout update, keyed by the selector each one replaces.”
How to use woocommerce_update_order_review_fragments
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'woocommerce_update_order_review_fragments', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
7 plugins that fire woocommerce_update_order_review_fragments
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
apply_filters( 'woocommerce_update_order_review_fragments', array( '.woocommerce-checkout-review-order-table' => $woocommerce_order_review, '.woocommerce-checkout-payment' => $woocommerce_checkout_payment, ) )includes/class-wc-ajax.php:541 -
FunnelKit30,000+ installs
apply_filters( 'woocommerce_update_order_review_fragments', array( '.woocommerce-checkout-review-order-table' => $woocommerce_order_review, ) )modules/checkouts/includes/class-wfacp-common.php:2200 -
CURCY20,000+ installs
apply_filters( 'woocommerce_update_order_review_fragments', array( '.woocommerce-checkout-review-order-table' => $woocommerce_order_review, '.woocommerce-checkout-payment' => $woocommerce_checkout_payment, ) )frontend/checkout.php:177 -
WPFunnels5,000+ installs
apply_filters( 'woocommerce_update_order_review_fragments', array( '.woocommerce-checkout-review-order-table' => $woocommerce_order_review, ) )includes/utils/class-wpfnl-functions.php:3047 -
Svea Checkout for WooCommerce800+ installs
apply_filters( 'woocommerce_update_order_review_fragments', [ 'form.woocommerce-checkout' => wc_print_notice( esc_html__( 'Sorry, your session has expired.', 'woocommerce' ) . ' <a href="' . esc_url( wc_get_page_permalink( 'shop' ) ) . '" class="wc-backward">' . esc_html__( 'Return to shop', 'woocommerce' ) . '</a>', 'error', [], true ), ] )inc/Template_Handler.php:703 -
Pagopar300+ installs
do_action( 'woocommerce_update_order_review_fragments' )woocommerce-pagopar-gateway.php:3622 -
Gellum Delivery Calculator for WooCommerce20+ installs
apply_filters( 'woocommerce_update_order_review_fragments', array( '.woocommerce-checkout-review-order-table' => $review_frag, '.woocommerce-checkout-payment' => $payment_frag, ) )includes/class-gellumdcw-ajax.php:103 -
Dpago10+ installs
do_action( 'woocommerce_update_order_review_fragments' )includes/payment-checkout-description.php:86 -
Invoice management for WoocommerceFewer than 10 installs
apply_filters( 'woocommerce_update_order_review_fragments', array( 'form.woocommerce-checkout' => '<div class="woocommerce-error">' . __( 'Sorry, your session has expired.', 'woocommerce' ) . ' <a href="' . esc_url( wc_get_page_permalink( 'shop' ) ) . '" class="wc-backward">' . __( 'Return to shop', 'woocommerce' ) . '</a></div>', ) )includes/class-wc-ajax.php:279
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.