Skip to content

Commit

Permalink
Merge pull request #82 from dparker1005/recurring-order-address
Browse files Browse the repository at this point in the history
Adding billing address to recurring orders
  • Loading branch information
dparker1005 committed Aug 11, 2023
2 parents ab009da + fa5a638 commit 9b46005
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pmpro-pay-by-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,15 @@ function pmpropbc_recurring_orders()
$morder->payment_type = "Check";
$morder->status = "pending";

// Copy billing addres from last order
$morder->billing = new stdClass();
$morder->billing->name = $order->billing->name;
$morder->billing->street = $order->billing->street;
$morder->billing->city = $order->billing->city;
$morder->billing->state = $order->billing->state;
$morder->billing->zip = $order->billing->zip;
$morder->billing->country = $order->billing->country;

//get timestamp for new order
$order_timestamp = strtotime("+" . $combo, $order->timestamp);

Expand Down

0 comments on commit 9b46005

Please sign in to comment.