Skip to content

Commit

Permalink
is_woopay_preflight_check - change from empty to isset
Browse files Browse the repository at this point in the history
  • Loading branch information
htdat committed Aug 26, 2023
1 parent 1f7b895 commit 13e49c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Internal/Payment/PaymentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function get_fraud_prevention_token(): ?string {
* @return bool
*/
public function is_woopay_preflight_check(): bool {
return ! empty( $this->request['is-woopay-preflight-check'] );
return isset( $this->request['is-woopay-preflight-check'] );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/src/Internal/Payment/PaymentRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function provider_text_string_for_bool_representation(): array {
],
'empty string' => [
'value' => '',
'expected' => false,
'expected' => true,
],
'any string' => [
'value' => 'any string',
Expand Down

0 comments on commit 13e49c3

Please sign in to comment.