After WooCommerce-Update fucntion not working anymore
Finally did it. With the update of WooCommerce, which I assumed, the syntax of the set price did change. Function now looks like this: add_action( ‘woocommerce_before_calculate_totals’, ‘calc_ferienspiele_discount’ ); function calc_ferienspiele_discount( $cart_object ) { global $woocommerce; $items = $woocommerce->cart->get_cart(); $x=0; $custom_price = 140; // This will be your custome price foreach ( $cart_object->cart_contents as $key => … Read more