It most likely must is 'default' => TRUE
.
'request_vendor_access' => [
'label' => __('Request access to become an Artist', 'ignitewoo_vendor_stores'),
'type' => 'checkbox',
'required' => FALSE,
'class' => ['form-row-full vendor_stores_request_access'],
'clear' => TRUE,
'default' => TRUE,
]
If not, also try 'default_value' => TRUE,
or try it without 'clear'
.
Depending on what you want to achieve you might also want to get the default value dynamically. So that it restores the user’s choice. Maybe get_option($option, $default)
is the right choice here (if that’s an Options API form).
'request_vendor_access' => [
'label' => __('Request access to become an Artist', 'ignitewoo_vendor_stores'),
'type' => 'checkbox',
'required' => FALSE,
'class' => ['form-row-full vendor_stores_request_access'],
'clear' => TRUE,
'default' => get_option('request_vendor_access', TRUE),
]
or
'request_vendor_access' => [
'label' => __('Request access to become an Artist', 'ignitewoo_vendor_stores'),
'type' => 'checkbox',
'required' => FALSE,
'class' => ['form-row-full vendor_stores_request_access'],
'clear' => TRUE,
'default' => isset(get_option('my_option')['request_vendor_access'] ? get_option('my_option')['request_vendor_access'] : TRUE,
]