Skip to content

Instantly share code, notes, and snippets.

@psorensen
Created January 20, 2017 19:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psorensen/5553ab280d3368307032c7a370c43e17 to your computer and use it in GitHub Desktop.
Save psorensen/5553ab280d3368307032c7a370c43e17 to your computer and use it in GitHub Desktop.
EDD Recurring Creation
$args = array(
'expiration' => date( 'Y-m-d 23:59:59', strtotime( 'January 3, 2018', current_time( 'timestamp' ) ) ),
'created' => date( 'Y-m-d 23:59:59', strtotime( current_time( 'timestamp' ) ) ),
'status' => 'pending',
'profile_id' => 0,
'transaction_id' => 0,
'initial_amount' => 1,
'recurring_amount' => 700,
'bill_times' => '1',
'period' => 'yearly',
'parent_payment_id' => 0,
'product_id' => 743434,
'customer_id' => 143
);
$subscription = new EDD_Subscription;
$subscription->create( $args );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment