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

Manually processing an order with non-instant payment gateway #12

Open
jake-acore opened this issue Dec 16, 2020 · 2 comments
Open

Manually processing an order with non-instant payment gateway #12

jake-acore opened this issue Dec 16, 2020 · 2 comments

Comments

@jake-acore
Copy link

jake-acore commented Dec 16, 2020

Dear Contributers of this CMS.

If I order an item in Woocommerce with an instant payment method (Paypal for example) everything works fine, the items in this order will send out to the ingame-character, when the payment was succesfull.

But If I am using a non-instant payment gateway (lets say bank tranfer), where I as an admin manually have to proceed the order via admin-panel the items will not send out when I change the order status in the admin panel.

Is this indented to work like this? I mean is a feature for these gateways implemented? Or do I have to do something else.

How to reproduce the issue:
Active Plugins: Woocommerce V 4.8/ AzerothCore Wordpress Integration V 0.1
Woocommerce Payment Gateway: Direct bank transfer

Step 1: Order an Item (SKU can be anything for example itemsend_43599) price has to be greater than zero otherwise (free product) the payment gateway (direct bank tranfer) is not being used.

Step 2: After the order is placed. The order status goes to "on hold" because you are awaiting a payment that you as an admin manually has to verify.

Step 3: If you now manually change the order-status to "processing" or "completed" the items will not send out to the ingame-characters.

Best Regards
Jake


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Yehonal
Copy link
Member

Yehonal commented Dec 16, 2020

This is a known issue. For now there's not a proper solution though, you can use a workaround if you want to use other payment types.

You can install the MyCred plugin: https://mycred.me/ and set the mycred virtual coin as the only payment method for the users.

Basically, the users will buy the virtual coins first (you have all the payment gateway available), then they will buy the items in woocommerce with those coins with instant payment.

I hope it can fit your needs

@Ercules76
Copy link
Member

The behavior you're experiencing is related to how WooCommerce handles different payment gateways. With instant payment methods like PayPal, the woocommerce_payment_complete hook is triggered automatically upon payment confirmation, which initiates processes like sending items to in-game characters.

However, for non-instant payment methods (e.g., bank transfer or COD), the system doesn't trigger this hook automatically because the payment confirmation requires manual intervention. When you manually mark the order as "completed" in the admin panel, the appropriate hook that gets triggered is woocommerce_order_status_completed.

In this case, the system would need to be configured to ensure that the action (like sending the items to the in-game character) is linked to the woocommerce_order_status_completed hook. This would allow the same actions to happen when an order is manually completed as with instant payments.

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

No branches or pull requests

3 participants