Closed remcotolsma closed 1 year ago
Extensions like MemberPress and WooCommerce must be able to send a signal that the order has been shipped. Should we keep it simple for now by doing something like this in MemberPress and WooCommerce?
\do_action( 'pronamic_pay_payment_completed', $payment );
In terms of naming, this might be a bit confusing, because this action doesn't necessarily have anything to do with the status of the payment.
\do_action( 'pronamic_pay_payment_source_completed', $payment );
\do_action( 'pronamic_pay_payment_shipped', $payment );
It does not always necessarily have to be a physical shipment... what do you think @rvdsteege?
Reminds me of https://docs.gravityforms.com/gform_paypal_fulfillment/
\do_action( 'pronamic_pay_payment_source_fulfilled', $payment );
What is order fulfillment?
Order fulfillment is the process of receiving, packing, and shipping orders. The process begins when a customer purchases a product and ends when they receive the product.
Discussed this further with @rvdsteege @pronamic HQ today, and we have already made some small adjustments in the codebase for this. With the addition of the pronamic_pay_payment_source_fulfilled
actions I expect this to be fully operational. This will now be a maximum of 4 hours of work. With the addition of the pronamic_pay_payment_source_fulfilled
actions I expect this to be fully operational. This will now be a maximum of 4 hours of work. Let's tune in next week to see if we want to add this.
It was still a small step to add support for this, so just added.
Question from user:
Current we only support MemberPress and Klarna Pay Later:
https://github.com/pronamic/wp-pronamic-pay-mollie/blob/9076c219808dfc9187034d9ea7dc6140720a4f35/src/Gateway.php#L370-L380
https://github.com/pronamic/wp-pronamic-pay-mollie/blob/9076c219808dfc9187034d9ea7dc6140720a4f35/src/Gateway.php#L870-L906
For MemberPress we create a Mollie shipment as soon as the payment is authorized or paid.
https://github.com/pronamic/wp-pronamic-pay-mollie/blob/9076c219808dfc9187034d9ea7dc6140720a4f35/src/Gateway.php#L949-L1011
For WooCommerce we only want to do this once the order status is set to completed?