Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Use FILTER_VALIDATE_BOOLEAN instead of comparing to 'yes'
Browse files Browse the repository at this point in the history
  • Loading branch information
Aljullu committed Aug 6, 2020
1 parent 6bf687c commit e8cdb66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Payments/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function add_payment_method_script_dependencies( $dependencies, $handle )
* @return boolean
*/
private function is_payment_gateway_enabled( $gateway ) {
return 'yes' === $gateway->enabled;
return filter_var( $gateway->enabled, FILTER_VALIDATE_BOOLEAN );
}

/**
Expand Down

0 comments on commit e8cdb66

Please sign in to comment.