Fix notices, added isset() checks around $legacy_order

Added isset() checks around $legacy_order, var is only set if 'woocommerce_calc_taxes' option is 'yes'.