Use object_get to retrieve a config field
This commit is contained in:
parent
9281cd5ba2
commit
d87552c90e
1 changed files with 1 additions and 7 deletions
|
|
@ -60,13 +60,7 @@ class AccountGateway extends EntityModel
|
|||
|
||||
public function getConfigField($field)
|
||||
{
|
||||
$config = $this->getConfig();
|
||||
|
||||
if (!$field || !property_exists($config, $field)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $config->$field;
|
||||
return object_get($this->getConfig(), $field, false);
|
||||
}
|
||||
|
||||
public function getPublishableStripeKey()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue