mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 14:57:26 +08:00
use order_number instead of internal id and filter purchase unit
This commit is contained in:
parent
437a6654c5
commit
b50dfe9700
1 changed files with 6 additions and 2 deletions
|
@ -119,7 +119,7 @@ class PurchaseUnitFactory {
|
|||
$reference_id = 'default';
|
||||
$description = '';
|
||||
$payee = $this->payee_repository->payee();
|
||||
$wc_order_id = $order->get_id();
|
||||
$wc_order_id = $order->get_order_number();
|
||||
$custom_id = $this->prefix . $wc_order_id;
|
||||
$invoice_id = $this->prefix . $wc_order_id;
|
||||
$soft_descriptor = '';
|
||||
|
@ -134,7 +134,11 @@ class PurchaseUnitFactory {
|
|||
$invoice_id,
|
||||
$soft_descriptor
|
||||
);
|
||||
return $purchase_unit;
|
||||
return apply_filters(
|
||||
'woocommerce-paypal-payments.purchase-unit.from-wc-order',
|
||||
$purchase_unit,
|
||||
$order
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue