woocommerce - Wordpress and Woocmmerce - how to access settings from theme? -


im trying pull settings woocommerce admin. found this:

http://oik-plugins.eu/woocommerce-a2z/oik_api/woocommerce_settings_get_option/

$string = woocommerce_settings_get_option( $option_name, $default ); 

it looks public function cannot access theme files. gives me fatal error: call undefined. have idea how can access setting theme?

i'm trying 'woocommerce_frontend_css_primary', $colors['primary'] can tie them rest of theme. woocommerce write values directly .less file.

woocommerce docs bit misleading, turns out there function called get_option... long know name of option can use. eg. array of front end colors:

$woo_styles = get_option( 'woocommerce_frontend_css_colors' ); 

Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -