: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if ( ! class_exists( 'PPW_Options_Services' ) ) {
class PPW_Options_Services {
protected static $instance;
public function __construct() {
$this->prefix = 'ppw_pro';
public static function get_instance() {
if ( null === self::$instance ) {
self::$instance = new PPW_Options_Services();
public function add_flag( $flag ) {
update_option( $this->prefix . '_' . $flag, 1 );
public function get_flag( $flag ) {
return get_option( $this->prefix . '_' . $flag );
public function delete_flag( $flag ) {
$option_name = $this->prefix . '_' . $flag;
foreach ( get_sites() as $site ) {
delete_blog_option( $site->blog_id, $option_name );
delete_option( $option_name );