Leroy Mikenzi
Leroy Mikenzi

Reputation: 810

Woocommerce Order Status Pending Hook not working for PayPal transactions

I have created a custom Plugin in Woocommerce that provides some reward points for the users on purchase of their order.

Currently all my orders are set to processing when a customer places an order using Master Card / Visa Card etc.

But When a user does a transaction using PAYPAL, the orders are set to Pending by default and I don't know the reason why.

I'm doing a Insert / Update on orders that are set to processing . But I cant do the same on orders that are set to pending that is orders that are through PAYPAL.

I'm using woocommerce_order_status_processing hook for processing orders and woocommerce_order_status_pending hook for orders that are set to pending (through PAYPAL).

Why does the pending hook don't initiate on orders set to pending ??

Upvotes: 1

Views: 4628

Answers (1)

pp_MSI_Jenn
pp_MSI_Jenn

Reputation: 1599

I have verified the PayPal FAQ on Woocommerce based on the information that is provided from the below link:

WooCommerce PayPal FAQ

You need to setup your Instant Payment Notification within PayPal. Once this is setup and PayPal is able to successfully communicate with WooCommerce. The status should change from pending to processing. If you need assistance with setting up your PayPal Instant Payment Notifications, here are the instructions on the PayPal Merchant Technical Support Site:

Setting Up IPN in PayPal

Make certain that you are using the URL format (replacing example with your site info) listed in the WooCommerce PayPal FAQ when setting up your Instant Payment Notification. It is under the section entitled The PayPal notification URL.

Upvotes: 1

Related Questions