0

In woocommerce, is it possible to make payment of one customer order by another customer ?

i.e. If customer A place an order and customer B make payment of this order.

Thanks in advance.

1
  • Questions about WooCommerce are being considered off topic here, as it is a 3rd party library. You can try the support forum or the woocommerce.com support instead
    – kero
    Jun 17, 2019 at 12:47

1 Answer 1

0

It is indeed possible.

An order could be generated either via customer A or via the orders screen on the backend.

I'm unaware of a way to get the URL to pay from any admin screens as an existing feature but there is a function to get the payment URL.

You would basically pass in the order ID of customer A and it will show the URL to give to customer B. Use the following snippet where $order_id is the order number of customer A:

$order = wc_get_order($order_id);
$pay_url = esc_url( $order->get_checkout_payment_url() );
echo $pay_url;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.