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
Post a Comment