I have just change a little bit your last hooked function and it works (on WC version 2.6.x and 3.0+). It's better with empty() php function to use ...
woocommerce_checkout_update_order_meta. GitHub Gist: instantly share code, notes, and snippets.
The WordPress Core woocommerce checkout update order meta hook. Description. add_action( 'woocommerce_checkout_update_order_meta', (string) $ ...
Update the order meta with field value. */. add_action( ' woocommerce_checkout_update_order_meta', ' my_custom_checkout_field_update_order_meta' );.
The WooCommerce woocommerce checkout update order meta hook. Description. do_action( 'woocommerce_checkout_update_order_meta', ( unknown) $ ...
add_action( 'woocommerce_checkout_update_order_meta', ' cesaa_saved_custom_fields', 10, 2 ); function cesaa_saved_custom_fields( ...
Checkout fields are stored here. $instance : WC_Checkout |null: The single instance of the class. $legacy_posted_data : array: Holds posted data ...
One of the changes is that the woocommerce_checkout_update_order_meta action hook is deprecated. This hook was often used to save custom ...
Action hook fired after an order is created used to add custom meta to the order. Usage. add_action( 'woocommerce_checkout_update_order_meta', ' ...
@since 3.0.0. */. do_action( 'woocommerce_checkout_update_order_meta', $ order_id, $data );. /**. * Action hook fired after an order is created. *. * @since 4.3. 0.