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

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -