Change how the Subtotal Price in cart being calculated [closed]

If I understand your goal correctly, I see a few problems with your code.. First is the echo in $newprice = echo $value[‘line_total’] – $value[‘data’]->get_regular_price(); Please remove the echo. Second, I think you are better of using the “after”, that is woocommerce_after_calculate_totals. You are using the “before”, that is after your code runs, line_total will … Read more

Modifying a .js Function for Print [QZ Tray, WooCommerce POS]

First, I’m getting confused in the setup here. From the initial posPrintReceipt function, am I attempting to print what’s inside the newHTML variable? or something else altogether? Yes, but the WooCommerce code appears to append the newHTML content to the existing page (as observed by the use of window.print();), likely taking advantage of a @media … Read more