mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 14:57:26 +08:00
Add previous transaction to parent order (WIP)
This commit is contained in:
parent
518651b6a9
commit
56d16a5d8a
2 changed files with 6 additions and 1 deletions
|
@ -128,7 +128,6 @@ class OrderFactory {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ( ! isset( $order_data->intent ) ) {
|
if ( ! isset( $order_data->intent ) ) {
|
||||||
$this->logger->info(wc_print_r($order_data, true));
|
|
||||||
throw new RuntimeException(
|
throw new RuntimeException(
|
||||||
__( 'Order does not contain intent.', 'woocommerce-paypal-payments' )
|
__( 'Order does not contain intent.', 'woocommerce-paypal-payments' )
|
||||||
);
|
);
|
||||||
|
|
|
@ -73,6 +73,12 @@ class SubscriptionModule implements ModuleInterface {
|
||||||
$logger = $c->get( 'woocommerce.logger.woocommerce' );
|
$logger = $c->get( 'woocommerce.logger.woocommerce' );
|
||||||
|
|
||||||
$this->add_payment_token_id( $subscription, $payment_token_repository, $logger );
|
$this->add_payment_token_id( $subscription, $payment_token_repository, $logger );
|
||||||
|
|
||||||
|
if(count($subscription->get_related_orders()) === 1) {
|
||||||
|
$parent_order = $subscription->get_parent();
|
||||||
|
// get transaction id
|
||||||
|
// add trans as meta to sub
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue