$primary, 'secondary' => $secondary, 'highlight' => $highlight, 'content_bg' => $content_bg, 'subtext' => $subtext ); $old_colors = get_option( 'woocommerce_frontend_css_colors' ); update_option( 'woocommerce_frontend_css_colors', $colors ); if ( $old_colors != $colors ) woocommerce_compile_less_styles(); } } else { // If saving a shipping methods options, load 'er up if ( $current_tab == 'shipping' && class_exists( $current_section ) ) { $current_section_class = new $current_section(); do_action( 'woocommerce_update_options_' . $current_tab . '_' . $current_section_class->id ); } else { // Save section only do_action( 'woocommerce_update_options_' . $current_tab . '_' . $current_section ); } } // Flush rules and clear any unwanted data flush_rewrite_rules( false ); unset($_SESSION['orderby']); $woocommerce->clear_product_transients(); // Redirect back to the settings page $redirect = add_query_arg( 'saved', 'true' ); if ( ! empty( $_POST['subtab'] ) ) $redirect = add_query_arg( 'subtab', esc_attr( str_replace( '#', '', $_POST['subtab'] ) ), $redirect ); wp_redirect( $redirect ); exit; } // Get any returned messages $error = ( empty( $_GET['wc_error'] ) ) ? '' : urldecode( stripslashes( $_GET['wc_error'] ) ); $message = ( empty( $_GET['wc_message'] ) ) ? '' : urldecode( stripslashes( $_GET['wc_message'] ) ); if ( $error || $message ) { if ( $error ) { echo '

' . wptexturize( $error ) . '

'; } else { echo '

' . wptexturize( $message ) . '

'; } } elseif ( ! empty( $_GET['saved'] ) ) { echo '

' . __( 'Your settings have been saved.', 'woocommerce' ) . '

'; } // Were the settings saved? if ( ! empty( $_GET['saved'] ) ) { flush_rewrite_rules( false ); do_action('woocommerce_settings_saved'); } // Hide WC Link if (isset($_GET['hide-wc-extensions-message'])) update_option('hide-wc-extensions-message', 1); // Install/page installer $install_complete = false; // Add pages button if (isset($_GET['install_woocommerce_pages']) && $_GET['install_woocommerce_pages']) { require_once( 'woocommerce-admin-install.php' ); woocommerce_create_pages(); update_option('skip_install_woocommerce_pages', 1); $install_complete = true; // Skip button } elseif (isset($_GET['skip_install_woocommerce_pages']) && $_GET['skip_install_woocommerce_pages']) { update_option('skip_install_woocommerce_pages', 1); $install_complete = true; } if ($install_complete) { ?>

Congratulations! – WooCommerce has been installed and setup. Enjoy :)', 'woocommerce' ); ?>


×WC official extensions.', 'woocommerce'), 'http://www.woothemes.com/extensions/woocommerce-extensions/'); ?>
' . __('Shipping Options', 'woocommerce') . '' ); // Load shipping methods so we can show any global options they may have $shipping_methods = $woocommerce->shipping->load_shipping_methods(); foreach ( $shipping_methods as $method ) { if ( ! $method->has_settings() ) continue; $title = empty( $method->method_title ) ? ucwords( $method->id ) : ucwords( $method->method_title ); $current = ( get_class( $method ) == $current_section ) ? 'class="current"' : ''; $links[] = '' . $title . ''; } echo '
'; // Specific method options if ( $current_section ) { foreach ( $shipping_methods as $method ) { if ( get_class( $method ) == $current_section && $method->has_settings() ) { $method->admin_options(); break; } } } else { woocommerce_admin_fields( $woocommerce_settings[$current_tab] ); } break; case "payment_gateways" : include('settings/settings-payment-gateways.php'); $links = array( ''.__('Payment Gateways', 'woocommerce').'' ); foreach ( $woocommerce->payment_gateways->payment_gateways() as $gateway ) : $title = empty( $gateway->method_title ) ? ucwords( $gateway->id ) : ucwords( $gateway->method_title ); $links[] = ''.$title.''; endforeach; echo '
  • ' . implode( ' |
  • ', $links ) . '

'; echo '
'; woocommerce_admin_fields( $woocommerce_settings[$current_tab] ); echo '
'; // Specific method options foreach ( $woocommerce->payment_gateways->payment_gateways() as $gateway ) { echo '
'; $gateway->admin_options(); echo '
'; } echo '
'; break; case "integration" : $integrations = $woocommerce->integrations->get_integrations(); $current_section = empty( $current_section ) ? key( $integrations ) : $current_section; foreach ( $integrations as $integration ) { $title = empty( $integration->method_title ) ? ucwords( $integration->id ) : ucwords( $integration->method_title ); $current = ( $integration->id == $current_section ) ? 'class="current"' : ''; $links[] = '' . $title . ''; } echo '
'; if ( isset( $integrations[ $current_section ] ) ) $integrations[ $current_section ]->admin_options(); break; default : do_action( 'woocommerce_settings_tabs_' . $current_tab ); break; endswitch; ?>

plugin_url() . '/assets/images/help.png" />'; } elseif ( $value['desc_tip'] ) { $description = ''; } else { $description = '' . $value['desc'] . ''; } switch( $value['type'] ) { case 'title': if ( isset($value['name'] ) && $value['name'] ) echo '

' . $value['name'] . '

'; if ( isset($value['desc'] ) && $value['desc'] ) echo wpautop( wptexturize( $value['desc'] ) ); echo ''. "\n\n"; if ( isset($value['id'] ) && $value['id'] ) do_action( 'woocommerce_settings_' . sanitize_title($value['id'] ) ); break; case 'sectionend': if ( isset($value['id'] ) && $value['id'] ) do_action( 'woocommerce_settings_' . sanitize_title( $value['id'] ) . '_end' ); echo '
'; if ( isset($value['id'] ) && $value['id'] ) do_action( 'woocommerce_settings_' . sanitize_title( $value['id'] ) . '_after' ); break; case 'text': ?>

$value['id'], 'id' => $value['id'], 'sort_column' => 'menu_order', 'sort_order' => 'ASC', 'show_option_none' => ' ', 'class' => $value['class'], 'echo' => false, 'selected' => $page_setting); if( isset($value['args']) ) $args = wp_parse_args($value['args'], $args); ?> countries->countries; $country_setting = (string) get_option($value['id']); if (strstr($country_setting, ':')) : $country = current(explode(':', $country_setting)); $state = end(explode(':', $country_setting)); else : $country = $country_setting; $state = '*'; endif; ?> countries->countries; asort($countries); $selections = (array) get_option($value['id']); ?>