{"id":19007594,"date":"2026-08-31T14:25:50","date_gmt":"2026-08-31T14:25:50","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/bug-with-showing-m\/"},"modified":"2026-08-31T14:25:50","modified_gmt":"2026-08-31T14:25:50","slug":"bug-with-showing-m","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/bug-with-showing-m\/","title":{"rendered":"Bug with showing m"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This function found here woocustomizer\/includes\/inc\/woocommerce.php:1497<br \/>has a bug when it comes to strings and integers, this is the fix, please replace it for the next version<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function wcz_show_discount_amount_saved() {<br \/>if ( is_checkout() &amp;&amp; !get_option( 'wcz-checkout-show-discamount', woocustomizer_library_get_default( 'wcz-checkout-show-discamount' ) ) ) {<br \/>return;<br \/>}<br \/>$wcz_discount = 0;<br \/>foreach ( WC()-&gt;cart-&gt;get_cart() as $cart_item_key =&gt; $values ) {<br \/>$product = $values&#091;'data'];<br \/>if ( $product-&gt;is_on_sale() ) {<br \/>$regular_price = intval($product-&gt;get_regular_price());<br \/>$sale_price = intval($product-&gt;get_sale_price());<br \/>$discount = ($regular_price - $sale_price) * $values&#091;'quantity'];<br \/>$wcz_discount += $discount;<br \/>}<br \/>}<br \/>if ( $wcz_discount &gt; 0 ) {<br \/>$wcz_savedtxt = ( is_checkout() ? get_option( 'wcz-checkout-discamount-txt', woocustomizer_library_get_default( 'wcz-checkout-discamount-txt' ) ) : get_option( 'wcz-cart-discamount-txt', woocustomizer_library_get_default( 'wcz-cart-discamount-txt' ) ) );<br \/>echo '' . esc_html( $wcz_savedtxt ) . '' . wc_price( $wcz_discount + WC()-&gt;cart-&gt;get_discount_total() ) . '';<br \/>}<br \/>}<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-19007594","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19007594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19007594\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19007594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}