COG 3.5.3 breaks Admin Order Custom Field write to order meta

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #151586
    paul-6966
    Participant

    I seem to have an incompatibility with the plugin and admin custom order fields.

    The easiest way to reproduce the problem is to install the “WooCommerce Admin Custom Order Fields” plugin.  When installed, adding or changing data in the custom field within the admin order section fails.  No update is done, and it reverts to the original value.

    I have tried writing custom snippets and using:
    $order = wc_get_order( $order_id );
    $order->update_meta_data( ‘my_custom_field’, wc_clean( $_POST[ ‘my_custom_field’ ] ) );
    $order->save();

    and no data is written to the meta database.

    Correct functionality for the Admin Custom Fields is restored if the COG plugin is diabled.

    Has anyone else had this issue or does anyone else successfuly run COG and ACF together?

    Thanks so much,
    -Paul

    #151587
    paul-6966
    Participant

    After spending a little time mucking around with the admin settings in COG, i’ve been able to resolve the specific issue i’m having by removing the “woocommerce_process_shop_order_meta” hook from the {settings>advanced>order calculations hooks} box.

    At this point i’m not sure if that will cause any other issues, but it now allows all of the standard functionality for custom order fields to occur when updating the order.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.