wc_get_order_types and wc_register_order_type

Uses CPT rather than terms. #3164
Use order types where required
Merge branch 'refunds-and-order-types' into credit-notes