• Creating a simple payment gateway. I’ve created some settings fields, and am wondering how can I get these values later?

    public function init_form_fields() {
    		$this->form_fields = array(
    			'min_balance' => array(
    				'title'		=> __( 'Minimum Checkout Balance', 'plugin_name' ),
    				'type'		=> 'text',
    				'desc_tip'	=> __( 'Default 0.', 'plugin_name' ),
    				'default'	=> __( '0', 'plugin_name' ),
    				'css'		=> 'max-width:350px;'
    			)
    		);
    	}

    I’ve found:
    $string = WC_Admin_Settings::get_option( $option_name, $default );
    but am not sure the correct syntax, or even if that’s the correct direction. Any suggestions much appreciated!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘WooCommerce, Get Setting Value’ is closed to new replies.