checkout / checkout-woocommerce-plugin

Checkout.com plugin for WooCommerce

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using $order->payment_complete($transaction_id) instead of update_post_meta...

valmedia opened this issue · comments

Hi,

Using $order->payment_complete($transaction_id) is the correct way to to set an order to "processing" and reduce stock. This will make it more compatible with Woocommerce and other plugins.

update_post_meta( $order_id, '_transaction_id', $result['action_id'] );

update_post_meta($order_id, '_transaction_id', $action['0']['id']);

update_post_meta($order_id, '_transaction_id', $result['id']);

update_post_meta($order_id, '_transaction_id', $result['id']);

update_post_meta( $order_id, '_transaction_id', $result['id'] );

update_post_meta($order_id, '_transaction_id', $result['action_id']);

update_post_meta( $order_id, '_transaction_id', $result['action_id'] );

Might have miss some but these should be updated to using $order->payment_complete($transaction_id).

Thanks

Hi, any update on fixing your plugin with this?