Bidirectional field not updated
-
Hi Konrad,
First of all – great plugin, thank you!I have set up a pair of bidirectional post object fields on my custom post type (CPT) and on on the WooCommerce orders. The field shows up on the chekout page and is supposed to connect the order with the CPT.
The field gets saved on the order page and is visible in the admin area. However, the field on the CPT does not get updated.If I try to update either field from admin it all works as expected.
Do you have any idea how to fix this?
Here is the code I’m using to update the field from the frontend:
add_action('woocommerce_checkout_update_order_meta', 'checkout_fiat_update_order_meta'); function checkout_fiat_update_order_meta( $order_id ) { $field_name = 'fiat'; $field_value = $_POST['acf']['field_6388bf4231c86']; if ( ! empty( $field_value ) ) { update_post_meta( $order_id, $field_name , $field_value ); }}
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Bidirectional field not updated’ is closed to new replies.