Automattic\WooCommerce\Internal\StockNotifications\Admin
SettingsController::sanitize_unverified_deletion_days_threshold
Store negative values of the unverified sign-up deletion threshold as 0, which turns the cleanup off.
An empty value is kept as is, since it also means off.
Method of the class: SettingsController{}
No Hooks.
Returns
mixed.
Usage
$SettingsController = new SettingsController(); $SettingsController->sanitize_unverified_deletion_days_threshold( $value );
- $value(mixed) (required)
- The value about to be saved.
Changelog
| Since 11.3.0 | Introduced. |
SettingsController::sanitize_unverified_deletion_days_threshold() SettingsController::sanitize unverified deletion days threshold code WC 11.3.0
public function sanitize_unverified_deletion_days_threshold( $value ) {
if ( null === $value || '' === $value ) {
return $value;
}
return max( 0, (int) $value );
}