• Resolved jansudek

    (@jansudek)


    Hello,

    I just review my database and view wrong inserted data in table woocommerce_order_itemmeta

    there is meta_key(s) :

    _woocs_order_rate
    _woocs_order_base_currency
    _woocs_order_currency_changed_mannualy

    created by PHP code classes/woocs_after_33.php (example for one meta_key):

    update_post_meta($order_id, '_woocs_order_currency_changed_mannualy', time());
    wc_add_order_item_meta($order_id, '_woocs_order_currency_changed_mannualy', time(), true);

    but order_item_id != order_id ?!?!

    and this data stucks/orphaned in this woocommerce_order_itemmeta table …..

    thanks for fix it/remove it

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello

    woocommerce_thankyou_order_id – this filter only returns order_id

    Thread Starter jansudek

    (@jansudek)

    ok, its in this functions (to hooks):
    save_post($order_id)
    woocommerce_thankyou_order_id($order_id)
    recalculate_order($order_id)

    wrong use of functions wc_add_order_item_meta and wc_update_order_item_meta with mismatched first parameter $order_id (function accept $item_id)

    example: I do order with ID: 3736

    DB table woocommerce_order_items (OK):

    DB table woocommerce_order_itemmeta (wrong order_item_id):

    are you see that what wrong you inserted into table woocommerce_order_itemmeta ??

    order_item_id != order_id :
    update_post_meta($order_id, …) is OK
    wc_update_order_item_meta($order_id, …) is WRONG !!

    after delete order ID 3736 data is still in table woocommerce_order_itemmeta with wrong order_item_id 3736 !!

    Hello

    You are right!

    I will pass it to the developers.

    Please write in support – https://codecanyon.net/item/woocommerce-currency-switcher/8085217/support

    I will give you a gift

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wrong inserted data into table woocommerce__order_itemmeta’ is closed to new replies.