Created
May 15, 2026 12:40
-
-
Save xlplugins/c2906c726426f19bb4f0edcb6ede9d1d to your computer and use it in GitHub Desktop.
FK Bricks — Mini-cart fragment fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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