Open sharmashivanand opened 8 months ago
Apparently EDD Software Licenses uses Payment Date instead of Payment Completion Date to generate license keys.
includes/classes/class-edd-software-licensing.php ... $license->create( $args['download_id'], $args['payment_id'], $price_id, $args['cart_index'], $options );
And...
includes/classes/class-sl-license.php ... // Get the purchase date so we can set the correct license expiration date. $payment_meta = $payment->get_meta(); $purchase_date = null; if ( ! empty( $payment_meta['date'] ) ) { $purchase_date = strtotime( $payment_meta['date'], current_time( 'timestamp' ) ); } ... $expiration_date = strtotime( $license_length, $purchase_date );
It's expected that the license key use payment completion date so that they don't get expired unexpectedly.
If a customer completes an ancient order, the license key is generated for a back-date which is expired.
1) Create an order older than 1 year ago 2) Complete this order. 3) The license keys are expired. etc, etc
PHP Version: 8*
EDD Version (or branch): 3*
WordPress Version: 6*
Any other relevant information:
Apparently filter 'edd_sl_license_creation_options' can be engaged to correct this but still it would be better to have sane defaults.
Bug Report
Apparently EDD Software Licenses uses Payment Date instead of Payment Completion Date to generate license keys.
And...
Expected behaviour
It's expected that the license key use payment completion date so that they don't get expired unexpectedly.
Actual behaviour
If a customer completes an ancient order, the license key is generated for a back-date which is expired.
Steps to reproduce the behaviour
1) Create an order older than 1 year ago 2) Complete this order. 3) The license keys are expired. etc, etc
Information (if a specific version is affected):
PHP Version: 8*
EDD Version (or branch): 3*
WordPress Version: 6*
Any other relevant information: