Retrieve Admin Settings Woocommerce

enter image description here

i have created a plugin in woocommerce and in the front end i save a businesssID and password,
how do i retrieve those settings in the backend.
i have tried this.

$this->form_fields = array(
    'enabled' => array(
        'title'       => 'Enable/Disable',
        'label'       => 'Enable Fevertree Gateway',
        'type'        => 'checkbox',
        'description' => '',
        'default'     => 'no'
    ),
    'title' => array(
        'title'       => 'Title',
        'type'        => 'text',
        'description' => 'This controls the title which the user sees during checkout.',
        'default'     => 'Account Payment',
        'desc_tip'    => true,
    ),
    'description' => array(
        'title'       => 'Description',
        'type'        => 'textarea',
        'description' => 'This controls the description which the user sees during checkout.',
        'default'     => 'Please enter your ID Number and click send OTP to continue the process, This helps us confirm your identity and secure your transaction.',
    ),

    'publishable_key' => array(
        'title'       => 'Business ID',
        'type'        => 'text'
    ),
    'private_key' => array(
        'title'       => 'Password',
        'type'        => 'password'
    )
);

try to retrieve it below,

$password= array('private_key' => $this->private_key);
$username = $this->publishable_key = $this->settings['publishable_key'];

could anyone assist please.

Thank you in advance

Read more here:: Retrieve Admin Settings Woocommerce

Leave a Reply

Your email address will not be published. Required fields are marked *