Skip to content

Commit

Permalink
Don't use empty().
Browse files Browse the repository at this point in the history
  • Loading branch information
rvdsteege committed Sep 7, 2023
1 parent fc9e0ac commit f21433a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public function payment_status_update( Payment $payment ) {
$this_pronamic_payment_id = (string) $payment->get_id();
$last_pronamic_payment_id = (string) \rcp_get_payment_meta( $rcp_payment_id, '_pronamic_payment_id', true );

if ( empty( $last_pronamic_payment_id ) || $this_pronamic_payment_id === $last_pronamic_payment_id ) {
if ( '' === $last_pronamic_payment_id || $this_pronamic_payment_id === $last_pronamic_payment_id ) {
$rcp_payments->update( $rcp_payment_id, $rcp_payment_data );
}

Expand All @@ -373,7 +373,7 @@ public function payment_status_update( Payment $payment ) {

$last_pronamic_payment_id = (string) \rcp_get_membership_meta( $rcp_membership->get_id(), '_pronamic_payment_id', true );

if ( ! empty( $last_pronamic_payment_id ) && $this_pronamic_payment_id !== $last_pronamic_payment_id ) {
if ( '' !== $last_pronamic_payment_id && $this_pronamic_payment_id !== $last_pronamic_payment_id ) {
return;
}

Expand Down Expand Up @@ -866,7 +866,7 @@ public function update_payment( Payment $payment ) {
$this_pronamic_payment_id = (string) $payment->get_id();
$last_pronamic_payment_id = (string) \rcp_get_payment_meta( $payment->get_source_id(), '_pronamic_payment_id', true );

if ( ! empty( $last_pronamic_payment_id ) && $this_pronamic_payment_id !== $last_pronamic_payment_id ) {
if ( '' !== $last_pronamic_payment_id && $this_pronamic_payment_id !== $last_pronamic_payment_id ) {
return;
}

Expand Down

0 comments on commit f21433a

Please sign in to comment.