How to get values from woocommerce admin input fields?

Please try to understand the code. What happened there.

update_settings function update all the form settings value in the WordPress options table. So if you search in options table you will find that the settings value are stored in the options table in DB.

So now its very easy to retrieve the value of options table. So use get_option function. You can use this anywhere you need. Please see below.

<?php print get_option( 'canvas', true );?> //23 
<?php print get_option( 'posters', true );?> //233
<?php print get_option( 'framed', true );?> //21

Leave a Comment