Title: Block based cart
Last modified: August 28, 2024

---

# Block based cart

 *  Resolved [Make carlos](https://wordpress.org/support/users/make-carlos/)
 * (@make-carlos)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/block-based-cart/)
 * I want to show one custom message based on cart update, for example if i have
   10 items in cart and when i remove one item total is updated in block based cart
 * but based on updated total i need to show one custom message but i can’t find
   out any method to do with block based cart.
 * Is there any tutorial links or document in which woocommerce mentioned that based
   on which render block hook we can do this? trying since 2 days but not found 
   anything.
 *     ```wp-block-code
       add_filter( 'render_block', 'bbloomer_woocommerce_cart_block_do_actions', 9999, 2 ); function bbloomer_woocommerce_cart_block_do_actions( $block_content, $block ) {   $blocks = array(      'woocommerce/filled-cart-block',   );   if ( in_array( $block['blockName'], $blocks ) ) {      ob_start();      do_action( 'bbloomer_before_' . $block['blockName'] );      echo $block_content;      do_action( 'bbloomer_after_' . $block['blockName'] );      $block_content = ob_get_contents();      ob_end_clean();   }   return $block_content;}add_action( 'bloomer_before_woocommerce/filled-cart-block', 'disaplay_message');function disaplay_message() {    // Get the cart total    $cart_total = WC()->cart->cart_contents_total;    if ($cart_total > 500) {        echo "Custom message show";    }}
       ```
   
 * I hope support will give me document link instead of redirecting me to paid tasks.

Viewing 1 replies (of 1 total)

 *  [ckadenge (woo-hc)](https://wordpress.org/support/users/ckadenge/)
 * (@ckadenge)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/block-based-cart/#post-17979904)
 * Hi [@make-carlos](https://wordpress.org/support/users/make-carlos/),
 * Thank you for reaching out.
 * As this is a custom development request, I’m going to leave it open for a bit
   to see if anyone is able to chime in to help you out.
 * I can also recommend the [WooCommerce Developer Resources](https://developer.woocommerce.com/developer-resources/)
   Portal for resources on developing for WooCommerce.
 * You can also visit the [WooCommerce Facebook group](https://www.facebook.com/groups/advanced.woocommerce/)
   or the [#developers channel of the WooCommerce Community Slack](https://woocommerce.com/community-slack/).
 * We’re lucky to have a great community of open-source developers for WooCommerce,
   and many of our developers hang out there, as well.

Viewing 1 replies (of 1 total)

The topic ‘Block based cart’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [ckadenge (woo-hc)](https://wordpress.org/support/users/ckadenge/)
 * Last activity: [1 year, 9 months ago](https://wordpress.org/support/topic/block-based-cart/#post-17979904)
 * Status: resolved