mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Add method to get and set the stay_updated
setting
This commit is contained in:
parent
f32c013677
commit
d7a45138ff
1 changed files with 18 additions and 0 deletions
|
@ -406,4 +406,22 @@ class SettingsModel extends AbstractDataModel {
|
||||||
$cards
|
$cards
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the Stay Updated setting.
|
||||||
|
*
|
||||||
|
* @return bool True if Stay Updated is enabled, false otherwise.
|
||||||
|
*/
|
||||||
|
public function get_stay_updated() : bool {
|
||||||
|
return $this->data['stay_updated'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the Stay Updated setting.
|
||||||
|
*
|
||||||
|
* @param bool $save Whether to save the Stay Updated.
|
||||||
|
*/
|
||||||
|
public function set_stay_updated( bool $save ) : void {
|
||||||
|
$this->data['stay_updated'] = $this->sanitizer->sanitize_bool( $save );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue