I have this code:
$amount = $woocommerce->cart->total;
if ((! $option['amount_min'] || $amount >= $option['amount_min']) && (! $option['amount_max'] || $amount <= $option['amount_max'])) {
This works fine when in cart.
=> How to make it work for manually (admin) created orders with a payment link? So there is technically no cart.