filter “invoice_number”
-
hey support team,
with the deprecated paypal standard method in paypal, i was able to filter the “invoice number” using such a php filter:add_filter( 'woocommerce_paypal_args', function( $args, $order ) { $args[ 'invoice' ] = get_my_invoice_number( $order ); return $args }, 10, 2 );
How is something like this possible with “PayPal Payments”?
I’ve tried to use the hook “ppcp_create_order_request_body_data”, but I would need the “$order”-object as a parameter or the order_id within the $data-parameter. And I neither know to modify the “$data”-parameter to change the invoice_number. Changing the “reference_id” in “purchase_units” didn’t work and there is no existing “invoice_number” or something like this in the $data-parameter.
Do you guys have a hint, please? Or a solution?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘filter “invoice_number”’ is closed to new replies.