I'm new to PHP and WooCommerce and haven't been able to find an answer to my simple WooCommerce customization. I want to override the shopping cart and checkout totals in WooCommerce to my own value. I have been able to update the subtotal, but not the shopping cart total. To update the subtotal, I can use the code below.
function add_custom_price( $cart_object ) {
$cart_object->subtotal *= 12;
}
add_action( 'woocommerce_calculate_totals', 'add_custom_price', 10, 1);
But how do I override the standard cart / checkout total instead of just the subtotal?
Another alternative may be to show an information only donation line that doesn't impact the cart. I think either solution would work for my issue.
Thanks