Thread Starter
tszdev
(@tszdev)
Yes it was.
The variable was assigned at the beginning
public $default_phone_number;
Also the register_settings function is hooked from another class file under admin_init hook like this:
$this->loader->add_action( 'admin_init', $plugin_admin, 'register_setting' );
You need to understand that my problem is not in the declaration of the Var but in getting the option from the db because if I declare the var as equal to 1234 It outputs it.
for instance when I do this:
$this->default_phone_number = 1234;
everything works good but when I do this(as I posted in the original code):
$this->default_phone_number = get_option($this->plugin_name . '_phone');
nothing happens