updated plugin Easy Digital Downloads version 3.1.0.4

This commit is contained in:
2023-01-18 16:39:57 +00:00
committed by Gitium
parent ae8dabbd21
commit 6f8f73e860
77 changed files with 2262 additions and 681 deletions

View File

@ -13,6 +13,7 @@
namespace EDD\Gateways\PayPal\IPN;
use EDD\Gateways\PayPal;
/**
* Listens for an IPN call from PayPal
*
@ -25,6 +26,11 @@ function listen_for_ipn() {
return;
}
// If PayPal is not connected, we don't need to run here.
if ( ! PayPal\has_rest_api_connection() ) {
return;
}
ipn_debug_log( 'IPN Backup Loaded' );
// Moving this up in the load order so we can check some things before even getting to verification.
@ -174,7 +180,7 @@ function listen_for_ipn() {
// Bail if this is the very first payment.
if ( date( 'Y-n-d', strtotime( $subscription->created ) ) == date( 'Y-n-d', strtotime( $posted['payment_date'] ) ) ) {
if ( ! empty( $posted['payment_date'] ) && date( 'Y-n-d', strtotime( $subscription->created ) ) == date( 'Y-n-d', strtotime( $posted['payment_date'] ) ) ) {
ipn_debug_log( 'IPN for subscription ' . $subscription->id . ': processing stopped because this is the initial payment.' );
return;
}