Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
valmedia opened this issue Jun 10, 2022 · 1 comment

Comments

@valmedia
Copy link

valmedia commented Jun 10, 2022

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

@valmedia
Copy link
Author

Hi, any update on fixing your plugin with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant