Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Created May 15, 2026 12:40
Show Gist options
  • Select an option

  • Save xlplugins/c2906c726426f19bb4f0edcb6ede9d1d to your computer and use it in GitHub Desktop.

Select an option

Save xlplugins/c2906c726426f19bb4f0edcb6ede9d1d to your computer and use it in GitHub Desktop.
FK Bricks — Mini-cart fragment fix
add_filter( 'woocommerce_update_order_review_fragments', function ( $fragments ) {
if ( ! class_exists( 'WFACP_Common' ) || ! defined( 'BRICKS_DB_PAGE_CONTENT' ) ) {
return $fragments;
}
$tpl = wfacp_template();
if ( ! $tpl ) {
return $fragments;
}
foreach ( (array) get_post_meta( WFACP_Common::get_id(), BRICKS_DB_PAGE_CONTENT, true ) as $el ) {
if ( ( $el['name'] ?? '' ) === 'wfacp-order-summary' && ! empty( $el['id'] ) ) {
$fragments = $tpl->get_mini_cart_fragments( $fragments, $el['id'] );
}
}
return $fragments;
}, PHP_INT_MAX );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment