From 095b81c858f2c4fe6610325da6a363b84a58d736 Mon Sep 17 00:00:00 2001 From: vendidero Date: Tue, 12 Nov 2024 10:01:30 +0100 Subject: [PATCH] Check whether price label is enabled or not before executing in block context. --- src/Blocks/Checkout.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Blocks/Checkout.php b/src/Blocks/Checkout.php index 548359f7..5c23d0c9 100644 --- a/src/Blocks/Checkout.php +++ b/src/Blocks/Checkout.php @@ -72,6 +72,10 @@ function ( $item_data, $item ) { $label_item_data = array(); foreach ( $labels as $label ) { + if ( ! $label->is_enabled() ) { + continue; + } + $callback = $label->get_callback(); $arg_count = $label->get_number_of_params();