From 7a484744c0aa199f15d0f0a0aac7bafa517c00c3 Mon Sep 17 00:00:00 2001 From: Gustavo Bordoni Date: Thu, 31 Jul 2014 22:54:38 -0300 Subject: [PATCH 001/743] WP Code Std --- includes/admin/class-wc-admin-assets.php | 498 ++++++++++++----------- 1 file changed, 251 insertions(+), 247 deletions(-) diff --git a/includes/admin/class-wc-admin-assets.php b/includes/admin/class-wc-admin-assets.php index 1e015c3f61d..a785ebeef23 100644 --- a/includes/admin/class-wc-admin-assets.php +++ b/includes/admin/class-wc-admin-assets.php @@ -8,284 +8,288 @@ * @version 2.1.0 */ -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly +if ( ! defined( 'ABSPATH' ) ){ + exit; // Exit if accessed directly +} if ( ! class_exists( 'WC_Admin_Assets' ) ) : -/** - * WC_Admin_Assets Class - */ -class WC_Admin_Assets { - /** - * Hook in tabs. + * WC_Admin_Assets Class */ - public function __construct() { - add_action( 'admin_enqueue_scripts', array( $this, 'admin_styles' ) ); - add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) ); - add_action( 'admin_head', array( $this, 'product_taxonomy_styles' ) ); - } + class WC_Admin_Assets { - /** - * Enqueue styles - */ - public function admin_styles() { - global $wp_scripts; - - // Sitewide menu CSS - wp_enqueue_style( 'woocommerce_admin_menu_styles', WC()->plugin_url() . '/assets/css/menu.css', array(), WC_VERSION ); - - $screen = get_current_screen(); - - if ( in_array( $screen->id, wc_get_screen_ids() ) ) { - - $jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2'; - - // Admin styles for WC pages only - wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_VERSION ); - wp_enqueue_style( 'jquery-ui-style', '//ajax.googleapis.com/ajax/libs/jqueryui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), WC_VERSION ); - wp_enqueue_style( 'wp-color-picker' ); + /** + * Hook in tabs. + */ + public function __construct() { + add_action( 'admin_enqueue_scripts', array( $this, 'admin_styles' ) ); + add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) ); + add_action( 'admin_head', array( $this, 'product_taxonomy_styles' ) ); } - if ( in_array( $screen->id, array( 'dashboard' ) ) ) { - wp_enqueue_style( 'woocommerce_admin_dashboard_styles', WC()->plugin_url() . '/assets/css/dashboard.css', array(), WC_VERSION ); + /** + * Enqueue styles + */ + public function admin_styles() { + global $wp_scripts; + + // Sitewide menu CSS + wp_enqueue_style( 'woocommerce_admin_menu_styles', WC()->plugin_url() . '/assets/css/menu.css', array(), WC_VERSION ); + + $screen = get_current_screen(); + + if ( in_array( $screen->id, wc_get_screen_ids() ) ) { + + $jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2'; + + // Admin styles for WC pages only + wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_VERSION ); + wp_enqueue_style( 'jquery-ui-style', '//ajax.googleapis.com/ajax/libs/jqueryui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), WC_VERSION ); + wp_enqueue_style( 'wp-color-picker' ); + } + + if ( in_array( $screen->id, array( 'dashboard' ) ) ) { + wp_enqueue_style( 'woocommerce_admin_dashboard_styles', WC()->plugin_url() . '/assets/css/dashboard.css', array(), WC_VERSION ); + } + + do_action( 'woocommerce_admin_css' ); } - do_action( 'woocommerce_admin_css' ); - } + /** + * Enqueue scripts + */ + public function admin_scripts() { + global $wp_query, $post; - /** - * Enqueue scripts - */ - public function admin_scripts() { - global $wp_query, $post; + $screen = get_current_screen(); + $wc_screen_id = sanitize_title( __( 'WooCommerce', 'woocommerce' ) ); + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; - $screen = get_current_screen(); - $wc_screen_id = sanitize_title( __( 'WooCommerce', 'woocommerce' ) ); - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + // Register scripts + wp_register_script( 'woocommerce_admin', WC()->plugin_url() . '/assets/js/admin/woocommerce_admin' . $suffix . '.js', array( 'jquery', 'jquery-blockui', 'jquery-ui-sortable', 'jquery-ui-widget', 'jquery-ui-core', 'jquery-tiptip' ), WC_VERSION ); - // Register scripts - wp_register_script( 'woocommerce_admin', WC()->plugin_url() . '/assets/js/admin/woocommerce_admin' . $suffix . '.js', array( 'jquery', 'jquery-blockui', 'jquery-ui-sortable', 'jquery-ui-widget', 'jquery-ui-core', 'jquery-tiptip' ), WC_VERSION ); + wp_register_script( 'jquery-blockui', WC()->plugin_url() . '/assets/js/jquery-blockui/jquery.blockUI' . $suffix . '.js', array( 'jquery' ), '2.66', true ); - wp_register_script( 'jquery-blockui', WC()->plugin_url() . '/assets/js/jquery-blockui/jquery.blockUI' . $suffix . '.js', array( 'jquery' ), '2.66', true ); + wp_register_script( 'jquery-tiptip', WC()->plugin_url() . '/assets/js/jquery-tiptip/jquery.tipTip' . $suffix . '.js', array( 'jquery' ), WC_VERSION, true ); - wp_register_script( 'jquery-tiptip', WC()->plugin_url() . '/assets/js/jquery-tiptip/jquery.tipTip' . $suffix . '.js', array( 'jquery' ), WC_VERSION, true ); + wp_register_script( 'accounting', WC()->plugin_url() . '/assets/js/admin/accounting' . $suffix . '.js', array( 'jquery' ), '0.3.2' ); - wp_register_script( 'accounting', WC()->plugin_url() . '/assets/js/admin/accounting' . $suffix . '.js', array( 'jquery' ), '0.3.2' ); + wp_register_script( 'round', WC()->plugin_url() . '/assets/js/admin/round' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); - wp_register_script( 'round', WC()->plugin_url() . '/assets/js/admin/round' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); + wp_register_script( 'wc-admin-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'accounting', 'round', 'ajax-chosen', 'chosen', 'plupload-all' ), WC_VERSION ); - wp_register_script( 'wc-admin-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'accounting', 'round', 'ajax-chosen', 'chosen', 'plupload-all' ), WC_VERSION ); + wp_register_script( 'ajax-chosen', WC()->plugin_url() . '/assets/js/chosen/ajax-chosen.jquery' . $suffix . '.js', array( 'jquery', 'chosen' ), WC_VERSION ); - wp_register_script( 'ajax-chosen', WC()->plugin_url() . '/assets/js/chosen/ajax-chosen.jquery' . $suffix . '.js', array('jquery', 'chosen'), WC_VERSION ); - - wp_register_script( 'chosen', WC()->plugin_url() . '/assets/js/chosen/chosen.jquery' . $suffix . '.js', array('jquery'), WC_VERSION ); - - // Accounting - $params = array( - 'mon_decimal_point' => get_option( 'woocommerce_price_decimal_sep' ) - ); - - wp_localize_script( 'accounting', 'accounting_params', $params ); - - // WooCommerce admin pages - if ( in_array( $screen->id, wc_get_screen_ids() ) ) { - - wp_enqueue_script( 'woocommerce_admin' ); - wp_enqueue_script( 'iris' ); - wp_enqueue_script( 'ajax-chosen' ); - wp_enqueue_script( 'chosen' ); - wp_enqueue_script( 'jquery-ui-sortable' ); - wp_enqueue_script( 'jquery-ui-autocomplete' ); - - $locale = localeconv(); - $decimal = isset( $locale['decimal_point'] ) ? $locale['decimal_point'] : '.'; - - $params = array( - 'i18n_decimal_error' => sprintf( __( 'Please enter in decimal (%s) format without thousand separators.', 'woocommerce' ), $decimal ), - 'i18n_mon_decimal_error' => sprintf( __( 'Please enter in monetary decimal (%s) format without thousand separators and currency symbols.', 'woocommerce' ), get_option( 'woocommerce_price_decimal_sep' ) ), - 'i18n_country_iso_error' => __( 'Please enter in country code with two capital letters.', 'woocommerce' ), - 'decimal_point' => $decimal, - 'mon_decimal_point' => get_option( 'woocommerce_price_decimal_sep' ) - ); - - wp_localize_script( 'woocommerce_admin', 'woocommerce_admin', $params ); - } - - // Edit product category pages - if ( in_array( $screen->id, array( 'edit-product_cat' ) ) ) { - wp_enqueue_media(); - } - - // Products - if ( in_array( $screen->id, array( 'edit-product' ) ) ) { - wp_enqueue_script( 'woocommerce_quick-edit', WC()->plugin_url() . '/assets/js/admin/quick-edit' . $suffix . '.js', array('jquery'), WC_VERSION ); - } - - // Meta boxes - if ( in_array( $screen->id, array( 'product', 'edit-product' ) ) ) { - wp_enqueue_media(); - wp_enqueue_script( 'wc-admin-product-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION ); - wp_enqueue_script( 'wc-admin-variation-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product-variation' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION ); + wp_register_script( 'chosen', WC()->plugin_url() . '/assets/js/chosen/chosen.jquery' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); + // Accounting $params = array( - 'post_id' => isset( $post->ID ) ? $post->ID : '', - 'plugin_url' => WC()->plugin_url(), - 'ajax_url' => admin_url('admin-ajax.php'), - 'woocommerce_placeholder_img_src' => wc_placeholder_img_src(), - 'add_variation_nonce' => wp_create_nonce("add-variation"), - 'link_variation_nonce' => wp_create_nonce("link-variations"), - 'delete_variation_nonce' => wp_create_nonce("delete-variation"), - 'delete_variations_nonce' => wp_create_nonce("delete-variations"), - 'i18n_link_all_variations' => esc_js( __( 'Are you sure you want to link all variations? This will create a new variation for each and every possible combination of variation attributes (max 50 per run).', 'woocommerce' ) ), - 'i18n_enter_a_value' => esc_js( __( 'Enter a value', 'woocommerce' ) ), - 'i18n_enter_a_value_fixed_or_percent' => esc_js( __( 'Enter a value (fixed or %)', 'woocommerce' ) ), - 'i18n_delete_all_variations' => esc_js( __( 'Are you sure you want to delete all variations? This cannot be undone.', 'woocommerce' ) ), - 'i18n_last_warning' => esc_js( __( 'Last warning, are you sure?', 'woocommerce' ) ), - 'i18n_choose_image' => esc_js( __( 'Choose an image', 'woocommerce' ) ), - 'i18n_set_image' => esc_js( __( 'Set variation image', 'woocommerce' ) ), - 'i18n_variation_added' => esc_js( __( "variation added", 'woocommerce' ) ), - 'i18n_variations_added' => esc_js( __( "variations added", 'woocommerce' ) ), - 'i18n_no_variations_added' => esc_js( __( "No variations added", 'woocommerce' ) ), - 'i18n_remove_variation' => esc_js( __( 'Are you sure you want to remove this variation?', 'woocommerce' ) ) + 'mon_decimal_point' => get_option( 'woocommerce_price_decimal_sep' ) ); - wp_localize_script( 'wc-admin-variation-meta-boxes', 'woocommerce_admin_meta_boxes_variations', $params ); - } - if ( in_array( str_replace( 'edit-', '', $screen->id ), wc_get_order_types( 'order-meta-boxes' ) ) ) { - wp_enqueue_script( 'wc-admin-order-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-order' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION ); - wp_enqueue_script( 'wc-admin-order-meta-boxes-modal', WC()->plugin_url() . '/assets/js/admin/order-backbone-modal' . $suffix . '.js', array( 'underscore', 'backbone', 'wc-admin-order-meta-boxes' ), WC_VERSION ); - } - if ( in_array( $screen->id, array( 'shop_coupon', 'edit-shop_coupon' ) ) ) { - wp_enqueue_script( 'wc-admin-coupon-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-coupon' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION ); - } - if ( in_array( str_replace( 'edit-', '', $screen->id ), array_merge( array( 'shop_coupon', 'product' ), wc_get_order_types( 'order-meta-boxes' ) ) ) ) { - $params = array( - 'remove_item_notice' => __( 'Are you sure you want to remove the selected items? If you have previously reduced this item\'s stock, or this order was submitted by a customer, you will need to manually restore the item\'s stock.', 'woocommerce' ), - 'i18n_select_items' => __( 'Please select some items.', 'woocommerce' ), - 'i18n_do_refund' => __( 'Are you sure you wish to process this refund? This action cannot be undone.', 'woocommerce' ), - 'i18n_delete_refund' => __( 'Are you sure you wish to delete this refund? This action cannot be undone.', 'woocommerce' ), - 'i18n_delete_tax' => __( 'Are you sure you wish to delete this tax column? This action cannot be undone.', 'woocommerce' ), - 'remove_item_meta' => __( 'Remove this item meta?', 'woocommerce' ), - 'remove_attribute' => __( 'Remove this attribute?', 'woocommerce' ), - 'name_label' => __( 'Name', 'woocommerce' ), - 'remove_label' => __( 'Remove', 'woocommerce' ), - 'click_to_toggle' => __( 'Click to toggle', 'woocommerce' ), - 'values_label' => __( 'Value(s)', 'woocommerce' ), - 'text_attribute_tip' => __( 'Enter some text, or some attributes by pipe (|) separating values.', 'woocommerce' ), - 'visible_label' => __( 'Visible on the product page', 'woocommerce' ), - 'used_for_variations_label' => __( 'Used for variations', 'woocommerce' ), - 'new_attribute_prompt' => __( 'Enter a name for the new attribute term:', 'woocommerce' ), - 'calc_totals' => __( 'Calculate totals based on order items, discounts, and shipping?', 'woocommerce' ), - 'calc_line_taxes' => __( 'Calculate line taxes? This will calculate taxes based on the customers country. If no billing/shipping is set it will use the store base country.', 'woocommerce' ), - 'copy_billing' => __( 'Copy billing information to shipping information? This will remove any currently entered shipping information.', 'woocommerce' ), - 'load_billing' => __( 'Load the customer\'s billing information? This will remove any currently entered billing information.', 'woocommerce' ), - 'load_shipping' => __( 'Load the customer\'s shipping information? This will remove any currently entered shipping information.', 'woocommerce' ), - 'featured_label' => __( 'Featured', 'woocommerce' ), - 'prices_include_tax' => esc_attr( get_option('woocommerce_prices_include_tax') ), - 'round_at_subtotal' => esc_attr( get_option( 'woocommerce_tax_round_at_subtotal' ) ), - 'no_customer_selected' => __( 'No customer selected', 'woocommerce' ), - 'plugin_url' => WC()->plugin_url(), - 'ajax_url' => admin_url('admin-ajax.php'), - 'order_item_nonce' => wp_create_nonce("order-item"), - 'add_attribute_nonce' => wp_create_nonce("add-attribute"), - 'save_attributes_nonce' => wp_create_nonce("save-attributes"), - 'calc_totals_nonce' => wp_create_nonce("calc-totals"), - 'get_customer_details_nonce' => wp_create_nonce("get-customer-details"), - 'search_products_nonce' => wp_create_nonce("search-products"), - 'grant_access_nonce' => wp_create_nonce("grant-access"), - 'revoke_access_nonce' => wp_create_nonce("revoke-access"), - 'add_order_note_nonce' => wp_create_nonce("add-order-note"), - 'delete_order_note_nonce' => wp_create_nonce("delete-order-note"), - 'calendar_image' => WC()->plugin_url().'/assets/images/calendar.png', - 'post_id' => isset( $post->ID ) ? $post->ID : '', - 'base_country' => WC()->countries->get_base_country(), - 'currency_format_num_decimals' => absint( get_option( 'woocommerce_price_num_decimals' ) ), - 'currency_format_symbol' => get_woocommerce_currency_symbol(), - 'currency_format_decimal_sep' => esc_attr( stripslashes( get_option( 'woocommerce_price_decimal_sep' ) ) ), - 'currency_format_thousand_sep' => esc_attr( stripslashes( get_option( 'woocommerce_price_thousand_sep' ) ) ), - 'currency_format' => esc_attr( str_replace( array( '%1$s', '%2$s' ), array( '%s', '%v' ), get_woocommerce_price_format() ) ), // For accounting JS - 'rounding_precision' => WC_ROUNDING_PRECISION, - 'tax_rounding_mode' => WC_TAX_ROUNDING_MODE, - 'product_types' => array_map( 'sanitize_title', get_terms( 'product_type', array( 'hide_empty' => false, 'fields' => 'names' ) ) ), - 'default_attribute_visibility' => apply_filters( 'default_attribute_visibility', false ), - 'default_attribute_variation' => apply_filters( 'default_attribute_variation', false ), - 'i18n_download_permission_fail' => __( 'Could not grant access - the user may already have permission for this file or billing email is not set. Ensure the billing email is set, and the order has been saved.', 'woocommerce' ), - 'i18n_permission_revoke' => __( 'Are you sure you want to revoke access to this download?', 'woocommerce' ), - 'i18n_tax_rate_already_exists' => __( 'You cannot add the same tax rate twice!', 'woocommerce' ), - 'i18n_product_type_alert' => __( 'Your product has variations! Before changing the product type can be a good idea delete the variations for avoid errors in the stock reports.', 'woocommerce' ) - ); + wp_localize_script( 'accounting', 'accounting_params', $params ); - wp_localize_script( 'wc-admin-meta-boxes', 'woocommerce_admin_meta_boxes', $params ); + // WooCommerce admin pages + if ( in_array( $screen->id, wc_get_screen_ids() ) ) { + + wp_enqueue_script( 'woocommerce_admin' ); + wp_enqueue_script( 'iris' ); + wp_enqueue_script( 'ajax-chosen' ); + wp_enqueue_script( 'chosen' ); + wp_enqueue_script( 'jquery-ui-sortable' ); + wp_enqueue_script( 'jquery-ui-autocomplete' ); + + $locale = localeconv(); + $decimal = isset( $locale['decimal_point'] ) ? $locale['decimal_point'] : '.'; + + $params = array( + 'i18n_decimal_error' => sprintf( __( 'Please enter in decimal (%s) format without thousand separators.', 'woocommerce' ), $decimal ), + 'i18n_mon_decimal_error' => sprintf( __( 'Please enter in monetary decimal (%s) format without thousand separators and currency symbols.', 'woocommerce' ), get_option( 'woocommerce_price_decimal_sep' ) ), + 'i18n_country_iso_error' => __( 'Please enter in country code with two capital letters.', 'woocommerce' ), + 'decimal_point' => $decimal, + 'mon_decimal_point' => get_option( 'woocommerce_price_decimal_sep' ) + ); + + wp_localize_script( 'woocommerce_admin', 'woocommerce_admin', $params ); + } + + // Edit product category pages + if ( in_array( $screen->id, array( 'edit-product_cat' ) ) ) { + wp_enqueue_media(); + } + + // Products + if ( in_array( $screen->id, array( 'edit-product' ) ) ) { + wp_enqueue_script( 'woocommerce_quick-edit', WC()->plugin_url() . '/assets/js/admin/quick-edit' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); + } + + // Meta boxes + if ( in_array( $screen->id, array( 'product', 'edit-product' ) ) ) { + wp_enqueue_media(); + wp_enqueue_script( 'wc-admin-product-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION ); + wp_enqueue_script( 'wc-admin-variation-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-product-variation' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION ); + + $params = array( + 'post_id' => isset( $post->ID ) ? $post->ID : '', + 'plugin_url' => WC()->plugin_url(), + 'ajax_url' => admin_url( 'admin-ajax.php' ), + 'woocommerce_placeholder_img_src' => wc_placeholder_img_src(), + 'add_variation_nonce' => wp_create_nonce( 'add-variation' ), + 'link_variation_nonce' => wp_create_nonce( 'link-variations' ), + 'delete_variation_nonce' => wp_create_nonce( 'delete-variation' ), + 'delete_variations_nonce' => wp_create_nonce( 'delete-variations' ), + 'i18n_link_all_variations' => esc_js( __( 'Are you sure you want to link all variations? This will create a new variation for each and every possible combination of variation attributes (max 50 per run).', 'woocommerce' ) ), + 'i18n_enter_a_value' => esc_js( __( 'Enter a value', 'woocommerce' ) ), + 'i18n_enter_a_value_fixed_or_percent' => esc_js( __( 'Enter a value (fixed or %)', 'woocommerce' ) ), + 'i18n_delete_all_variations' => esc_js( __( 'Are you sure you want to delete all variations? This cannot be undone.', 'woocommerce' ) ), + 'i18n_last_warning' => esc_js( __( 'Last warning, are you sure?', 'woocommerce' ) ), + 'i18n_choose_image' => esc_js( __( 'Choose an image', 'woocommerce' ) ), + 'i18n_set_image' => esc_js( __( 'Set variation image', 'woocommerce' ) ), + 'i18n_variation_added' => esc_js( __( 'variation added' , 'woocommerce' ) ), + 'i18n_variations_added' => esc_js( __( 'variations added', 'woocommerce' ) ), + 'i18n_no_variations_added' => esc_js( __( 'No variations added', 'woocommerce' ) ), + 'i18n_remove_variation' => esc_js( __( 'Are you sure you want to remove this variation?', 'woocommerce' ) ) + ); + + wp_localize_script( 'wc-admin-variation-meta-boxes', 'woocommerce_admin_meta_boxes_variations', $params ); + } + if ( in_array( str_replace( 'edit-', '', $screen->id ), wc_get_order_types( 'order-meta-boxes' ) ) ) { + wp_enqueue_script( 'wc-admin-order-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-order' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION ); + wp_enqueue_script( 'wc-admin-order-meta-boxes-modal', WC()->plugin_url() . '/assets/js/admin/order-backbone-modal' . $suffix . '.js', array( 'underscore', 'backbone', 'wc-admin-order-meta-boxes' ), WC_VERSION ); + } + if ( in_array( $screen->id, array( 'shop_coupon', 'edit-shop_coupon' ) ) ) { + wp_enqueue_script( 'wc-admin-coupon-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-coupon' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION ); + } + if ( in_array( str_replace( 'edit-', '', $screen->id ), array_merge( array( 'shop_coupon', 'product' ), wc_get_order_types( 'order-meta-boxes' ) ) ) ) { + $params = array( + 'remove_item_notice' => __( 'Are you sure you want to remove the selected items? If you have previously reduced this item\'s stock, or this order was submitted by a customer, you will need to manually restore the item\'s stock.', 'woocommerce' ), + 'i18n_select_items' => __( 'Please select some items.', 'woocommerce' ), + 'i18n_do_refund' => __( 'Are you sure you wish to process this refund? This action cannot be undone.', 'woocommerce' ), + 'i18n_delete_refund' => __( 'Are you sure you wish to delete this refund? This action cannot be undone.', 'woocommerce' ), + 'i18n_delete_tax' => __( 'Are you sure you wish to delete this tax column? This action cannot be undone.', 'woocommerce' ), + 'remove_item_meta' => __( 'Remove this item meta?', 'woocommerce' ), + 'remove_attribute' => __( 'Remove this attribute?', 'woocommerce' ), + 'name_label' => __( 'Name', 'woocommerce' ), + 'remove_label' => __( 'Remove', 'woocommerce' ), + 'click_to_toggle' => __( 'Click to toggle', 'woocommerce' ), + 'values_label' => __( 'Value(s)', 'woocommerce' ), + 'text_attribute_tip' => __( 'Enter some text, or some attributes by pipe (|) separating values.', 'woocommerce' ), + 'visible_label' => __( 'Visible on the product page', 'woocommerce' ), + 'used_for_variations_label' => __( 'Used for variations', 'woocommerce' ), + 'new_attribute_prompt' => __( 'Enter a name for the new attribute term:', 'woocommerce' ), + 'calc_totals' => __( 'Calculate totals based on order items, discounts, and shipping?', 'woocommerce' ), + 'calc_line_taxes' => __( 'Calculate line taxes? This will calculate taxes based on the customers country. If no billing/shipping is set it will use the store base country.', 'woocommerce' ), + 'copy_billing' => __( 'Copy billing information to shipping information? This will remove any currently entered shipping information.', 'woocommerce' ), + 'load_billing' => __( 'Load the customer\'s billing information? This will remove any currently entered billing information.', 'woocommerce' ), + 'load_shipping' => __( 'Load the customer\'s shipping information? This will remove any currently entered shipping information.', 'woocommerce' ), + 'featured_label' => __( 'Featured', 'woocommerce' ), + 'prices_include_tax' => esc_attr( get_option( 'woocommerce_prices_include_tax' ) ), + 'round_at_subtotal' => esc_attr( get_option( 'woocommerce_tax_round_at_subtotal' ) ), + 'no_customer_selected' => __( 'No customer selected', 'woocommerce' ), + 'plugin_url' => WC()->plugin_url(), + 'ajax_url' => admin_url( 'admin-ajax.php' ), + 'order_item_nonce' => wp_create_nonce( 'order-item' ), + 'add_attribute_nonce' => wp_create_nonce( 'add-attribute' ), + 'save_attributes_nonce' => wp_create_nonce( 'save-attributes' ), + 'calc_totals_nonce' => wp_create_nonce( 'calc-totals' ), + 'get_customer_details_nonce' => wp_create_nonce( 'get-customer-details' ), + 'search_products_nonce' => wp_create_nonce( 'search-products' ), + 'grant_access_nonce' => wp_create_nonce( 'grant-access' ), + 'revoke_access_nonce' => wp_create_nonce( 'revoke-access' ), + 'add_order_note_nonce' => wp_create_nonce( 'add-order-note' ), + 'delete_order_note_nonce' => wp_create_nonce( 'delete-order-note' ), + 'calendar_image' => WC()->plugin_url().'/assets/images/calendar.png', + 'post_id' => isset( $post->ID ) ? $post->ID : '', + 'base_country' => WC()->countries->get_base_country(), + 'currency_format_num_decimals' => absint( get_option( 'woocommerce_price_num_decimals' ) ), + 'currency_format_symbol' => get_woocommerce_currency_symbol(), + 'currency_format_decimal_sep' => esc_attr( stripslashes( get_option( 'woocommerce_price_decimal_sep' ) ) ), + 'currency_format_thousand_sep' => esc_attr( stripslashes( get_option( 'woocommerce_price_thousand_sep' ) ) ), + 'currency_format' => esc_attr( str_replace( array( '%1$s', '%2$s' ), array( '%s', '%v' ), get_woocommerce_price_format() ) ), // For accounting JS + 'rounding_precision' => WC_ROUNDING_PRECISION, + 'tax_rounding_mode' => WC_TAX_ROUNDING_MODE, + 'product_types' => array_map( 'sanitize_title', get_terms( 'product_type', array( 'hide_empty' => false, 'fields' => 'names' ) ) ), + 'default_attribute_visibility' => apply_filters( 'default_attribute_visibility', false ), + 'default_attribute_variation' => apply_filters( 'default_attribute_variation', false ), + 'i18n_download_permission_fail' => __( 'Could not grant access - the user may already have permission for this file or billing email is not set. Ensure the billing email is set, and the order has been saved.', 'woocommerce' ), + 'i18n_permission_revoke' => __( 'Are you sure you want to revoke access to this download?', 'woocommerce' ), + 'i18n_tax_rate_already_exists' => __( 'You cannot add the same tax rate twice!', 'woocommerce' ), + 'i18n_product_type_alert' => __( 'Your product has variations! Before changing the product type can be a good idea delete the variations for avoid errors in the stock reports.', 'woocommerce' ) + ); + + wp_localize_script( 'wc-admin-meta-boxes', 'woocommerce_admin_meta_boxes', $params ); + } + + // Term ordering - only when sorting by term_order + if ( ( strstr( $screen->id, 'edit-pa_' ) || ( ! empty( $_GET['taxonomy'] ) && in_array( $_GET['taxonomy'], apply_filters( 'woocommerce_sortable_taxonomies', array( 'product_cat' ) ) ) ) ) && ! isset( $_GET['orderby'] ) ) { + + wp_register_script( 'woocommerce_term_ordering', WC()->plugin_url() . '/assets/js/admin/term-ordering.js', array( 'jquery-ui-sortable' ), WC_VERSION ); + wp_enqueue_script( 'woocommerce_term_ordering' ); + + $taxonomy = isset( $_GET['taxonomy'] ) ? wc_clean( $_GET['taxonomy'] ) : ''; + + $woocommerce_term_order_params = array( + 'taxonomy' => $taxonomy, + ); + + wp_localize_script( 'woocommerce_term_ordering', 'woocommerce_term_ordering_params', $woocommerce_term_order_params ); + } + + // Product sorting - only when sorting by menu order on the products page + if ( current_user_can( 'edit_others_pages' ) && $screen->id == 'edit-product' && isset( $wp_query->query['orderby'] ) && $wp_query->query['orderby'] == 'menu_order title' ) { + + wp_enqueue_script( 'woocommerce_product_ordering', WC()->plugin_url() . '/assets/js/admin/product-ordering.js', array( 'jquery-ui-sortable' ), WC_VERSION, true ); + + } + + // Reports Pages + if ( in_array( $screen->id, apply_filters( 'woocommerce_reports_screen_ids', array( $wc_screen_id . '_page_wc-reports', 'dashboard' ) ) ) ) { + wp_enqueue_script( 'wc-reports', WC()->plugin_url() . '/assets/js/admin/reports' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker' ), WC_VERSION ); + wp_enqueue_script( 'flot', WC()->plugin_url() . '/assets/js/admin/jquery.flot' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); + wp_enqueue_script( 'flot-resize', WC()->plugin_url() . '/assets/js/admin/jquery.flot.resize' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); + wp_enqueue_script( 'flot-time', WC()->plugin_url() . '/assets/js/admin/jquery.flot.time' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); + wp_enqueue_script( 'flot-pie', WC()->plugin_url() . '/assets/js/admin/jquery.flot.pie' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); + wp_enqueue_script( 'flot-stack', WC()->plugin_url() . '/assets/js/admin/jquery.flot.stack' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); + } + + // System status + if ( 'woocommerce_page_wc-status' === $screen->id ) { + wp_enqueue_script( 'zeroclipboard', WC()->plugin_url() . '/assets/js/zeroclipboard/jquery.zeroclipboard' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); + } + + // Chosen RTL + if ( is_rtl() ) { + wp_enqueue_script( 'chosen-rtl', WC()->plugin_url() . '/assets/js/chosen/chosen-rtl' . $suffix . '.js', array( 'jquery' ), WC_VERSION, true ); + } } - // Term ordering - only when sorting by term_order - if ( ( strstr( $screen->id, 'edit-pa_' ) || ( ! empty( $_GET['taxonomy'] ) && in_array( $_GET['taxonomy'], apply_filters( 'woocommerce_sortable_taxonomies', array( 'product_cat' ) ) ) ) ) && ! isset( $_GET['orderby'] ) ) { + /** + * Admin Head + * + * Outputs some styles in the admin to show icons on the woocommerce admin pages + * + * @access public + * @return void + */ + public function product_taxonomy_styles() { - wp_register_script( 'woocommerce_term_ordering', WC()->plugin_url() . '/assets/js/admin/term-ordering.js', array('jquery-ui-sortable'), WC_VERSION ); - wp_enqueue_script( 'woocommerce_term_ordering' ); - - $taxonomy = isset( $_GET['taxonomy'] ) ? wc_clean( $_GET['taxonomy'] ) : ''; - - $woocommerce_term_order_params = array( - 'taxonomy' => $taxonomy - ); - - wp_localize_script( 'woocommerce_term_ordering', 'woocommerce_term_ordering_params', $woocommerce_term_order_params ); - } - - // Product sorting - only when sorting by menu order on the products page - if ( current_user_can('edit_others_pages') && $screen->id == 'edit-product' && isset( $wp_query->query['orderby'] ) && $wp_query->query['orderby'] == 'menu_order title' ) { - - wp_enqueue_script( 'woocommerce_product_ordering', WC()->plugin_url() . '/assets/js/admin/product-ordering.js', array('jquery-ui-sortable'), WC_VERSION, true ); - - } - - // Reports Pages - if ( in_array( $screen->id, apply_filters( 'woocommerce_reports_screen_ids', array( $wc_screen_id . '_page_wc-reports', 'dashboard' ) ) ) ) { - wp_enqueue_script( 'wc-reports', WC()->plugin_url() . '/assets/js/admin/reports' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker' ), WC_VERSION ); - wp_enqueue_script( 'flot', WC()->plugin_url() . '/assets/js/admin/jquery.flot' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); - wp_enqueue_script( 'flot-resize', WC()->plugin_url() . '/assets/js/admin/jquery.flot.resize' . $suffix . '.js', array('jquery', 'flot'), WC_VERSION ); - wp_enqueue_script( 'flot-time', WC()->plugin_url() . '/assets/js/admin/jquery.flot.time' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); - wp_enqueue_script( 'flot-pie', WC()->plugin_url() . '/assets/js/admin/jquery.flot.pie' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); - wp_enqueue_script( 'flot-stack', WC()->plugin_url() . '/assets/js/admin/jquery.flot.stack' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); - } - - // System status - if ( 'woocommerce_page_wc-status' === $screen->id ) { - wp_enqueue_script( 'zeroclipboard', WC()->plugin_url() . '/assets/js/zeroclipboard/jquery.zeroclipboard' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); - } - - // Chosen RTL - if ( is_rtl() ) { - wp_enqueue_script( 'chosen-rtl', WC()->plugin_url() . '/assets/js/chosen/chosen-rtl' . $suffix . '.js', array( 'jquery' ), WC_VERSION, true ); + if ( ! current_user_can( 'manage_woocommerce' ) ){ + return; + } + ?> + + to show icons on the woocommerce admin pages - * - * @access public - * @return void - */ - public function product_taxonomy_styles() { - - if ( ! current_user_can( 'manage_woocommerce' ) ) return; - ?> - - Date: Thu, 31 Jul 2014 23:26:05 -0300 Subject: [PATCH 002/743] Include the wp_localize_script for country > state relationship --- includes/admin/class-wc-admin-assets.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/admin/class-wc-admin-assets.php b/includes/admin/class-wc-admin-assets.php index a785ebeef23..7982bfc6a4c 100644 --- a/includes/admin/class-wc-admin-assets.php +++ b/includes/admin/class-wc-admin-assets.php @@ -158,6 +158,13 @@ if ( ! class_exists( 'WC_Admin_Assets' ) ) : if ( in_array( str_replace( 'edit-', '', $screen->id ), wc_get_order_types( 'order-meta-boxes' ) ) ) { wp_enqueue_script( 'wc-admin-order-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-order' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION ); wp_enqueue_script( 'wc-admin-order-meta-boxes-modal', WC()->plugin_url() . '/assets/js/admin/order-backbone-modal' . $suffix . '.js', array( 'underscore', 'backbone', 'wc-admin-order-meta-boxes' ), WC_VERSION ); + + $params = array( + 'countries' => json_encode( array_merge( WC()->countries->get_allowed_country_states(), WC()->countries->get_shipping_country_states() ) ), + 'i18n_select_state_text' => esc_attr__( 'Select an option…', 'woocommerce' ), + ); + + wp_localize_script( 'wc-admin-order-meta-boxes', 'woocommerce_admin_meta_boxes_order', $params ); } if ( in_array( $screen->id, array( 'shop_coupon', 'edit-shop_coupon' ) ) ) { wp_enqueue_script( 'wc-admin-coupon-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-coupon' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION ); From 09c8e644d1e8d00141c7d703fbd1a6e3ba5b4802 Mon Sep 17 00:00:00 2001 From: Gustavo Bordoni Date: Fri, 1 Aug 2014 01:24:55 -0300 Subject: [PATCH 003/743] WP Code Std --- includes/admin/wc-meta-box-functions.php | 44 ++++++++++++------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/includes/admin/wc-meta-box-functions.php b/includes/admin/wc-meta-box-functions.php index ab9a9d39a9c..fc21e7d9b85 100644 --- a/includes/admin/wc-meta-box-functions.php +++ b/includes/admin/wc-meta-box-functions.php @@ -8,7 +8,9 @@ * @version 2.1.0 */ -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly +if ( ! defined( 'ABSPATH' ) ){ + exit; // Exit if accessed directly +} /** * Output a text input box. @@ -43,9 +45,11 @@ function woocommerce_wp_text_input( $field ) { // Custom attribute handling $custom_attributes = array(); - if ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) ) - foreach ( $field['custom_attributes'] as $attribute => $value ) + if ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) ){ + foreach ( $field['custom_attributes'] as $attribute => $value ){ $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $value ) . '"'; + } + } echo '

'; @@ -56,7 +60,6 @@ function woocommerce_wp_text_input( $field ) { } else { echo '' . wp_kses_post( $field['description'] ) . ''; } - } echo '

'; } @@ -103,7 +106,6 @@ function woocommerce_wp_textarea_input( $field ) { } else { echo '' . wp_kses_post( $field['description'] ) . ''; } - } echo '

'; } @@ -127,7 +129,9 @@ function woocommerce_wp_checkbox( $field ) { echo '

'; - if ( ! empty( $field['description'] ) ) echo '' . wp_kses_post( $field['description'] ) . ''; + if ( ! empty( $field['description'] ) ){ + echo '' . wp_kses_post( $field['description'] ) . ''; + } echo '

'; } @@ -150,9 +154,7 @@ function woocommerce_wp_select( $field ) { echo '

'; @@ -164,7 +166,6 @@ function woocommerce_wp_select( $field ) { } else { echo '' . wp_kses_post( $field['description'] ) . ''; } - } echo '

'; } @@ -187,28 +188,27 @@ function woocommerce_wp_radio( $field ) { echo '
' . wp_kses_post( $field['label'] ) . '
    '; - foreach ( $field['options'] as $key => $value ) { + foreach ( $field['options'] as $key => $value ) { echo '
  • -
  • '; + name="' . esc_attr( $field['name'] ) . '" + value="' . esc_attr( $key ) . '" + type="radio" + class="' . esc_attr( $field['class'] ) . '" + ' . checked( esc_attr( $field['value'] ), esc_attr( $key ), false ) . ' + /> ' . esc_html( $value ) . ' + '; } - echo '
'; + echo ''; - if ( ! empty( $field['description'] ) ) { + if ( ! empty( $field['description'] ) ) { if ( isset( $field['desc_tip'] ) && false !== $field['desc_tip'] ) { echo ''; } else { echo '' . wp_kses_post( $field['description'] ) . ''; } - } - echo '
'; -} \ No newline at end of file + echo ''; +} From 46ef1638ce75e51d3b10260f41d3adda91c6e048 Mon Sep 17 00:00:00 2001 From: Gustavo Bordoni Date: Fri, 1 Aug 2014 01:26:45 -0300 Subject: [PATCH 004/743] Passing all the params for the `edit_address` fields, and build `id` param if it doens't exists --- .../class-wc-meta-box-order-data.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-order-data.php b/includes/admin/meta-boxes/class-wc-meta-box-order-data.php index be5b2b971df..b70ef791182 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-order-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-order-data.php @@ -69,11 +69,13 @@ class WC_Meta_Box_Order_Data { 'country' => array( 'label' => __( 'Country', 'woocommerce' ), 'show' => false, + 'class' => 'js_field-country select short', 'type' => 'select', 'options' => array( '' => __( 'Select a country…', 'woocommerce' ) ) + WC()->countries->get_allowed_countries() ), 'state' => array( 'label' => __( 'State/County', 'woocommerce' ), + 'class' => 'js_field-state select short', 'show' => false ), 'email' => array( @@ -117,10 +119,12 @@ class WC_Meta_Box_Order_Data { 'label' => __( 'Country', 'woocommerce' ), 'show' => false, 'type' => 'select', + 'class' => 'js_field-country select short', 'options' => array( '' => __( 'Select a country…', 'woocommerce' ) ) + WC()->countries->get_shipping_countries() ), 'state' => array( 'label' => __( 'State/County', 'woocommerce' ), + 'class' => 'js_field-state select short', 'show' => false ), ) ); @@ -243,13 +247,16 @@ class WC_Meta_Box_Order_Data { if ( ! isset( $field['type'] ) ) { $field['type'] = 'text'; } + if ( ! isset( $field['id'] ) ){ + $field['id'] = '_billing_' . $key; + } switch ( $field['type'] ) { case 'select' : - woocommerce_wp_select( array( 'id' => '_billing_' . $key, 'label' => $field['label'], 'options' => $field['options'] ) ); + woocommerce_wp_select( $field ); break; default : - woocommerce_wp_text_input( array( 'id' => '_billing_' . $key, 'label' => $field['label'] ) ); + woocommerce_wp_text_input( $field ); break; } } @@ -329,13 +336,16 @@ class WC_Meta_Box_Order_Data { if ( ! isset( $field['type'] ) ) { $field['type'] = 'text'; } + if ( ! isset( $field['id'] ) ){ + $field['id'] = '_shipping_' . $key; + } switch ( $field['type'] ) { case 'select' : - woocommerce_wp_select( array( 'id' => '_shipping_' . $key, 'label' => $field['label'], 'options' => $field['options'] ) ); + woocommerce_wp_select( $field ); break; default : - woocommerce_wp_text_input( array( 'id' => '_shipping_' . $key, 'label' => $field['label'] ) ); + woocommerce_wp_text_input( $field ); break; } } From 022cffd078320718fa92bff02c42082a5b9c9f04 Mon Sep 17 00:00:00 2001 From: Gustavo Bordoni Date: Fri, 1 Aug 2014 01:27:22 -0300 Subject: [PATCH 005/743] Adding the Logic to parse and output the State/Country on the Edit Order Metabox --- assets/js/admin/meta-boxes-order.js | 62 +++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/assets/js/admin/meta-boxes-order.js b/assets/js/admin/meta-boxes-order.js index 64f14c6ec9e..a68e841c664 100644 --- a/assets/js/admin/meta-boxes-order.js +++ b/assets/js/admin/meta-boxes-order.js @@ -74,7 +74,69 @@ jQuery( function ( $ ) { $( this ).closest( '.order_data_column' ).find( 'div.edit_address' ).show(); }); + + var states = null; + // Check if we have the countries loaded + if ( ! ( typeof woocommerce_admin_meta_boxes_order === 'undefined' || typeof woocommerce_admin_meta_boxes_order.countries === 'undefined' ) ) { + /* State/Country select boxes */ + states = $.parseJSON( woocommerce_admin_meta_boxes_order.countries.replace( /"/g, '"' ) ); + } + + $( '.js_field-country' ).change( function( e, stickValue ){ + // Check for stickValue before using it + if ( typeof stickValue === 'undefined' ){ + stickValue = false; + } + + // Prevent if we don't have the metabox data + if ( states === null ){ + return; + } + + var $this = $( this ), + country = $this.val(), + $state = $this.parents( '.edit_address' ).find( '.js_field-state' ), + $parent = $state.parent(), + input_name = $state.attr( 'name' ), + input_id = $state.attr( 'id' ), + value = ! stickValue && $this.data( 'woocommerce.stickState-' + country ) ? $this.data( 'woocommerce.stickState-' + country ) : $state.val(), + placeholder = $state.attr( 'placeholder' ); + + if ( stickValue ){ + $this.data( 'woocommerce.stickState-' + country, value ); + } + + if ( states[ country ] ) { + var $states_select = $( '' ), + state = states[ country ]; + + $states_select.append( $( '' ) ); + + $.each( state, function( index, name ) { + $states_select.append( $( '' ) ); + } ); + + $states_select.val( value ); + + $state.replaceWith( $states_select ); + } else { + $parent.show().find( '.chosen-container' ).remove(); + $state.replaceWith( '' ); + } + + $( 'body' ).trigger( 'contry-change.woocommerce', [country, $( this ).closest( 'div' )] ); + } ).trigger( 'change', true ); + $( 'body' ) + .on( 'change', 'select.js_field-state', function(){ + // Here we will find if state value on a select has changed and stick it to the country data + var $this = $( this ), + state = $this.val(), + $country = $this.parents( '.edit_address' ).find( '.js_field-country' ), + country = $country.val(); + + $country.data( 'woocommerce.stickState-' + country, state ); + } ) .on( 'click', 'a.edit-order-item', function() { $( this ).closest( 'tr' ).find( '.view' ).hide(); $( this ).closest( 'tr' ).find( '.edit' ).show(); From 64aba7ce4cd8f53ae2b113b1661f32d117d3ee7d Mon Sep 17 00:00:00 2001 From: Gustavo Bordoni Date: Fri, 1 Aug 2014 01:46:17 -0300 Subject: [PATCH 006/743] Removing overflow: hidden to allow the `chosen` select box to completely show --- assets/css/admin.css | 2 +- assets/css/admin.less | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/assets/css/admin.css b/assets/css/admin.css index 1406f7b08bd..3515b092d8e 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -1 +1 @@ -.clear{clear:both}.nobr{white-space:nowrap}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format('embedded-opentype'),url(../fonts/WooCommerce.woff) format('woff'),url(../fonts/WooCommerce.ttf) format('truetype'),url(../fonts/WooCommerce.svg#WooCommerce) format('svg');font-weight:400;font-style:normal}.wc_addons_wrap .products{overflow:hidden}.wc_addons_wrap .products li{float:left;margin:0 1em 1em 0!important;padding:0;vertical-align:top;width:300px}.wc_addons_wrap .products li a{text-decoration:none;color:inherit;border:1px solid #ddd;display:block;min-height:220px;overflow:hidden;background:#f5f5f5;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1)}.wc_addons_wrap .products li a img{max-width:258px;max-height:24px;padding:17px 20px;display:block;margin:0;background:#fff;border-right:260px solid #fff}.wc_addons_wrap .products li a .price,.wc_addons_wrap .products li a img.extension-thumb+h3{display:none}.wc_addons_wrap .products li a h3{margin:0!important;padding:20px!important;background:#fff}.wc_addons_wrap .products li a p{padding:20px!important;margin:0!important;border-top:1px solid #f1f1f1}.wc_addons_wrap .products li a:focus,.wc_addons_wrap .products li a:hover{background-color:#fff}.woocommerce-message{position:relative;border-left-color:#cc99c2!important;overflow:hidden}.woocommerce-message a.button-primary,.woocommerce-message button.button-primary{background:#cc99c2;border-color:#b366a4;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none}.woocommerce-message a.button-primary:hover,.woocommerce-message button.button-primary:hover{background:#bb77ae;border-color:#aa559a;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15)}.woocommerce-message a.button-primary:active,.woocommerce-message button.button-primary:active{background:#aa559a;border-color:#aa559a}.woocommerce-message a.docs,.woocommerce-message a.skip{opacity:.5}.woocommerce-message .twitter-share-button{vertical-align:middle}#variable_product_options #message{margin:10px}.wrap.woocommerce div.error,.wrap.woocommerce div.updated{margin-top:10px}mark.amount{background:0 0;color:inherit}.postbox input:invalid,.woocommerce input:invalid{border:1px solid #cc010b;background:#ffebe8}table.wc_status_table tr:nth-child(2n) td,table.wc_status_table tr:nth-child(2n) th{background:#fcfcfc}table.wc_status_table th{font-weight:700}table.wc_status_table td:first-child{width:20%}table.wc_status_table td{padding:6px 9px;font-size:1.1em}table.wc_status_table td mark{background:0 0}table.wc_status_table td mark.yes{color:#7ad03a}table.wc_status_table td mark.no{color:#999}table.wc_status_table td mark.error{color:#a00}table.wc_status_table td ul{margin:0}#debug-report{display:none;margin:10px 0;padding:0;position:relative}#debug-report textarea{font-family:monospace;width:100%;margin:0;height:300px;padding:20px;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;resize:none;font-size:12px;line-height:20px;outline:0}#log-viewer-select{padding:10px 0 8px;line-height:180%}#log-viewer textarea{width:100%}.inline-edit-product.quick-edit-row .inline-edit-col-center,.inline-edit-product.quick-edit-row .inline-edit-col-right{float:right!important}#woocommerce-fields.inline-edit-col{clear:left}#woocommerce-fields.inline-edit-col label.featured,#woocommerce-fields.inline-edit-col label.manage_stock{margin-left:10px}#woocommerce-fields.inline-edit-col .dimensions div{display:block;margin:.2em 0}#woocommerce-fields.inline-edit-col .dimensions div span.title{display:block;float:left;width:5em}#woocommerce-fields.inline-edit-col .dimensions div span.input-text-wrap{display:block;margin-left:5em}#woocommerce-fields.inline-edit-col .text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:99%;float:left;margin:1px 1% 1px 1px}#woocommerce-fields.inline-edit-col .height,#woocommerce-fields.inline-edit-col .length,#woocommerce-fields.inline-edit-col .width{width:32.33%}#woocommerce-fields.inline-edit-col .height{margin-right:0}#woocommerce-fields-bulk.inline-edit-col label{clear:left}#woocommerce-fields-bulk.inline-edit-col .inline-edit-group div.alignright,#woocommerce-fields-bulk.inline-edit-col .inline-edit-group label{clear:none;width:49%;margin:.2em 0}#woocommerce-fields-bulk.inline-edit-col .regular_price,#woocommerce-fields-bulk.inline-edit-col .sale_price,#woocommerce-fields-bulk.inline-edit-col .stock,#woocommerce-fields-bulk.inline-edit-col .weight{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%}#woocommerce-fields-bulk.inline-edit-col .height,#woocommerce-fields-bulk.inline-edit-col .length,#woocommerce-fields-bulk.inline-edit-col .width{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:32%}.column-coupon_code{line-height:2.25em}.column-coupon_code,ul.wc_coupon_list{margin:0;overflow:hidden;zoom:1;clear:both}.column-coupon_code li.code,ul.wc_coupon_list li.code{margin:0 6px 12px 0!important}.column-coupon_code .code a:after,.column-coupon_code .code a:before,.column-coupon_code .code span:after,.column-coupon_code .code span:before,.column-coupon_code .code:after,.column-coupon_code .code:before,ul.wc_coupon_list .code a:after,ul.wc_coupon_list .code a:before,ul.wc_coupon_list .code span:after,ul.wc_coupon_list .code span:before,ul.wc_coupon_list .code:after,ul.wc_coupon_list .code:before{content:"";display:block;position:absolute;width:8px;height:4px;background:#f7f7f7;-webkit-border-radius:2px;-moz-border-radius:2px;-o-border-radius:2px;border-radius:2px;-moz-box-shadow:0 2px 0 0 rgba(255,255,255,.3),inset 0 2px 0 0 rgba(0,0,0,.1);-webkit-box-shadow:0 2px 0 0 rgba(255,255,255,.3),inset 0 2px 0 0 rgba(0,0,0,.1);box-shadow:0 2px 0 0 rgba(255,255,255,.3),inset 0 2px 0 0 rgba(0,0,0,.1)}.column-coupon_code .code,ul.wc_coupon_list .code{overflow:hidden;vertical-align:middle;margin:0 8px 0 0;background:#ececec;color:#21759A;text-shadow:0 1px 0 #ddd;padding:2px;position:relative;float:left;line-height:1em;-moz-box-shadow:0 2px 0 0 #ddd;-webkit-box-shadow:0 2px 0 0 #ddd;box-shadow:0 2px 0 0 #ddd;font-weight:700}.column-coupon_code .code:before,ul.wc_coupon_list .code:before{bottom:5px;left:0;margin:0 0 0 -4px}.column-coupon_code .code:after,ul.wc_coupon_list .code:after{top:5px;left:0;margin:0 0 0 -4px}.column-coupon_code .code a,.column-coupon_code .code span,ul.wc_coupon_list .code a,ul.wc_coupon_list .code span{float:left;padding:0 4px;color:#21759A}.column-coupon_code .code a:before,.column-coupon_code .code span:before,ul.wc_coupon_list .code a:before,ul.wc_coupon_list .code span:before{bottom:5px;right:0;margin:0 -4px 0 0}.column-coupon_code .code a:after,.column-coupon_code .code span:after,ul.wc_coupon_list .code a:after,ul.wc_coupon_list .code span:after{content:"";top:5px;right:0;margin:0 -4px 0 0}.column-coupon_code .code a span,.column-coupon_code .code span span,ul.wc_coupon_list .code a span,ul.wc_coupon_list .code span span{border:1px dashed #ccc;padding:.5em 6px;-webkit-border-radius:2px;-moz-border-radius:2px;-o-border-radius:2px;border-radius:2px}.column-coupon_code .code a span:before,.column-coupon_code .code span span:before,ul.wc_coupon_list .code a span:before,ul.wc_coupon_list .code span span:before{top:50%;left:0;margin:-2px 0 0 -4px}.column-coupon_code .code a span:after,.column-coupon_code .code span span:after,ul.wc_coupon_list .code a span:after,ul.wc_coupon_list .code span span:after{top:50%;right:0;margin:-2px -4px 0 0}.column-coupon_code .code:hover,ul.wc_coupon_list .code:hover{background:#975e83;color:#fff;text-shadow:0 1px 0 #5a324b}.column-coupon_code .code:hover a,.column-coupon_code .code:hover span,ul.wc_coupon_list .code:hover a,ul.wc_coupon_list .code:hover span{color:#fff}.column-coupon_code .code:hover a span,.column-coupon_code .code:hover span span,ul.wc_coupon_list .code:hover a span,ul.wc_coupon_list .code:hover span span{border:1px dashed #bb82a7}ul.wc_coupon_list_block{margin:0;padding-bottom:2px}ul.wc_coupon_list_block li{border-top:1px solid #fff;border-bottom:1px solid #ccc;line-height:2.5em;margin:0;padding:.5em 0}ul.wc_coupon_list_block li:first-child{border-top:0;padding-top:0}ul.wc_coupon_list_block li:last-child{border-bottom:0;padding-bottom:0}.button.wc-reload{text-indent:-9999px;position:relative;padding:0;-webkit-border-radius:100%;border-radius:100%;height:24px;width:24px!important;display:inline-block}.button.wc-reload:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e031";line-height:22px}.tablenav .actions{overflow:visible}.alignleft.actions .chosen-container-single{display:inline-block;vertical-align:middle}#woocommerce-order-data .handlediv,#woocommerce-order-data h3.hndle{display:none}#woocommerce-order-data .inside{display:block!important}#order_data{padding:23px 24px 12px}#order_data h2{margin:0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;font-size:21px;font-weight:400;line-height:1.2;text-shadow:1px 1px 1px #fff;padding:0}#order_data h4{color:#333;margin:1.33em 0 0}#order_data p{color:#777}#order_data p.order_number{margin:0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;font-weight:400;line-height:1.6em;font-size:16px}#order_data .order_data_column_container{clear:both}#order_data .order_data_column{width:32%;padding:0 2% 0 0;float:left}#order_data .order_data_column:last-child{padding-right:0}#order_data .order_data_column p{padding:0!important}#order_data .order_data_column .address strong{display:block}#order_data .order_data_column .form-field{float:left;width:48%;padding:0;margin:9px 0 0}#order_data .order_data_column .form-field label{display:block;padding:0 0 3px}#order_data .order_data_column .form-field input,#order_data .order_data_column .form-field select,#order_data .order_data_column .form-field textarea{width:100%}#order_data .order_data_column .form-field #order_status_chosen .chosen-search{display:none}#order_data .order_data_column .form-field .chosen-container{width:100%!important}#order_data .order_data_column .form-field .date-picker-field{width:50%}#order_data .order_data_column .form-field .hour,#order_data .order_data_column .form-field .minute{width:2.5em}#order_data .order_data_column .form-field small{display:block;margin:5px 0 0;color:#999}#order_data .order_data_column .form-field.last{float:right}#order_data .order_data_column .form-field-wide{width:100%;clear:both}#order_data .order_data_column .form-field-wide input,#order_data .order_data_column .form-field-wide select,#order_data .order_data_column .form-field-wide textarea{width:100%}#order_data .order_data_column p.none_set{color:#999}#order_data .order_data_column ._billing_address_1_field,#order_data .order_data_column ._billing_city_field,#order_data .order_data_column ._billing_country_field,#order_data .order_data_column ._billing_email_field,#order_data .order_data_column ._billing_first_name_field,#order_data .order_data_column ._shipping_address_1_field,#order_data .order_data_column ._shipping_city_field,#order_data .order_data_column ._shipping_country_field,#order_data .order_data_column ._shipping_first_name_field{float:left}#order_data .order_data_column ._billing_address_2_field,#order_data .order_data_column ._billing_last_name_field,#order_data .order_data_column ._billing_phone_field,#order_data .order_data_column ._billing_postcode_field,#order_data .order_data_column ._billing_state_field,#order_data .order_data_column ._shipping_address_2_field,#order_data .order_data_column ._shipping_last_name_field,#order_data .order_data_column ._shipping_postcode_field,#order_data .order_data_column ._shipping_state_field{float:right}#order_data .order_data_column ._billing_company_field,#order_data .order_data_column ._shipping_company_field,#order_data .order_data_column ._transaction_id_field{clear:both;width:100%}#order_data .order_data_column ._billing_email_field{clear:left}#order_data .order_data_column div.edit_address{display:none;overflow:hidden;zoom:1;padding-right:1px}#order_data a.edit_address{opacity:.4}#order_data a.edit_address:focus,#order_data a.edit_address:hover{opacity:1}.order_actions{margin:0;overflow:hidden;zoom:1}.order_actions li{border-top:1px solid #fff;border-bottom:1px solid #ddd;padding:6px 0;margin:0;line-height:1.6em;float:left;width:50%;text-align:center}.order_actions li a{float:none;text-align:center;text-decoration:underline}.order_actions li.wide{width:auto;float:none;clear:both;padding:6px;text-align:left;overflow:hidden}.order_actions li #delete-action{line-height:25px;vertical-align:middle;text-align:left;float:left}.order_actions li .save_order{float:right}.order_actions li#actions{overflow:hidden}.order_actions li#actions .button{width:24px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:right}.order_actions li#actions select{width:225px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left}#woocommerce-order-items .inside{margin:0;padding:0;background:#fefefe}#woocommerce-order-items .wc-order-data-row{border-bottom:1px solid #DFDFDF;padding:12px;background:#f8f8f8;line-height:2em;text-align:right}#woocommerce-order-items .wc-order-data-row:after,#woocommerce-order-items .wc-order-data-row:before{content:" ";display:table}#woocommerce-order-items .wc-order-data-row:after{clear:both}#woocommerce-order-items .wc-order-data-row p{margin:0;line-height:2em}#woocommerce-order-items .wc-order-bulk-actions{background:#fefefe;vertical-align:top;border-top:0}#woocommerce-order-items .wc-order-bulk-actions select{vertical-align:top}#woocommerce-order-items .wc-order-bulk-actions p.bulk-actions{float:left}#woocommerce-order-items .wc-order-add-item{background:#fff;vertical-align:top;border-top:none}#woocommerce-order-items .wc-order-add-item .add_item_id,#woocommerce-order-items .wc-order-add-item .chosen-container{vertical-align:top}#woocommerce-order-items .wc-order-add-item .add_item_id .search-field input,#woocommerce-order-items .wc-order-add-item .chosen-container .search-field input{min-width:100px}#woocommerce-order-items .wc-order-add-item .chosen-container{width:400px!important;text-align:left}#woocommerce-order-items .wc-order-add-item .calculate-action,#woocommerce-order-items .wc-order-add-item .cancel-action,#woocommerce-order-items .wc-order-add-item .save-action{float:left;margin-right:2px}#woocommerce-order-items .wc-used-coupons{float:left;width:50%}#woocommerce-order-items .wc-order-totals{float:right;width:50%;margin:0;padding:0}#woocommerce-order-items .wc-order-totals .amount{font-weight:700}#woocommerce-order-items .wc-order-totals .label{vertical-align:top}#woocommerce-order-items .wc-order-totals .total{font-size:1em!important;width:10em;margin:0 0 0 .5em;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-order-items .wc-order-totals .total input[type=text]{width:96%;float:right}#woocommerce-order-items .wc-order-totals .refunded-total{color:#a00}#woocommerce-order-items .refund-actions{margin-top:5px;padding-top:12px;border-top:1px solid #DFDFDF}#woocommerce-order-items .refund-actions .button{float:right;margin-left:4px}#woocommerce-order-items .refund-actions .cancel-action{float:left;margin-left:0}#woocommerce-order-items .add_meta{margin-left:0!important}#woocommerce-order-items h3 small{color:#999}#woocommerce-order-items .amount{white-space:nowrap}.woocommerce_order_items_wrapper{margin:0;overflow:auto}.woocommerce_order_items_wrapper table.woocommerce_order_items{width:100%;background:#fff}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th{background:#f8f8f8;padding:8px;font-size:11px;text-align:left}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th:last-child{padding-right:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th:first-child{padding-left:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th,.woocommerce_order_items_wrapper table.woocommerce_order_items td{padding:8px;text-align:left;line-height:26px;vertical-align:top;border-bottom:1px dotted #ececec}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items td textarea{width:100%}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th select,.woocommerce_order_items_wrapper table.woocommerce_order_items td select{width:50%}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th input,.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items td input,.woocommerce_order_items_wrapper table.woocommerce_order_items td textarea{font-size:14px;padding:4px;color:#555}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items td:last-child{padding-right:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th:first-child,.woocommerce_order_items_wrapper table.woocommerce_order_items td:first-child{padding-left:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody tr:last-child td{border-bottom:1px solid #dfdfdf}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody tr:first-child td{border-top:8px solid #f8f8f8}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody#order_line_items tr:first-child td{border-top:none}.woocommerce_order_items_wrapper table.woocommerce_order_items td.check-column{padding:8px 8px 8px 12px;width:1%}.woocommerce_order_items_wrapper table.woocommerce_order_items .item{min-width:200px}.woocommerce_order_items_wrapper table.woocommerce_order_items .center,.woocommerce_order_items_wrapper table.woocommerce_order_items .variation-id{text-align:center}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class{text-align:right}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax label,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity label,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax label,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class label{white-space:nowrap;color:#999;font-size:.833em}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class label input{display:inline}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class input{width:70px;vertical-align:middle;text-align:right}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax select,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity select,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax select,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class select{width:85px;height:26px;vertical-align:middle;font-size:1em}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input{display:block;background:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);margin:1px;width:70px}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input input{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:0;box-shadow:none;margin:0;color:#555;background:0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input input:last-child{color:#bbb;border-top:1px dashed #ddd}.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity{text-align:center}.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity input{text-align:center;width:50px}.woocommerce_order_items_wrapper table.woocommerce_order_items span.subtotal{opacity:.5}.woocommerce_order_items_wrapper table.woocommerce_order_items td.tax_class,.woocommerce_order_items_wrapper table.woocommerce_order_items th.tax_class{text-align:left}.woocommerce_order_items_wrapper table.woocommerce_order_items .calculated{border-color:#ae8ca2;border-style:dotted}.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta{width:100%}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta{margin:.5em 0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr th,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr th{border:0;padding:0 4px .5em 0;line-height:1.5em;width:20%}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td{padding:0 4px .5em 0;border:0;line-height:1.5em}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td input,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td input{width:100%;margin:0;position:relative;border-bottom:0;box-shadow:none}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td textarea{width:100%;height:4em;margin:0;box-shadow:none}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td input:focus+textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td input:focus+textarea{border-top-color:#999}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td p,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td p{margin:0 0 .5em;line-height:1.5em}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td p:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td p:last-child{margin:0}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb{text-align:left;width:27px}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb a{display:block}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb img{padding:1px;margin:0;border:1px solid #dfdfdf;vertical-align:middle;width:21px;height:21px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.fee .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.fee .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e007";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.refund .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.refund .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e014";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.shipping .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.shipping .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e01a";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax{white-space:nowrap}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax{padding:8px 16px 8px 8px}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:12px;visibility:hidden;float:right;margin:2px -16px 0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax:before,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e013";color:#fff;background-color:#000;-webkit-border-radius:100%;border-radius:100%;border:1px solid #000;box-shadow:0 1px 2px rgba(0,0,0,.2)}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax:hover:before,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax:hover:before{border-color:#a00;background-color:#a00}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax:hover .delete-order-tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax:hover .delete-order-tax{visibility:visible}.woocommerce_order_items_wrapper table.woocommerce_order_items small.refunded{display:block;color:#a00;white-space:nowrap}.wc-order-items-editable .edit-order-item{text-indent:-9999px;position:relative;height:1em;width:1em;display:inline-block;margin:0 .5em 0 0}.wc-order-items-editable .edit-order-item:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e001";content:"\e603";color:#999}.wc-order-items-editable .edit-order-item:hover:before{color:#555}.wc-order-items-editable .delete-order-item,.wc-order-items-editable .delete_refund{text-indent:-9999px;position:relative;height:1em;width:1em;display:inline-block;margin:0}.wc-order-items-editable .delete-order-item:before,.wc-order-items-editable .delete_refund:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e001";content:"\e013";color:#999}.wc-order-items-editable .delete-order-item:hover:before,.wc-order-items-editable .delete_refund:hover:before{color:#a00}.wc-order-items-editable .wc-order-edit-line-item-actions{width:2.5em;text-align:right}.wc-order-items-editable .wc-order-totals .wc-order-edit-line-item-actions{width:1.5em}.wc-order-items-editable .wc-order-totals .edit-order-item{margin:0}#woocommerce-order-downloads .buttons{float:left;padding:0;margin:0;vertical-align:top}#woocommerce-order-downloads .buttons .add_item_id,#woocommerce-order-downloads .buttons .chosen-container{width:400px!important;margin-right:9px;vertical-align:top;float:left}#woocommerce-order-downloads .buttons button{margin:2px 0 0}#woocommerce-order-downloads h3 small{color:#999}#poststuff #woocommerce-order-actions .inside{margin:0;padding:0}#poststuff #woocommerce-order-actions .inside ul.order_actions li{padding:6px 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#poststuff #woocommerce-order-actions .inside ul.order_actions li:last-child{border-bottom:0}#poststuff #woocommerce-order-notes .inside{margin:0;padding:0}#poststuff #woocommerce-order-notes .inside ul.order_notes li{padding:0 10px}#woocommerce_customers p.search-box{margin:6px 0 4px;float:left}#woocommerce_customers .tablenav{float:right;clear:none}.widefat.customers td{vertical-align:middle;padding:4px 7px}.widefat .column-order_title{width:15%}.widefat .column-order_title time{display:block;color:#999;margin:3px 0}.widefat .column-orders,.widefat .column-paying,.widefat .column-spent{text-align:center;width:8%}.widefat .column-last_order{width:11%}.widefat .column-order_actions,.widefat .column-user_actions,.widefat .column-wc_actions{width:110px}.widefat .column-order_actions a.button,.widefat .column-user_actions a.button,.widefat .column-wc_actions a.button{float:left;margin:0 4px 2px 0;cursor:pointer;padding:3px 4px;height:auto}.widefat .column-order_actions a.button img,.widefat .column-user_actions a.button img,.widefat .column-wc_actions a.button img{display:block;width:12px;height:auto}.widefat small.meta{display:block;color:#999;font-size:inherit;margin:3px 0}.widefat .column-order_date,.widefat .column-order_total{width:9%}.widefat .column-order_status{width:45px;text-align:center}.widefat .column-order_status mark{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;background:0 0;font-size:1.4em;margin:0 auto}.widefat .column-order_status mark.cancelled:after,.widefat .column-order_status mark.completed:after,.widefat .column-order_status mark.failed:after,.widefat .column-order_status mark.on-hold:after,.widefat .column-order_status mark.pending:after,.widefat .column-order_status mark.processing:after,.widefat .column-order_status mark.refunded:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}.widefat .column-order_status mark.pending:after{content:"\e012";color:#ffba00}.widefat .column-order_status mark.completed:after{content:"\e015";color:#2ea2cc}.widefat .column-order_status mark.on-hold:after{content:"\e033";color:#999}.widefat .column-order_status mark.failed:after{content:"\e016";color:#d0c21f}.widefat .column-order_status mark.cancelled:after{content:"\e013";color:#a00}.widefat .column-order_status mark.processing:after{content:"\e011";color:#73a724}.widefat .column-order_status mark.refunded:after{content:"\e014";color:#999}.widefat td.column-order_status{padding-top:9px}.column-customer_message .note-on{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto;color:#999}.column-customer_message .note-on:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e026";line-height:16px}.column-order_notes .note-on{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto;color:#999}.column-order_notes .note-on:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e027";line-height:16px}.order_actions .complete,.order_actions .processing,.order_actions .view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.order_actions .complete:after,.order_actions .processing:after,.order_actions .view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.order_actions .processing:after{content:"\e00f"}.order_actions .complete:after{content:"\e017"}.order_actions .view:after{content:"\e010"}.user_actions .edit,.user_actions .link,.user_actions .view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.user_actions .edit:after,.user_actions .link:after,.user_actions .view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.user_actions .edit:after{content:"\e603"}.user_actions .link:after{content:"\e00d"}.user_actions .view:after{content:"\e010"}.attributes-table td,.attributes-table th{width:15%;vertical-align:top}.attributes-table .attribute-terms{width:32%}.attributes-table .attribute-actions{width:2em}.attributes-table .attribute-actions .configure-terms{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.attributes-table .attribute-actions .configure-terms:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e01c";line-height:1.85}ul.order_notes{padding:2px 0 0}ul.order_notes li .note_content{padding:10px;background:#efefef;position:relative}ul.order_notes li .note_content p{margin:0;padding:0;word-wrap:break-word}ul.order_notes li p.meta{padding:10px;color:#999;margin:0;font-size:11px}ul.order_notes li p.meta .exact-date{border-bottom:1px dotted #999}ul.order_notes li a.delete_note{color:#a00}ul.order_notes li .note_content:after{content:"";display:block;position:absolute;bottom:-10px;left:20px;width:0;height:0;border-width:10px 10px 0 0;border-style:solid;border-color:#efefef transparent}ul.order_notes li.customer-note .note_content{background:#d7cad2}ul.order_notes li.customer-note .note_content:after{border-color:#d7cad2 transparent}.add_note{border-top:1px solid #ddd;padding:10px 10px 0}.add_note h4{margin-top:5px!important}.add_note #add_order_note{width:100%;height:50px}table.wp-list-table .column-thumb{width:52px;text-align:center;white-space:nowrap}table.wp-list-table .column-name{width:22%}table.wp-list-table .column-product_cat,table.wp-list-table .column-product_tag{width:11%!important}table.wp-list-table .column-featured,table.wp-list-table .column-product_type{width:46px;text-align:left!important}table.wp-list-table .column-customer_message,table.wp-list-table .column-order_notes{width:46px;text-align:center}table.wp-list-table .column-customer_message img,table.wp-list-table .column-order_notes img{margin:0 auto;padding-top:0!important}table.wp-list-table .manage-column.column-featured img,table.wp-list-table .manage-column.column-product_type img{padding-left:2px}table.wp-list-table .column-price .woocommerce-price-suffix{display:none}table.wp-list-table img{margin:1px 2px}table.wp-list-table .row-actions{color:#999}table.wp-list-table td.column-thumb img{margin:0;vertical-align:middle;width:auto;height:auto;max-width:40px;max-height:40px}table.wp-list-table span.na{color:#999}table.wp-list-table .column-is_in_stock{text-align:left!important}table.wp-list-table span.wc-featured,table.wp-list-table span.wc-image,table.wp-list-table span.wc-type{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto}table.wp-list-table span.wc-featured:before,table.wp-list-table span.wc-image:before,table.wp-list-table span.wc-type:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e00c"}table.wp-list-table span.wc-featured{margin:0;cursor:pointer}table.wp-list-table span.wc-featured:before{content:"\e020"}table.wp-list-table span.wc-featured.not-featured:before{content:"\e021"}table.wp-list-table td.column-featured span.wc-featured{font-size:1.2em}table.wp-list-table span.wc-type{margin:0}table.wp-list-table span.wc-type:before{content:"\e01d"}table.wp-list-table span.product-type{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.2em}table.wp-list-table span.product-type:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e006"}table.wp-list-table span.product-type.grouped:before{content:"\e002"}table.wp-list-table span.product-type.external:before{content:"\e034"}table.wp-list-table span.product-type.variable:before{content:"\e003"}table.wp-list-table span.product-type.downloadable:before{content:"\e001"}table.wp-list-table span.product-type.virtual:before{content:"\e000"}table.wp-list-table mark.instock{font-weight:700;color:#7ad03a;background:0 0;line-height:1}table.wp-list-table mark.outofstock{font-weight:700;color:#a44;background:0 0;line-height:1}table.wp-list-table .notes_head,table.wp-list-table .order-notes_head,table.wp-list-table .status_head{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto}table.wp-list-table .notes_head:after,table.wp-list-table .order-notes_head:after,table.wp-list-table .status_head:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}table.wp-list-table .order-notes_head:after{content:"\e028"}table.wp-list-table .notes_head:after{content:"\e026"}table.wp-list-table .status_head:after{content:"\e011"}table.wp-list-table .column-order_items{width:12%}table.wp-list-table .column-order_items table.order_items{width:100%;margin:3px 0 0;padding:0;display:none}table.wp-list-table .column-order_items table.order_items td{border:0;margin:0;padding:0 0 3px}table.wp-list-table .column-order_items table.order_items td.qty{color:#999;padding-right:6px;text-align:left}mark.notice{background:#fff;color:#a00;margin:0 0 0 10px}a.export_rates,a.import_rates{float:right;margin-left:9px;margin-top:-2px;margin-bottom:0}table.wc_input_table,table.wc_tax_rates{width:100%}table.wc_input_table span.tips,table.wc_tax_rates span.tips{color:#2ea2cc}table.wc_input_table td,table.wc_tax_rates td{padding:0;border-right:1px solid #DFDFDF;border-bottom:1px solid #DFDFDF;border-top:0;background:#fff}table.wc_input_table td input[type=number],table.wc_input_table td input[type=text],table.wc_tax_rates td input[type=number],table.wc_tax_rates td input[type=text]{width:100%;padding:5px 7px;margin:0;border:0;background:0 0}table.wc_input_table td.apply_to_shipping,table.wc_input_table td.compound,table.wc_tax_rates td.apply_to_shipping,table.wc_tax_rates td.compound{padding:5px 7px;vertical-align:middle}table.wc_input_table td.apply_to_shipping input,table.wc_input_table td.compound input,table.wc_tax_rates td.apply_to_shipping input,table.wc_tax_rates td.compound input{width:auto;padding:0}table.wc_input_table td:last-child,table.wc_tax_rates td:last-child{border-right:0}table.wc_input_table tr.current td,table.wc_tax_rates tr.current td{background-color:#fefbcc}table.wc_input_table .cost,table.wc_input_table .cost input,table.wc_input_table .item_cost,table.wc_input_table .item_cost input,table.wc_tax_rates .cost,table.wc_tax_rates .cost input,table.wc_tax_rates .item_cost,table.wc_tax_rates .item_cost input{text-align:right}table.wc_input_table th.sort,table.wc_tax_rates th.sort{width:17px;padding:0}table.wc_input_table td.sort,table.wc_tax_rates td.sort{padding:0 4px;cursor:move;background:#f9f9f9;text-align:center;vertical-align:middle}table.wc_input_table td.sort:before,table.wc_tax_rates td.sort:before{content:"\e032";font-family:WooCommerce;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%}table.wc_input_table td.sort:hover:before,table.wc_tax_rates td.sort:hover:before{color:#333}table.wc_input_table .button,table.wc_tax_rates .button{float:left;margin-right:5px}table.wc_input_table .export,table.wc_input_table .import,table.wc_tax_rates .export,table.wc_tax_rates .import{float:right;margin-right:0;margin-left:5px}table.wc_input_table span.tips,table.wc_tax_rates span.tips{padding:0 3px}table.wc_input_table .pagination,table.wc_tax_rates .pagination{float:right}table.wc_input_table .pagination .button,table.wc_tax_rates .pagination .button{margin-left:5px;margin-right:0}table.wc_input_table .pagination .current,table.wc_tax_rates .pagination .current{background:#bbb;text-shadow:none}table.wc_input_table tfoot th,table.wc_tax_rates tfoot th{padding-left:20px;padding-right:20px}table.wc_input_table tr:last-child td,table.wc_tax_rates tr:last-child td{border-bottom:0}table.wc_gateways,table.wc_shipping{position:relative}table.wc_gateways td,table.wc_shipping td{vertical-align:middle;cursor:move;padding:7px}table.wc_gateways th,table.wc_shipping th{padding:9px 7px!important;vertical-align:middle}table.wc_gateways td.name,table.wc_shipping td.name{font-weight:700}table.wc_gateways .settings,table.wc_shipping .settings{text-align:right}table.wc_gateways .default,table.wc_gateways .radio,table.wc_gateways .status,table.wc_shipping .default,table.wc_shipping .radio,table.wc_shipping .status{text-align:center}table.wc_gateways .default .tips,table.wc_gateways .radio .tips,table.wc_gateways .status .tips,table.wc_shipping .default .tips,table.wc_shipping .radio .tips,table.wc_shipping .status .tips{margin:0 auto}table.wc_gateways .default input,table.wc_gateways .radio input,table.wc_gateways .status input,table.wc_shipping .default input,table.wc_shipping .radio input,table.wc_shipping .status input{margin:0}img.help_tip{vertical-align:middle;margin:0 0 0 9px}.postbox img.help_tip{margin-top:-4px}.status-disabled,.status-enabled{font-size:1.4em;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}.status-enabled:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e015";color:#ad74a2}.woocommerce #template div{margin:0}.woocommerce #template div p .button{float:right;margin-left:10px;margin-top:-4px}.woocommerce #template div .editor textarea{margin-bottom:8px}.woocommerce textarea[disabled=disabled]{background:#DFDFDF!important}.woocommerce table.form-table,.woocommerce table.form-table .forminp-radio ul{margin:0}.woocommerce table.form-table .forminp-radio ul li{line-height:1.4em}.woocommerce table.form-table textarea.input-text{height:100%;min-width:150px;display:block}.woocommerce table.form-table input.regular-input{width:25em}.woocommerce table.form-table textarea.wide-input{width:100%}.woocommerce table.form-table img.help_tip{padding:0;margin:-4px 0 0 5px;vertical-align:middle;cursor:help;line-height:1}.woocommerce table.form-table span.help_tip{cursor:help;color:#2ea2cc}.woocommerce table.form-table th{position:relative;padding-right:24px}.woocommerce table.form-table .chosen-container{vertical-align:top;margin-bottom:3px}.woocommerce table.form-table table.widefat th{padding-right:inherit}.woocommerce table.form-table th img.help_tip{margin:0 -24px 0 0;float:right}.woocommerce table.form-table fieldset{margin-top:4px}.woocommerce table.form-table fieldset img.help_tip{margin:-3px 0 0 5px}.woocommerce table.form-table fieldset p.description{margin-bottom:8px}.woocommerce table.form-table fieldset:first-child{margin-top:0}.woocommerce table.form-table .color_box{border:1px solid #ccc;box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.2);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding:4px 6px;float:left;width:90px;margin:0 10px 0 0}.woocommerce table.form-table .color_box strong{text-align:left;display:block;padding:0 0 2px;font-size:.92em}.woocommerce table.form-table .color_box strong img{float:right;margin:1px 0 0}.woocommerce table.form-table .color_box input.colorpick{width:100%;margin:0;font-family:monospace;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce table.form-table .color_box .iris-picker{margin:15px 0 0 -7px}.woocommerce table.form-table .color_box_clear{display:block;clear:both;padding-bottom:10px}.woocommerce table.form-table .iris-picker{z-index:100;position:absolute;display:none;border:1px solid #ccc;box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.2);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.woocommerce table.form-table .iris-picker .ui-slider{border:0!important;background:none!important;margin:0!important;width:auto!important;height:auto!important}.woocommerce table.form-table .iris-picker .ui-slider .ui-slider-handle{margin-bottom:0!important}.woocommerce table.form-table .image_width_settings{vertical-align:middle}.woocommerce table.form-table .image_width_settings label{margin-left:10px}.woocommerce #tabs-wrap table a.remove{margin-left:4px}.woocommerce #tabs-wrap table p{margin:0 0 4px!important;overflow:hidden;zoom:1}.woocommerce #tabs-wrap table p a.add{float:left}#wp-excerpt-editor-container{background:#fff}#product_variation-parent #parent_id{width:100%}#postimagediv img{border:1px solid #d5d5d5;max-width:100%}#woocommerce-product-images .inside{margin:0;padding:0}#woocommerce-product-images .inside .add_product_images{padding:0 12px 12px}#woocommerce-product-images .inside #product_images_container{padding:0 0 0 9px}#woocommerce-product-images .inside #product_images_container ul{margin:0;padding:0}#woocommerce-product-images .inside #product_images_container ul:after,#woocommerce-product-images .inside #product_images_container ul:before{content:" ";display:table}#woocommerce-product-images .inside #product_images_container ul:after{clear:both}#woocommerce-product-images .inside #product_images_container ul li.add,#woocommerce-product-images .inside #product_images_container ul li.image,#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder{width:80px;float:left;cursor:move;border:1px solid #d5d5d5;margin:9px 9px 0 0;background:#f7f7f7;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-product-images .inside #product_images_container ul li.add img,#woocommerce-product-images .inside #product_images_container ul li.image img,#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder img{width:100%;height:auto;display:block}#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder{border:3px dashed #ddd;position:relative}#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e00c";font-size:2.618em;line-height:72px;color:#ddd}#woocommerce-product-images .inside #product_images_container ul ul.actions{position:absolute;top:-8px;right:-8px;padding:2px;display:none}#woocommerce-product-images .inside #product_images_container ul ul.actions li{float:right;margin:0 0 0 2px}#woocommerce-product-images .inside #product_images_container ul ul.actions li a{width:1em;margin:0;height:0;display:block;overflow:hidden}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.tips{cursor:pointer}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.view{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.4em}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.view:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e00c";background-color:#000;color:#fff}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.4em}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e013";color:#fff;background-color:#000;-webkit-border-radius:100%;border-radius:100%;box-shadow:0 1px 2px rgba(0,0,0,.2)}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete:hover:before{background-color:#a00}#woocommerce-product-images .inside #product_images_container ul li:hover ul.actions{display:block}#woocommerce-product-data h3.hndle{padding:10px}#woocommerce-product-data h3.hndle span{display:block;vertical-align:middle;line-height:24px}#woocommerce-product-data h3.hndle span span{display:inline;line-height:inherit;vertical-align:baseline}#woocommerce-product-data h3.hndle label{padding-right:1em;font-size:12px;vertical-align:baseline}#woocommerce-product-data h3.hndle label:first-child{margin-right:1em;border-right:1px solid #dfdfdf}#woocommerce-product-data h3.hndle input,#woocommerce-product-data h3.hndle select{margin:-3px 0 0 .5em;vertical-align:middle}#woocommerce-product-data>.handlediv{margin-top:4px}#woocommerce-product-data .wrap{margin:0}#woocommerce-coupon-description{padding:3px 8px;font-size:1.7em;line-height:1.42em;height:auto;width:100%;outline:0;margin:10px 0;display:block}#woocommerce-coupon-description::-webkit-input-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description::-moz-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description:-ms-input-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description:-moz-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-data .panel-wrap,#woocommerce-product-data .panel-wrap{background:#fff;padding-left:153px}#woocommerce-coupon-data .wc-metaboxes-wrapper,#woocommerce-coupon-data .woocommerce_options_panel,#woocommerce-product-data .wc-metaboxes-wrapper,#woocommerce-product-data .woocommerce_options_panel{float:right;width:100%}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-metaboxes,#woocommerce-coupon-data .wc-metaboxes-wrapper p.toolbar,#woocommerce-coupon-data .woocommerce_options_panel .wc-metaboxes,#woocommerce-coupon-data .woocommerce_options_panel p.toolbar,#woocommerce-product-data .wc-metaboxes-wrapper .wc-metaboxes,#woocommerce-product-data .wc-metaboxes-wrapper p.toolbar,#woocommerce-product-data .woocommerce_options_panel .wc-metaboxes,#woocommerce-product-data .woocommerce_options_panel p.toolbar{padding-left:12px!important;padding-right:20px!important}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios,#woocommerce-product-data .woocommerce_options_panel .wc-radios{display:block;float:left;margin:0}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios li,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios li,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios li,#woocommerce-product-data .woocommerce_options_panel .wc-radios li{display:block;padding:0 0 10px}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios li input,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios li input,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios li input,#woocommerce-product-data .woocommerce_options_panel .wc-radios li input{width:auto}#woocommerce-coupon-data .wc-tabs-back,#woocommerce-product-data .wc-tabs-back{position:absolute;top:0;left:0;bottom:0;background:#f5f5f5;width:145px;border-right:1px solid #DFDFDF}#woocommerce-coupon-data ul.wc-tabs,#woocommerce-product-data ul.wc-tabs,.woocommerce ul.wc-tabs{background:#f5f5f5;line-height:1em;float:left;width:145px;margin:0 0 0 -153px;position:relative;padding:0 0 10px}#woocommerce-coupon-data ul.wc-tabs li,#woocommerce-product-data ul.wc-tabs li,.woocommerce ul.wc-tabs li{display:block;padding:0;margin:0}#woocommerce-coupon-data ul.wc-tabs li a,#woocommerce-product-data ul.wc-tabs li a,.woocommerce ul.wc-tabs li a{padding:10px;line-height:18px!important;margin:0;display:block;background:#f5f5f5;text-decoration:none;border-bottom:1px solid #f5f5f5;border-top:1px solid #eaeaea}#woocommerce-coupon-data ul.wc-tabs li a:before,#woocommerce-product-data ul.wc-tabs li a:before,.woocommerce ul.wc-tabs li a:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:7px;content:"\e028"}#woocommerce-coupon-data ul.wc-tabs li:first-child a,#woocommerce-product-data ul.wc-tabs li:first-child a,.woocommerce ul.wc-tabs li:first-child a{border-top:0!important}#woocommerce-coupon-data ul.wc-tabs li.general_options a:before,#woocommerce-product-data ul.wc-tabs li.general_options a:before,.woocommerce ul.wc-tabs li.general_options a:before{content:"\e006"}#woocommerce-coupon-data ul.wc-tabs li.inventory_options a:before,#woocommerce-product-data ul.wc-tabs li.inventory_options a:before,.woocommerce ul.wc-tabs li.inventory_options a:before{content:"\e02c"}#woocommerce-coupon-data ul.wc-tabs li.shipping_options a:before,#woocommerce-product-data ul.wc-tabs li.shipping_options a:before,.woocommerce ul.wc-tabs li.shipping_options a:before{content:"\e01a"}#woocommerce-coupon-data ul.wc-tabs li.linked_product_options a:before,#woocommerce-product-data ul.wc-tabs li.linked_product_options a:before,.woocommerce ul.wc-tabs li.linked_product_options a:before{content:"\e00d"}#woocommerce-coupon-data ul.wc-tabs li.attribute_options a:before,#woocommerce-product-data ul.wc-tabs li.attribute_options a:before,.woocommerce ul.wc-tabs li.attribute_options a:before{content:"\e02b"}#woocommerce-coupon-data ul.wc-tabs li.advanced_options a:before,#woocommerce-product-data ul.wc-tabs li.advanced_options a:before,.woocommerce ul.wc-tabs li.advanced_options a:before{content:"\e01c"}#woocommerce-coupon-data ul.wc-tabs li.variation_options a:before,#woocommerce-product-data ul.wc-tabs li.variation_options a:before,.woocommerce ul.wc-tabs li.variation_options a:before{content:"\e003"}#woocommerce-coupon-data ul.wc-tabs li.usage_restriction_options a:before,#woocommerce-product-data ul.wc-tabs li.usage_restriction_options a:before,.woocommerce ul.wc-tabs li.usage_restriction_options a:before{content:"\e602"}#woocommerce-coupon-data ul.wc-tabs li.usage_limit_options a:before,#woocommerce-product-data ul.wc-tabs li.usage_limit_options a:before,.woocommerce ul.wc-tabs li.usage_limit_options a:before{content:"\e601"}#woocommerce-coupon-data ul.wc-tabs li.general_coupon_data a:before,#woocommerce-product-data ul.wc-tabs li.general_coupon_data a:before,.woocommerce ul.wc-tabs li.general_coupon_data a:before{content:"\e600"}#woocommerce-coupon-data ul.wc-tabs li.active a,#woocommerce-product-data ul.wc-tabs li.active a,.woocommerce ul.wc-tabs li.active a{border-color:#DFDFDF;position:relative;background-color:#fff;color:#555;margin:0 -1px 0 0}.woocommerce_page_wc-settings .shippingrows th.check-column{padding-top:20px}.woocommerce_page_wc-settings .shippingrows tfoot th{padding-left:10px}.woocommerce_page_wc-settings .shippingrows .add.button:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:7px;content:"\e007"}@media only screen and (max-width:900px){#woocommerce-coupon-data .panel-wrap,#woocommerce-product-data .panel-wrap{padding-left:35px}#woocommerce-coupon-data .wc-tabs-back,#woocommerce-product-data .wc-tabs-back{position:absolute;top:0;left:0;bottom:0;width:28px;border-right:1px solid #DFDFDF}#woocommerce-product-data ul.product_data_tabs,.woocommerce ul.wc-tabs{width:28px;margin-left:-35px}#woocommerce-product-data ul.product_data_tabs li a,.woocommerce ul.wc-tabs li a{overflow:hidden;white-space:nowrap}}#woocommerce-coupon-data .inside,#woocommerce-order-data .inside,#woocommerce-order-downloads .inside,#woocommerce-product-data .inside,#woocommerce-product-type-options .inside{padding:0;margin:0}.panel,.woocommerce_options_panel{padding:9px;color:#555}.panel,.woocommerce_page_settings .woocommerce_options_panel{padding:0}#woocommerce-product-specs .inside,#woocommerce-product-type-options .panel{padding:9px;margin:0}#woocommerce-product-type-options .panel p,.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p{margin:0 0 9px;font-size:12px;padding:5px 9px;line-height:24px}#woocommerce-product-type-options .panel p:after,.woocommerce_options_panel fieldset.form-field:after,.woocommerce_options_panel p:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce_options_panel .checkbox,table.woocommerce_variable_attributes .checkbox{width:auto;vertical-align:middle;margin:7px 0}.woocommerce_options_panel .downloadable_files table,.woocommerce_variations .downloadable_files table{width:100%;padding:0!important}.woocommerce_options_panel .downloadable_files table th,.woocommerce_variations .downloadable_files table th{padding:7px 0 7px 7px}.woocommerce_options_panel .downloadable_files table td,.woocommerce_variations .downloadable_files table td{vertical-align:middle!important;padding:4px 0 4px 7px;position:relative}.woocommerce_options_panel .downloadable_files table td:last-child,.woocommerce_variations .downloadable_files table td:last-child{padding-right:7px}.woocommerce_options_panel .downloadable_files table td input.input_text,.woocommerce_variations .downloadable_files table td input.input_text{width:100%;float:none;margin:1px 0}.woocommerce_options_panel .downloadable_files table td .upload_file_button,.woocommerce_variations .downloadable_files table td .upload_file_button{float:right;width:auto;cursor:pointer}.woocommerce_options_panel .downloadable_files table td .delete,.woocommerce_variations .downloadable_files table td .delete{display:block;text-indent:-9999px;position:relative;height:1em;width:1em}.woocommerce_options_panel .downloadable_files table td .delete:before,.woocommerce_variations .downloadable_files table td .delete:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e001";content:"\e013";color:#999}.woocommerce_options_panel .downloadable_files table td .delete:hover:before,.woocommerce_variations .downloadable_files table td .delete:hover:before{color:#a00}.woocommerce_options_panel .downloadable_files table th.sort,.woocommerce_variations .downloadable_files table th.sort{width:17px;padding:0}.woocommerce_options_panel .downloadable_files table td.sort,.woocommerce_variations .downloadable_files table td.sort{padding:0 8px;cursor:move;background:#f9f9f9;text-align:center;vertical-align:middle}.woocommerce_options_panel .downloadable_files table td.sort:before,.woocommerce_variations .downloadable_files table td.sort:before{content:"\e032";font-family:WooCommerce;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%}.woocommerce_options_panel .downloadable_files table td.sort:hover:before,.woocommerce_variations .downloadable_files table td.sort:hover:before{color:#333}.woocommerce_options_panel .downloadable_files{padding:0 9px 0 162px;position:relative;margin:9px 0}.woocommerce_options_panel .downloadable_files label{position:absolute;left:0;margin:0 0 0 12px;line-height:24px}.woocommerce_options_panel p{margin:9px 0}.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p.form-field{padding:5px 20px 5px 162px!important}.woocommerce_options_panel label,.woocommerce_options_panel legend{float:left;width:150px;padding:0;margin:0 0 0 -150px}.woocommerce_options_panel label .req,.woocommerce_options_panel legend .req{font-weight:700;font-style:normal;color:#a00}.woocommerce_options_panel .description{padding:0;margin:0 0 0 7px}.woocommerce_options_panel .description-block{margin-left:0;display:block}.woocommerce_options_panel input,.woocommerce_options_panel select,.woocommerce_options_panel textarea{margin:0}.woocommerce_options_panel textarea{vertical-align:top;height:3.5em;line-height:1.5em}.woocommerce_options_panel input[type=email],.woocommerce_options_panel input[type=number],.woocommerce_options_panel input[type=text]{width:50%;float:left}.woocommerce_options_panel input.button{width:auto;margin-left:8px}.woocommerce_options_panel select{float:left}.woocommerce_options_panel .short,.woocommerce_options_panel input[type=email].short,.woocommerce_options_panel input[type=number].short,.woocommerce_options_panel input[type=text].short{width:25%}.woocommerce_options_panel .sized{width:auto!important;margin-right:6px}.woocommerce_options_panel .options_group{border-top:1px solid #fff;border-bottom:1px solid #DFDFDF}.woocommerce_options_panel .options_group:first-child{border-top:0}.woocommerce_options_panel .options_group:last-child{border-bottom:0}.woocommerce_options_panel .options_group fieldset{margin:9px 0;font-size:12px;padding:5px 9px;line-height:24px}.woocommerce_options_panel .options_group fieldset label{width:auto;float:none}.woocommerce_options_panel .options_group fieldset ul{float:left;width:50%;margin:0;padding:0}.woocommerce_options_panel .options_group fieldset ul li{margin:0;width:auto}.woocommerce_options_panel .options_group fieldset ul li input{width:auto;float:none;margin-right:4px}.woocommerce_options_panel .options_group fieldset ul.wc-radios label{margin-left:0}.woocommerce_options_panel .dimensions_field .wrap input{margin-right:.2%;width:8.2%}.woocommerce_options_panel .dimensions_field .wrap .last{margin-right:0}#woocommerce-product-data input.dp-applied{float:left}#grouped_product_options,#simple_product_options,#virtual_product_options{padding:12px;font-style:italic;color:#666}.wc-metaboxes-wrapper .toolbar{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #DFDFDF;padding:9px 12px!important}.wc-metaboxes-wrapper .toolbar:first-child{border-top:0}.wc-metaboxes-wrapper .toolbar:last-child{border-bottom:0}.wc-metaboxes-wrapper .toolbar .add_variation,.wc-metaboxes-wrapper .toolbar .link_all_variations{float:right;margin-left:5px}.wc-metaboxes-wrapper p.toolbar{overflow:hidden;zoom:1}.wc-metaboxes-wrapper .fr,.wc-metaboxes-wrapper button.add_attribute,.wc-metaboxes-wrapper button.add_variable_attribute,.wc-metaboxes-wrapper select.attribute_taxonomy{float:right;margin:0 0 0 6px}.wc-metaboxes-wrapper .wc-metaboxes{border-bottom:1px solid #DFDFDF;padding:0 12px}.wc-metaboxes-wrapper .wc-metabox-sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;margin-bottom:9px;border-width:1px;border-style:dashed}.wc-metaboxes-wrapper .wc-metabox{background:#fff;border:1px solid #dfdfdf;margin:9px 0!important;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px}.wc-metaboxes-wrapper .wc-metabox .handlediv:before{line-height:.5!important}.wc-metaboxes-wrapper .wc-metabox.closed{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.wc-metaboxes-wrapper .wc-metabox.closed .handlediv:before{content:"\f140"!important}.wc-metaboxes-wrapper .wc-metabox.closed h3{border:0}.wc-metaboxes-wrapper .wc-metabox h3{margin:0!important;padding:6px!important;font-size:1em!important;overflow:hidden;zoom:1;cursor:move}.wc-metaboxes-wrapper .wc-metabox h3 button{float:right}.wc-metaboxes-wrapper .wc-metabox h3 strong{font-weight:400;line-height:24px}.wc-metaboxes-wrapper .wc-metabox h3 select{font-family:sans-serif}.wc-metaboxes-wrapper .wc-metabox h3 .handlediv{background-position:6px 5px!important;display:none;height:24px}.wc-metaboxes-wrapper .wc-metabox h3.fixed{cursor:pointer!important}.wc-metaboxes-wrapper .wc-metabox h3:hover .handlediv{display:block}.wc-metaboxes-wrapper .wc-metabox table{width:100%;position:relative;background:#fff;padding:3px}.wc-metaboxes-wrapper .wc-metabox table td{text-align:left;padding:6px;vertical-align:top;border:0}.wc-metaboxes-wrapper .wc-metabox table td label{text-align:left;display:block;line-height:21px}.wc-metaboxes-wrapper .wc-metabox table td input{float:left;min-width:200px}.wc-metaboxes-wrapper .wc-metabox table td input,.wc-metaboxes-wrapper .wc-metabox table td textarea{width:100%;margin:0;display:block;font-size:14px;padding:4px;color:#555}.wc-metaboxes-wrapper .wc-metabox table td .chosen-container,.wc-metaboxes-wrapper .wc-metabox table td select{width:100%!important}.wc-metaboxes-wrapper .wc-metabox table td input.short{width:200px}.wc-metaboxes-wrapper .wc-metabox table td input.checkbox{width:16px;min-width:inherit;vertical-align:text-bottom;display:inline-block;float:none}.wc-metaboxes-wrapper .wc-metabox table td.attribute_name{width:200px}.wc-metaboxes-wrapper .wc-metabox table .minus,.wc-metaboxes-wrapper .wc-metabox table .plus{margin-top:6px}.wc-metaboxes-wrapper .wc-metabox table .fl{float:left}.wc-metaboxes-wrapper .wc-metabox table .fr{float:right}.wc-metaboxes-wrapper .close_all,.wc-metaboxes-wrapper .expand_all{float:right;margin-left:14px;line-height:22px;text-decoration:none}.wc-metaboxes-wrapper .close_all:before,.wc-metaboxes-wrapper .expand_all:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:7px;content:"\e036";font-size:.8em;color:#999}.wc-metaboxes-wrapper .expand_all:before{content:"\e035"}#variable_product_options .woocommerce_variation table{background:#fafafa;border-top:1px solid #eee;padding:6px}#variable_product_options .woocommerce_variation table td input{min-width:inherit!important}#variable_product_options .woocommerce_variation table td.dimensions_field input{width:32%;margin-right:2%}#variable_product_options .woocommerce_variation table td.dimensions_field .last{margin-right:0}#variable_product_options .woocommerce_variation table td.options{width:150px}#variable_product_options .woocommerce_variation table td.options label{margin-bottom:6px}#variable_product_options .woocommerce_variation table td.data{padding:0 0 0 12px}#variable_product_options .woocommerce_variation table td.data table.data_table{width:100%;padding:0 12px 6px;background:#fff;border:1px solid #dfdfdf;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#variable_product_options .woocommerce_variation table td.data table.data_table td{width:50%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#variable_product_options .woocommerce_variation table td.data table.data_table:before{content:"";display:block;position:absolute;top:33px;left:0;margin:0 0 0 -1px;border:7px solid #dfdfdf;border-color:transparent transparent transparent #dfdfdf}#variable_product_options .woocommerce_variation table td.data table.data_table:after{content:"";display:block;position:absolute;top:34px;left:0;margin:0 0 0 -1px;border:6px solid #fafafa;border-color:transparent transparent transparent #fafafa}#variable_product_options .woocommerce_variation table td.upload_image{white-space:nowrap;width:75px}#variable_product_options .woocommerce_variation table td.upload_image img{float:none;width:73px;border:1px solid #dfdfdf}#variable_product_options .woocommerce_variation table td.upload_image .button{margin:0;padding:4px 10px;width:auto;float:none;vertical-align:middle}#variable_product_options .woocommerce_variation table td.upload_image .upload_image_button{display:block;position:relative}#variable_product_options .woocommerce_variation table td.upload_image .upload_image_button .overlay{display:none;width:75px;height:75px;position:absolute;top:0;left:0;margin:0;padding:0;opacity:.5;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAXklEQVQYGW2OUQrAMAhDFy8+dnKnwiuh2I+aJulDZebDkfSie1b28Q7EXWrfvSm60RQnkQUC8ja7owpmL6d4GdDZ0cNNHyIhZEj4QYCxze6orsluAh8AnR0xKPR07weXJi8JGd3qqwAAAABJRU5ErkJggg==) center center no-repeat #eee}#variable_product_options .woocommerce_variation table td.upload_image .upload_image_button:hover .overlay{display:block}#variable_product_options .woocommerce_variation table td.upload_image .upload_image_button.remove .overlay{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAWElEQVQYGY2OUQ6AMAxCZdm9jSev65K3YKNm+6EFBlVEHDxJJ3Pi0C72xlBNyTs3jU7wEUTTIB51GCp2CL8HLpHEdaOLb/N2dfuq9NT0zOo/M9q6EaImsd/uViMLVuD4KAAAAABJRU5ErkJggg==) center center no-repeat #eee}#variable_product_options .woocommerce_variation table .cancel_sale_schedule,#variable_product_options .woocommerce_variation table .sale_schedule{float:right}#variable_product_options .woocommerce_variation table tr.sale_price_dates_fields td{padding-right:24px;position:relative}#variable_product_options .woocommerce_variation table tr.sale_price_dates_fields td img{position:absolute;right:0;bottom:0;padding:5px 0;margin:0 0 6px}.tips{cursor:help;text-decoration:none}img.tips{padding:5px 0 0}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#464646}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#464646}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#464646}#tiptip_holder.tip_left{padding-right:5px}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#464646}#tiptip_content,.chart-tooltip,.wc_error_tip{font-size:11px;color:#fff;padding:.5em;background:#464646;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.1);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.1);box-shadow:1px 1px 3px rgba(0,0,0,.1);text-align:center;max-width:150px}#tiptip_content code,.chart-tooltip code,.wc_error_tip code{background:#888;padding:1px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}.wc_error_tip{background:#d82223;max-width:20em;white-space:normal;position:absolute;margin:1.5em 1px 0 -1em;z-index:9999999}.wc_error_tip:after{content:"";display:block;border:8px solid #d82223;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;position:absolute;top:-3px;left:50%;margin:-1em 0 0 -3px}img.ui-datepicker-trigger{vertical-align:middle;margin-top:-1px;cursor:pointer}.wc-metabox-content img.ui-datepicker-trigger,.woocommerce_options_panel img.ui-datepicker-trigger{float:left;margin-right:8px;margin-top:4px;margin-left:4px}#ui-datepicker-div{display:none}.woocommerce-reports-wide.woocommerce-reports-wrap,.woocommerce-reports-wrap.woocommerce-reports-wrap{margin-left:300px;padding-top:18px}.woocommerce-reports-wide.halved,.woocommerce-reports-wrap.halved{margin:0;overflow:hidden;zoom:1}.woocommerce-reports-wide .widefat td,.woocommerce-reports-wrap .widefat td{vertical-align:top;padding:7px}.woocommerce-reports-wide .widefat td .description,.woocommerce-reports-wrap .widefat td .description{margin:4px 0 0}.woocommerce-reports-wide .postbox:after,.woocommerce-reports-wrap .postbox:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce-reports-wide .postbox h3,.woocommerce-reports-wrap .postbox h3{cursor:default!important}.woocommerce-reports-wide .postbox .inside,.woocommerce-reports-wrap .postbox .inside{padding:10px;margin:0!important}.woocommerce-reports-wide .postbox h3.stats_range,.woocommerce-reports-wrap .postbox h3.stats_range{padding:0!important;border-bottom-color:#dfdfdf}.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{float:right;line-height:26px;border-left:1px solid #dfdfdf;padding:10px;display:block;text-decoration:none}.woocommerce-reports-wide .postbox h3.stats_range .export_csv:before,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;content:"\e00a";margin-right:4px}.woocommerce-reports-wide .postbox h3.stats_range ul,.woocommerce-reports-wrap .postbox h3.stats_range ul{list-style:none;margin:0;padding:0;zoom:1;background:#f5f5f5}.woocommerce-reports-wide .postbox h3.stats_range ul:after,.woocommerce-reports-wide .postbox h3.stats_range ul:before,.woocommerce-reports-wrap .postbox h3.stats_range ul:after,.woocommerce-reports-wrap .postbox h3.stats_range ul:before{content:" ";display:table}.woocommerce-reports-wide .postbox h3.stats_range ul:after,.woocommerce-reports-wrap .postbox h3.stats_range ul:after{clear:both}.woocommerce-reports-wide .postbox h3.stats_range ul li,.woocommerce-reports-wrap .postbox h3.stats_range ul li{float:left;margin:0;padding:0;line-height:26px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li a{border-right:1px solid #dfdfdf;padding:10px;display:block;text-decoration:none}.woocommerce-reports-wide .postbox h3.stats_range ul li.active,.woocommerce-reports-wrap .postbox h3.stats_range ul li.active{background:#fff;-webkit-box-shadow:0 4px 0 0 #fff;box-shadow:0 4px 0 0 #fff}.woocommerce-reports-wide .postbox h3.stats_range ul li.active a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.active a{color:#777}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:9px 10px;vertical-align:middle}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom div,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom form,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom div,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom form{display:inline;margin:0}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom div input.range_datepicker,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom form input.range_datepicker,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom div input.range_datepicker,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom form input.range_datepicker{padding:0;margin:0 10px 0 0;background:0 0;border:0;color:#777;text-align:center;-webkit-box-shadow:none;box-shadow:none}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding:12px 12px 12px 249px;margin:0!important}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{width:225px;margin-left:-237px;float:left}.woocommerce-reports-wide .postbox .chart-widgets,.woocommerce-reports-wrap .postbox .chart-widgets{margin:0;padding:0}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget{margin:0 0 1em;background:#fafafa;border:1px solid #dfdfdf}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget h4,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget h4{background:#fff;border:1px solid #dfdfdf;border-left-width:0;border-right-width:0;padding:10px;margin:0;color:#2ea2cc;border-top-width:0;background:-webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9)) #fff;background:-webkit-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:-moz-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:-o-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:linear-gradient(to top,#ececec,#f9f9f9) #fff}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget h4.section_title:hover,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget h4.section_title:hover{color:#a00}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title{cursor:pointer}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title span,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title span{display:block}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title span:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title span:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin-left:7px;content:"\e035";float:right;font-size:.9em;line-height:1.618}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title.open,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title.open{color:#333}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title.open span:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title.open span:after{display:none}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section{border-bottom:1px solid #dfdfdf}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section .chosen-container,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section .chosen-container{width:100%!important}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section:last-of-type,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section:last-of-type{border-radius:0 0 3px 3px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table{width:100%}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td{padding:7px 10px;vertical-align:top;border-top:1px solid #e5e5e5;line-height:1.4em}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table tr:first-child td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table tr:first-child td{border-top:0}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.count,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.count{background:#f5f5f5}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.name,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.name{padding-right:0}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.sparkline,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.sparkline{vertical-align:middle}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table .wc_sparkline,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table .wc_sparkline{width:32px;height:1em;display:block;float:right}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table tr.active td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table tr.active td{background:#f5f5f5}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget form,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget p,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget form,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget p{margin:0;padding:10px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget form .submit,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget p .submit,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget form .submit,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget p .submit{margin-top:10px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget #product_ids,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget #product_ids{width:100%}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .select_all,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .select_none,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .select_all,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .select_none{float:right;color:#999;margin-left:4px;margin-top:10px}.woocommerce-reports-wide .postbox .chart-legend,.woocommerce-reports-wrap .postbox .chart-legend{list-style:none;margin:0 0 1em;padding:0;border:1px solid #dfdfdf;border-right-width:0;border-bottom-width:0;background:#fff}.woocommerce-reports-wide .postbox .chart-legend li,.woocommerce-reports-wrap .postbox .chart-legend li{border-right:5px solid #aaa;color:#aaa;padding:1em;display:block;margin:0;-webkit-transition:all ease .5s;box-shadow:inset 0 -1px 0 0 #dfdfdf}.woocommerce-reports-wide .postbox .chart-legend li strong,.woocommerce-reports-wrap .postbox .chart-legend li strong{font-size:1.618em;line-height:1.2em;color:#464646;font-weight:400;display:block;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif}.woocommerce-reports-wide .postbox .chart-legend li:hover,.woocommerce-reports-wrap .postbox .chart-legend li:hover{box-shadow:inset 0 -1px 0 0 #dfdfdf,inset 300px 0 0 rgba(156,93,144,.1);border-right:5px solid #9c5d90!important;padding-left:1.5em;color:#9c5d90}.woocommerce-reports-wide .postbox .pie-chart-legend,.woocommerce-reports-wrap .postbox .pie-chart-legend{margin:12px 0 0;overflow:hidden}.woocommerce-reports-wide .postbox .pie-chart-legend li,.woocommerce-reports-wrap .postbox .pie-chart-legend li{float:left;margin:0;padding:6px 0 0;border-top:4px solid #999;text-align:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:50%}.woocommerce-reports-wide .postbox .stat,.woocommerce-reports-wrap .postbox .stat{font-size:1.5em!important;font-weight:700;text-align:center}.woocommerce-reports-wide .postbox .chart-placeholder,.woocommerce-reports-wrap .postbox .chart-placeholder{width:100%;height:650px;overflow:hidden;position:relative}.woocommerce-reports-wide .postbox .chart-prompt,.woocommerce-reports-wrap .postbox .chart-prompt{line-height:650px;margin:0;color:#999;font-size:1.2em;font-style:italic;text-align:center}.woocommerce-reports-wide .postbox .chart-container,.woocommerce-reports-wrap .postbox .chart-container{background:#fff;padding:12px;position:relative;border:1px solid #dfdfdf;border-radius:3px}.woocommerce-reports-wide .postbox .main .chart-legend,.woocommerce-reports-wrap .postbox .main .chart-legend{margin-top:12px}.woocommerce-reports-wide .postbox .main .chart-legend li,.woocommerce-reports-wrap .postbox .main .chart-legend li{border-right:0;margin:0 8px 0 0;float:left;border-top:4px solid #aaa}.woocommerce-reports-wide .woocommerce-reports-main,.woocommerce-reports-wrap .woocommerce-reports-main{float:left;min-width:100%}.woocommerce-reports-wide .woocommerce-reports-main table td,.woocommerce-reports-wrap .woocommerce-reports-main table td{padding:9px}.woocommerce-reports-wide .woocommerce-reports-sidebar,.woocommerce-reports-wrap .woocommerce-reports-sidebar{display:inline;width:281px;margin-left:-300px;clear:both;float:left}.woocommerce-reports-wide .woocommerce-reports-left,.woocommerce-reports-wrap .woocommerce-reports-left{width:49.5%;float:left}.woocommerce-reports-wide .woocommerce-reports-right,.woocommerce-reports-wrap .woocommerce-reports-right{width:49.5%;float:right}.woocommerce-reports-wide .column-wc_actions a.edit,.woocommerce-reports-wide .column-wc_actions a.view,.woocommerce-reports-wrap .column-wc_actions a.edit,.woocommerce-reports-wrap .column-wc_actions a.view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.woocommerce-reports-wide .column-wc_actions a.edit:after,.woocommerce-reports-wide .column-wc_actions a.view:after,.woocommerce-reports-wrap .column-wc_actions a.edit:after,.woocommerce-reports-wrap .column-wc_actions a.view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.woocommerce-reports-wide .column-wc_actions a.edit:after,.woocommerce-reports-wrap .column-wc_actions a.edit:after{content:"\e01c"}.woocommerce-reports-wide .column-wc_actions a.view:after,.woocommerce-reports-wrap .column-wc_actions a.view:after{content:"\e010"}.woocommerce-wide-reports-wrap{padding-bottom:11px}.woocommerce-wide-reports-wrap .widefat .export-data{float:right}.woocommerce-wide-reports-wrap .widefat td,.woocommerce-wide-reports-wrap .widefat th{vertical-align:middle;padding:7px}form.report_filters div,form.report_filters input,form.report_filters label,form.report_filters p{vertical-align:middle}.chart-tooltip{position:absolute;display:none;line-height:1}table.bar_chart{width:100%}table.bar_chart thead th{text-align:left;color:#ccc;padding:6px 0}table.bar_chart tbody th{padding:6px 0;width:25%;text-align:left!important;font-weight:400!important;border-bottom:1px solid #fee}table.bar_chart tbody td{text-align:right;line-height:24px;padding:6px 6px 6px 0;border-bottom:1px solid #fee}table.bar_chart tbody td span{color:#8a4b75;display:block}table.bar_chart tbody td span.alt{color:#47a03e;margin-top:6px}table.bar_chart tbody td.bars{position:relative;text-align:left;padding:6px 6px 6px 0;border-bottom:1px solid #fee}table.bar_chart tbody td.bars a,table.bar_chart tbody td.bars span{text-decoration:none;clear:both;background:#8a4b75;float:left;display:block;line-height:24px;height:24px;-moz-border-radius:3px;-webkit-border-radius:3px;-o-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}table.bar_chart tbody td.bars span.alt{clear:both;background:#47a03e}table.bar_chart tbody td.bars span.alt span{margin:0;color:#c5dec2!important;text-shadow:0 1px 0 #47a03e;background:0 0}.chosen-container-single .chosen-single{margin-top:1px}.chosen-container-single .chosen-single div b{background:url(../images/chosen-sprite.png) 0 4px no-repeat!important}.chosen-container-active .chosen-single-with-drop div b{background-position:-18px 2px!important}.chosen-container-single .chosen-search input{line-height:13px;width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{width:100%!important}.chosen-container-multi .chosen-choices .search-field input{height:21px!important}.woocommerce_options_panel .chosen-container-multi{width:50%!important;float:left}.woocommerce_options_panel .chosen-container-multi .search-field{min-width:50%}.woocommerce_options_panel .chosen-container-multi .search-field input{min-width:100%}@media only screen and (max-width:1280px){#order_data .order_data_column{width:48%}#order_data .order_data_column:first-child{width:100%}.woocommerce_options_panel .description{display:block;clear:both;margin-left:0}}@media only screen and (max-width:900px){#woocommerce-product-data .wc-tabs-back,#woocommerce-product-data ul.product_data_tabs{width:40px}#woocommerce-coupon-data .wc-metaboxes-wrapper,#woocommerce-coupon-data .woocommerce_options_panel,#woocommerce-product-data .wc-metaboxes-wrapper,#woocommerce-product-data .woocommerce_options_panel{width:98%}#woocommerce-product-data ul.product_data_tabs li a{position:relative;text-indent:-999px;padding:10px}#woocommerce-product-data ul.product_data_tabs li a:before{position:absolute;top:0;right:0;bottom:0;left:0;text-indent:0;text-align:center;line-height:40px;width:40px;height:40px}}@media only screen and (max-width:782px){#wp-excerpt-media-buttons a{font-size:16px;line-height:37px;height:39px;padding:0 20px 0 15px}#wp-excerpt-editor-tools{padding-top:20px;padding-right:15px;overflow:hidden;margin-bottom:-1px}#woocommerce-product-data .checkbox{width:25px}}.woocommerce-checkout .form-row .chosen-container{width:100%!important}.woocommerce-checkout .form-row .chosen-container-single .chosen-single{height:28px;line-height:29px}.woocommerce-checkout .form-row .chosen-container-single .chosen-single div b{background:url(../images/chosen-sprite.png) 0 3px no-repeat!important}.woocommerce-checkout .form-row .chosen-container-active .chosen-single-with-drop div b{background-position:-18px 4px!important}.woocommerce-checkout .form-row .chosen-container-single .chosen-search input{line-height:13px;width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce-checkout .form-row .chosen-container .chosen-drop{width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.woocommerce-checkout .form-row .chosen-container-single .chosen-single div b{background-image:url(../images/chosen-sprite@2x.png)!important;background-position:0 5px!important;background-repeat:no-repeat!important;background-size:52px 37px!important}.woocommerce-checkout .form-row .chosen-container-active .chosen-single-with-drop div b{background-position:-18px 5px!important}}.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:26px;border:1px solid #aaa;border-radius:5px;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:26px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;right:26px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover,.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:url(../images/chosen-sprite.png) 100% -20px no-repeat #fff;background:url(../images/chosen-sprite.png) 100% -20px no-repeat,linear-gradient(#eee 1%,#fff 15%);font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.chosen-container .chosen-results{position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:5px;height:15px;outline:0;border:0!important;background:0 0!important;box-shadow:none;color:#666;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-multi .chosen-choices li.search-field .default{color:#999}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 0 3px 5px;padding:3px 20px 3px 5px;border:1px solid #aaa;border-radius:3px;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#eee),color-stop(80%,#fff));background-image:-webkit-linear-gradient(#eee 20%,#fff 80%);background-image:-moz-linear-gradient(#eee 20%,#fff 80%);background-image:-o-linear-gradient(#eee 20%,#fff 80%);background-image:linear-gradient(#eee 20%,#fff 80%);box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#111!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close,.chosen-disabled .chosen-single{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl .chosen-drop,.chosen-rtl.chosen-container-single-nosearch .chosen-search{left:9999px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:url(../images/chosen-sprite.png) -30px -20px no-repeat #fff;background:url(../images/chosen-sprite.png) -30px -20px no-repeat,linear-gradient(#eee 1%,#fff 15%);direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-rtl .chosen-search input[type=text]{background-image:url(../images/chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}.chosen-container-single .chosen-single abbr{top:8px}.wc-backbone-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:160000}.wc-backbone-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.wc-backbone-modal .wc-backbone-modal-content{position:absolute;top:50%;left:50%;width:500px;background:#fff;margin:-150px 0 0 -250px}.wc-backbone-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.wc-backbone-modal-main{padding-bottom:50px}.wc-backbone-modal-main article,.wc-backbone-modal-main header{display:block;position:relative;padding:4px 16px}.wc-backbone-modal-main header{border-bottom:1px solid #ddd}.wc-backbone-modal-main article{padding:10px 16px}.wc-backbone-modal-main article .pagination{padding:10px 0 0;text-align:center}.wc-backbone-modal-main h1{font-size:22px;font-weight:200;line-height:45px;margin:0}.wc-backbone-modal-main footer{position:absolute;left:0;right:0;bottom:0;height:30px;z-index:100;padding:10px 0;border:0 solid #dfdfdf;border-width:1px 0 0;box-shadow:0 -4px 4px -4px rgba(0,0,0,.1)}.wc-backbone-modal-main footer .inner{padding:0 10px;text-align:right} \ No newline at end of file +.clear{clear:both}.nobr{white-space:nowrap}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format('embedded-opentype'),url(../fonts/WooCommerce.woff) format('woff'),url(../fonts/WooCommerce.ttf) format('truetype'),url(../fonts/WooCommerce.svg#WooCommerce) format('svg');font-weight:400;font-style:normal}.wc_addons_wrap .products{overflow:hidden}.wc_addons_wrap .products li{float:left;margin:0 1em 1em 0!important;padding:0;vertical-align:top;width:300px}.wc_addons_wrap .products li a{text-decoration:none;color:inherit;border:1px solid #ddd;display:block;min-height:220px;overflow:hidden;background:#f5f5f5;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1)}.wc_addons_wrap .products li a img{max-width:258px;max-height:24px;padding:17px 20px;display:block;margin:0;background:#fff;border-right:260px solid #fff}.wc_addons_wrap .products li a .price,.wc_addons_wrap .products li a img.extension-thumb+h3{display:none}.wc_addons_wrap .products li a h3{margin:0!important;padding:20px!important;background:#fff}.wc_addons_wrap .products li a p{padding:20px!important;margin:0!important;border-top:1px solid #f1f1f1}.wc_addons_wrap .products li a:focus,.wc_addons_wrap .products li a:hover{background-color:#fff}.woocommerce-message{position:relative;border-left-color:#cc99c2!important;overflow:hidden}.woocommerce-message a.button-primary,.woocommerce-message button.button-primary{background:#cc99c2;border-color:#b366a4;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none}.woocommerce-message a.button-primary:hover,.woocommerce-message button.button-primary:hover{background:#bb77ae;border-color:#aa559a;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15)}.woocommerce-message a.button-primary:active,.woocommerce-message button.button-primary:active{background:#aa559a;border-color:#aa559a}.woocommerce-message a.docs,.woocommerce-message a.skip{opacity:.5}.woocommerce-message .twitter-share-button{vertical-align:middle}#variable_product_options #message{margin:10px}.wrap.woocommerce div.error,.wrap.woocommerce div.updated{margin-top:10px}mark.amount{background:0 0;color:inherit}.postbox input:invalid,.woocommerce input:invalid{border:1px solid #cc010b;background:#ffebe8}table.wc_status_table tr:nth-child(2n) td,table.wc_status_table tr:nth-child(2n) th{background:#fcfcfc}table.wc_status_table th{font-weight:700}table.wc_status_table td:first-child{width:20%}table.wc_status_table td{padding:6px 9px;font-size:1.1em}table.wc_status_table td mark{background:0 0}table.wc_status_table td mark.yes{color:#7ad03a}table.wc_status_table td mark.no{color:#999}table.wc_status_table td mark.error{color:#a00}table.wc_status_table td ul{margin:0}#debug-report{display:none;margin:10px 0;padding:0;position:relative}#debug-report textarea{font-family:monospace;width:100%;margin:0;height:300px;padding:20px;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;resize:none;font-size:12px;line-height:20px;outline:0}#log-viewer-select{padding:10px 0 8px;line-height:180%}#log-viewer textarea{width:100%}.inline-edit-product.quick-edit-row .inline-edit-col-center,.inline-edit-product.quick-edit-row .inline-edit-col-right{float:right!important}#woocommerce-fields.inline-edit-col{clear:left}#woocommerce-fields.inline-edit-col label.featured,#woocommerce-fields.inline-edit-col label.manage_stock{margin-left:10px}#woocommerce-fields.inline-edit-col .dimensions div{display:block;margin:.2em 0}#woocommerce-fields.inline-edit-col .dimensions div span.title{display:block;float:left;width:5em}#woocommerce-fields.inline-edit-col .dimensions div span.input-text-wrap{display:block;margin-left:5em}#woocommerce-fields.inline-edit-col .text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:99%;float:left;margin:1px 1% 1px 1px}#woocommerce-fields.inline-edit-col .height,#woocommerce-fields.inline-edit-col .length,#woocommerce-fields.inline-edit-col .width{width:32.33%}#woocommerce-fields.inline-edit-col .height{margin-right:0}#woocommerce-fields-bulk.inline-edit-col label{clear:left}#woocommerce-fields-bulk.inline-edit-col .inline-edit-group div.alignright,#woocommerce-fields-bulk.inline-edit-col .inline-edit-group label{clear:none;width:49%;margin:.2em 0}#woocommerce-fields-bulk.inline-edit-col .regular_price,#woocommerce-fields-bulk.inline-edit-col .sale_price,#woocommerce-fields-bulk.inline-edit-col .stock,#woocommerce-fields-bulk.inline-edit-col .weight{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%}#woocommerce-fields-bulk.inline-edit-col .height,#woocommerce-fields-bulk.inline-edit-col .length,#woocommerce-fields-bulk.inline-edit-col .width{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:32%}.column-coupon_code{line-height:2.25em}.column-coupon_code,ul.wc_coupon_list{margin:0;overflow:hidden;zoom:1;clear:both}.column-coupon_code li.code,ul.wc_coupon_list li.code{margin:0 6px 12px 0!important}.column-coupon_code .code a:after,.column-coupon_code .code a:before,.column-coupon_code .code span:after,.column-coupon_code .code span:before,.column-coupon_code .code:after,.column-coupon_code .code:before,ul.wc_coupon_list .code a:after,ul.wc_coupon_list .code a:before,ul.wc_coupon_list .code span:after,ul.wc_coupon_list .code span:before,ul.wc_coupon_list .code:after,ul.wc_coupon_list .code:before{content:"";display:block;position:absolute;width:8px;height:4px;background:#f7f7f7;-webkit-border-radius:2px;-moz-border-radius:2px;-o-border-radius:2px;border-radius:2px;-moz-box-shadow:0 2px 0 0 rgba(255,255,255,.3),inset 0 2px 0 0 rgba(0,0,0,.1);-webkit-box-shadow:0 2px 0 0 rgba(255,255,255,.3),inset 0 2px 0 0 rgba(0,0,0,.1);box-shadow:0 2px 0 0 rgba(255,255,255,.3),inset 0 2px 0 0 rgba(0,0,0,.1)}.column-coupon_code .code,ul.wc_coupon_list .code{overflow:hidden;vertical-align:middle;margin:0 8px 0 0;background:#ececec;color:#21759A;text-shadow:0 1px 0 #ddd;padding:2px;position:relative;float:left;line-height:1em;-moz-box-shadow:0 2px 0 0 #ddd;-webkit-box-shadow:0 2px 0 0 #ddd;box-shadow:0 2px 0 0 #ddd;font-weight:700}.column-coupon_code .code:before,ul.wc_coupon_list .code:before{bottom:5px;left:0;margin:0 0 0 -4px}.column-coupon_code .code:after,ul.wc_coupon_list .code:after{top:5px;left:0;margin:0 0 0 -4px}.column-coupon_code .code a,.column-coupon_code .code span,ul.wc_coupon_list .code a,ul.wc_coupon_list .code span{float:left;padding:0 4px;color:#21759A}.column-coupon_code .code a:before,.column-coupon_code .code span:before,ul.wc_coupon_list .code a:before,ul.wc_coupon_list .code span:before{bottom:5px;right:0;margin:0 -4px 0 0}.column-coupon_code .code a:after,.column-coupon_code .code span:after,ul.wc_coupon_list .code a:after,ul.wc_coupon_list .code span:after{content:"";top:5px;right:0;margin:0 -4px 0 0}.column-coupon_code .code a span,.column-coupon_code .code span span,ul.wc_coupon_list .code a span,ul.wc_coupon_list .code span span{border:1px dashed #ccc;padding:.5em 6px;-webkit-border-radius:2px;-moz-border-radius:2px;-o-border-radius:2px;border-radius:2px}.column-coupon_code .code a span:before,.column-coupon_code .code span span:before,ul.wc_coupon_list .code a span:before,ul.wc_coupon_list .code span span:before{top:50%;left:0;margin:-2px 0 0 -4px}.column-coupon_code .code a span:after,.column-coupon_code .code span span:after,ul.wc_coupon_list .code a span:after,ul.wc_coupon_list .code span span:after{top:50%;right:0;margin:-2px -4px 0 0}.column-coupon_code .code:hover,ul.wc_coupon_list .code:hover{background:#975e83;color:#fff;text-shadow:0 1px 0 #5a324b}.column-coupon_code .code:hover a,.column-coupon_code .code:hover span,ul.wc_coupon_list .code:hover a,ul.wc_coupon_list .code:hover span{color:#fff}.column-coupon_code .code:hover a span,.column-coupon_code .code:hover span span,ul.wc_coupon_list .code:hover a span,ul.wc_coupon_list .code:hover span span{border:1px dashed #bb82a7}ul.wc_coupon_list_block{margin:0;padding-bottom:2px}ul.wc_coupon_list_block li{border-top:1px solid #fff;border-bottom:1px solid #ccc;line-height:2.5em;margin:0;padding:.5em 0}ul.wc_coupon_list_block li:first-child{border-top:0;padding-top:0}ul.wc_coupon_list_block li:last-child{border-bottom:0;padding-bottom:0}.button.wc-reload{text-indent:-9999px;position:relative;padding:0;-webkit-border-radius:100%;border-radius:100%;height:24px;width:24px!important;display:inline-block}.button.wc-reload:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e031";line-height:22px}.tablenav .actions{overflow:visible}.alignleft.actions .chosen-container-single{display:inline-block;vertical-align:middle}#woocommerce-order-data .handlediv,#woocommerce-order-data h3.hndle{display:none}#woocommerce-order-data .inside{display:block!important}#order_data{padding:23px 24px 12px}#order_data h2{margin:0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;font-size:21px;font-weight:400;line-height:1.2;text-shadow:1px 1px 1px #fff;padding:0}#order_data h4{color:#333;margin:1.33em 0 0}#order_data p{color:#777}#order_data p.order_number{margin:0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;font-weight:400;line-height:1.6em;font-size:16px}#order_data .order_data_column_container{clear:both}#order_data .order_data_column{width:32%;padding:0 2% 0 0;float:left}#order_data .order_data_column:last-child{padding-right:0}#order_data .order_data_column p{padding:0!important}#order_data .order_data_column .address strong{display:block}#order_data .order_data_column .form-field{float:left;width:48%;padding:0;margin:9px 0 0}#order_data .order_data_column .form-field label{display:block;padding:0 0 3px}#order_data .order_data_column .form-field input,#order_data .order_data_column .form-field select,#order_data .order_data_column .form-field textarea{width:100%}#order_data .order_data_column .form-field #order_status_chosen .chosen-search{display:none}#order_data .order_data_column .form-field .chosen-container{width:100%!important}#order_data .order_data_column .form-field .date-picker-field{width:50%}#order_data .order_data_column .form-field .hour,#order_data .order_data_column .form-field .minute{width:2.5em}#order_data .order_data_column .form-field small{display:block;margin:5px 0 0;color:#999}#order_data .order_data_column .form-field.last{float:right}#order_data .order_data_column .form-field-wide{width:100%;clear:both}#order_data .order_data_column .form-field-wide input,#order_data .order_data_column .form-field-wide select,#order_data .order_data_column .form-field-wide textarea{width:100%}#order_data .order_data_column p.none_set{color:#999}#order_data .order_data_column ._billing_address_1_field,#order_data .order_data_column ._billing_city_field,#order_data .order_data_column ._billing_country_field,#order_data .order_data_column ._billing_email_field,#order_data .order_data_column ._billing_first_name_field,#order_data .order_data_column ._shipping_address_1_field,#order_data .order_data_column ._shipping_city_field,#order_data .order_data_column ._shipping_country_field,#order_data .order_data_column ._shipping_first_name_field{float:left}#order_data .order_data_column ._billing_address_2_field,#order_data .order_data_column ._billing_last_name_field,#order_data .order_data_column ._billing_phone_field,#order_data .order_data_column ._billing_postcode_field,#order_data .order_data_column ._billing_state_field,#order_data .order_data_column ._shipping_address_2_field,#order_data .order_data_column ._shipping_last_name_field,#order_data .order_data_column ._shipping_postcode_field,#order_data .order_data_column ._shipping_state_field{float:right}#order_data .order_data_column ._billing_company_field,#order_data .order_data_column ._shipping_company_field,#order_data .order_data_column ._transaction_id_field{clear:both;width:100%}#order_data .order_data_column ._billing_email_field{clear:left}#order_data .order_data_column div.edit_address{display:none;zoom:1;padding-right:1px}#order_data a.edit_address{opacity:.4}#order_data a.edit_address:focus,#order_data a.edit_address:hover{opacity:1}.order_actions{margin:0;overflow:hidden;zoom:1}.order_actions li{border-top:1px solid #fff;border-bottom:1px solid #ddd;padding:6px 0;margin:0;line-height:1.6em;float:left;width:50%;text-align:center}.order_actions li a{float:none;text-align:center;text-decoration:underline}.order_actions li.wide{width:auto;float:none;clear:both;padding:6px;text-align:left;overflow:hidden}.order_actions li #delete-action{line-height:25px;vertical-align:middle;text-align:left;float:left}.order_actions li .save_order{float:right}.order_actions li#actions{overflow:hidden}.order_actions li#actions .button{width:24px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:right}.order_actions li#actions select{width:225px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left}#woocommerce-order-items .inside{margin:0;padding:0;background:#fefefe}#woocommerce-order-items .wc-order-data-row{border-bottom:1px solid #DFDFDF;padding:12px;background:#f8f8f8;line-height:2em;text-align:right}#woocommerce-order-items .wc-order-data-row:after,#woocommerce-order-items .wc-order-data-row:before{content:" ";display:table}#woocommerce-order-items .wc-order-data-row:after{clear:both}#woocommerce-order-items .wc-order-data-row p{margin:0;line-height:2em}#woocommerce-order-items .wc-order-bulk-actions{background:#fefefe;vertical-align:top;border-top:0}#woocommerce-order-items .wc-order-bulk-actions select{vertical-align:top}#woocommerce-order-items .wc-order-bulk-actions p.bulk-actions{float:left}#woocommerce-order-items .wc-order-add-item{background:#fff;vertical-align:top;border-top:none}#woocommerce-order-items .wc-order-add-item .add_item_id,#woocommerce-order-items .wc-order-add-item .chosen-container{vertical-align:top}#woocommerce-order-items .wc-order-add-item .add_item_id .search-field input,#woocommerce-order-items .wc-order-add-item .chosen-container .search-field input{min-width:100px}#woocommerce-order-items .wc-order-add-item .chosen-container{width:400px!important;text-align:left}#woocommerce-order-items .wc-order-add-item .calculate-action,#woocommerce-order-items .wc-order-add-item .cancel-action,#woocommerce-order-items .wc-order-add-item .save-action{float:left;margin-right:2px}#woocommerce-order-items .wc-used-coupons{float:left;width:50%}#woocommerce-order-items .wc-order-totals{float:right;width:50%;margin:0;padding:0}#woocommerce-order-items .wc-order-totals .amount{font-weight:700}#woocommerce-order-items .wc-order-totals .label{vertical-align:top}#woocommerce-order-items .wc-order-totals .total{font-size:1em!important;width:10em;margin:0 0 0 .5em;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-order-items .wc-order-totals .total input[type=text]{width:96%;float:right}#woocommerce-order-items .wc-order-totals .refunded-total{color:#a00}#woocommerce-order-items .refund-actions{margin-top:5px;padding-top:12px;border-top:1px solid #DFDFDF}#woocommerce-order-items .refund-actions .button{float:right;margin-left:4px}#woocommerce-order-items .refund-actions .cancel-action{float:left;margin-left:0}#woocommerce-order-items .add_meta{margin-left:0!important}#woocommerce-order-items h3 small{color:#999}#woocommerce-order-items .amount{white-space:nowrap}.woocommerce_order_items_wrapper{margin:0;overflow:auto}.woocommerce_order_items_wrapper table.woocommerce_order_items{width:100%;background:#fff}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th{background:#f8f8f8;padding:8px;font-size:11px;text-align:left}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th:last-child{padding-right:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th:first-child{padding-left:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th,.woocommerce_order_items_wrapper table.woocommerce_order_items td{padding:8px;text-align:left;line-height:26px;vertical-align:top;border-bottom:1px dotted #ececec}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items td textarea{width:100%}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th select,.woocommerce_order_items_wrapper table.woocommerce_order_items td select{width:50%}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th input,.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items td input,.woocommerce_order_items_wrapper table.woocommerce_order_items td textarea{font-size:14px;padding:4px;color:#555}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items td:last-child{padding-right:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th:first-child,.woocommerce_order_items_wrapper table.woocommerce_order_items td:first-child{padding-left:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody tr:last-child td{border-bottom:1px solid #dfdfdf}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody tr:first-child td{border-top:8px solid #f8f8f8}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody#order_line_items tr:first-child td{border-top:none}.woocommerce_order_items_wrapper table.woocommerce_order_items td.check-column{padding:8px 8px 8px 12px;width:1%}.woocommerce_order_items_wrapper table.woocommerce_order_items .item{min-width:200px}.woocommerce_order_items_wrapper table.woocommerce_order_items .center,.woocommerce_order_items_wrapper table.woocommerce_order_items .variation-id{text-align:center}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class{text-align:right}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax label,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity label,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax label,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class label{white-space:nowrap;color:#999;font-size:.833em}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class label input{display:inline}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class input{width:70px;vertical-align:middle;text-align:right}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax select,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity select,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax select,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class select{width:85px;height:26px;vertical-align:middle;font-size:1em}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input{display:block;background:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);margin:1px;width:70px}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input input{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:0;box-shadow:none;margin:0;color:#555;background:0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input input:last-child{color:#bbb;border-top:1px dashed #ddd}.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity{text-align:center}.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity input{text-align:center;width:50px}.woocommerce_order_items_wrapper table.woocommerce_order_items span.subtotal{opacity:.5}.woocommerce_order_items_wrapper table.woocommerce_order_items td.tax_class,.woocommerce_order_items_wrapper table.woocommerce_order_items th.tax_class{text-align:left}.woocommerce_order_items_wrapper table.woocommerce_order_items .calculated{border-color:#ae8ca2;border-style:dotted}.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta{width:100%}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta{margin:.5em 0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr th,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr th{border:0;padding:0 4px .5em 0;line-height:1.5em;width:20%}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td{padding:0 4px .5em 0;border:0;line-height:1.5em}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td input,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td input{width:100%;margin:0;position:relative;border-bottom:0;box-shadow:none}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td textarea{width:100%;height:4em;margin:0;box-shadow:none}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td input:focus+textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td input:focus+textarea{border-top-color:#999}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td p,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td p{margin:0 0 .5em;line-height:1.5em}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td p:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td p:last-child{margin:0}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb{text-align:left;width:27px}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb a{display:block}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb img{padding:1px;margin:0;border:1px solid #dfdfdf;vertical-align:middle;width:21px;height:21px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.fee .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.fee .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e007";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.refund .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.refund .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e014";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.shipping .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.shipping .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e01a";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax{white-space:nowrap}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax{padding:8px 16px 8px 8px}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:12px;visibility:hidden;float:right;margin:2px -16px 0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax:before,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e013";color:#fff;background-color:#000;-webkit-border-radius:100%;border-radius:100%;border:1px solid #000;box-shadow:0 1px 2px rgba(0,0,0,.2)}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax:hover:before,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax:hover:before{border-color:#a00;background-color:#a00}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax:hover .delete-order-tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax:hover .delete-order-tax{visibility:visible}.woocommerce_order_items_wrapper table.woocommerce_order_items small.refunded{display:block;color:#a00;white-space:nowrap}.wc-order-items-editable .edit-order-item{text-indent:-9999px;position:relative;height:1em;width:1em;display:inline-block;margin:0 .5em 0 0}.wc-order-items-editable .edit-order-item:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e001";content:"\e603";color:#999}.wc-order-items-editable .edit-order-item:hover:before{color:#555}.wc-order-items-editable .delete-order-item,.wc-order-items-editable .delete_refund{text-indent:-9999px;position:relative;height:1em;width:1em;display:inline-block;margin:0}.wc-order-items-editable .delete-order-item:before,.wc-order-items-editable .delete_refund:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e001";content:"\e013";color:#999}.wc-order-items-editable .delete-order-item:hover:before,.wc-order-items-editable .delete_refund:hover:before{color:#a00}.wc-order-items-editable .wc-order-edit-line-item-actions{width:2.5em;text-align:right}.wc-order-items-editable .wc-order-totals .wc-order-edit-line-item-actions{width:1.5em}.wc-order-items-editable .wc-order-totals .edit-order-item{margin:0}#woocommerce-order-downloads .buttons{float:left;padding:0;margin:0;vertical-align:top}#woocommerce-order-downloads .buttons .add_item_id,#woocommerce-order-downloads .buttons .chosen-container{width:400px!important;margin-right:9px;vertical-align:top;float:left}#woocommerce-order-downloads .buttons button{margin:2px 0 0}#woocommerce-order-downloads h3 small{color:#999}#poststuff #woocommerce-order-actions .inside{margin:0;padding:0}#poststuff #woocommerce-order-actions .inside ul.order_actions li{padding:6px 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#poststuff #woocommerce-order-actions .inside ul.order_actions li:last-child{border-bottom:0}#poststuff #woocommerce-order-notes .inside{margin:0;padding:0}#poststuff #woocommerce-order-notes .inside ul.order_notes li{padding:0 10px}#woocommerce_customers p.search-box{margin:6px 0 4px;float:left}#woocommerce_customers .tablenav{float:right;clear:none}.widefat.customers td{vertical-align:middle;padding:4px 7px}.widefat .column-order_title{width:15%}.widefat .column-order_title time{display:block;color:#999;margin:3px 0}.widefat .column-orders,.widefat .column-paying,.widefat .column-spent{text-align:center;width:8%}.widefat .column-last_order{width:11%}.widefat .column-order_actions,.widefat .column-user_actions,.widefat .column-wc_actions{width:110px}.widefat .column-order_actions a.button,.widefat .column-user_actions a.button,.widefat .column-wc_actions a.button{float:left;margin:0 4px 2px 0;cursor:pointer;padding:3px 4px;height:auto}.widefat .column-order_actions a.button img,.widefat .column-user_actions a.button img,.widefat .column-wc_actions a.button img{display:block;width:12px;height:auto}.widefat small.meta{display:block;color:#999;font-size:inherit;margin:3px 0}.widefat .column-order_date,.widefat .column-order_total{width:9%}.widefat .column-order_status{width:45px;text-align:center}.widefat .column-order_status mark{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;background:0 0;font-size:1.4em;margin:0 auto}.widefat .column-order_status mark.cancelled:after,.widefat .column-order_status mark.completed:after,.widefat .column-order_status mark.failed:after,.widefat .column-order_status mark.on-hold:after,.widefat .column-order_status mark.pending:after,.widefat .column-order_status mark.processing:after,.widefat .column-order_status mark.refunded:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}.widefat .column-order_status mark.pending:after{content:"\e012";color:#ffba00}.widefat .column-order_status mark.completed:after{content:"\e015";color:#2ea2cc}.widefat .column-order_status mark.on-hold:after{content:"\e033";color:#999}.widefat .column-order_status mark.failed:after{content:"\e016";color:#d0c21f}.widefat .column-order_status mark.cancelled:after{content:"\e013";color:#a00}.widefat .column-order_status mark.processing:after{content:"\e011";color:#73a724}.widefat .column-order_status mark.refunded:after{content:"\e014";color:#999}.widefat td.column-order_status{padding-top:9px}.column-customer_message .note-on{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto;color:#999}.column-customer_message .note-on:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e026";line-height:16px}.column-order_notes .note-on{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto;color:#999}.column-order_notes .note-on:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e027";line-height:16px}.order_actions .complete,.order_actions .processing,.order_actions .view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.order_actions .complete:after,.order_actions .processing:after,.order_actions .view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.order_actions .processing:after{content:"\e00f"}.order_actions .complete:after{content:"\e017"}.order_actions .view:after{content:"\e010"}.user_actions .edit,.user_actions .link,.user_actions .view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.user_actions .edit:after,.user_actions .link:after,.user_actions .view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.user_actions .edit:after{content:"\e603"}.user_actions .link:after{content:"\e00d"}.user_actions .view:after{content:"\e010"}.attributes-table td,.attributes-table th{width:15%;vertical-align:top}.attributes-table .attribute-terms{width:32%}.attributes-table .attribute-actions{width:2em}.attributes-table .attribute-actions .configure-terms{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.attributes-table .attribute-actions .configure-terms:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e01c";line-height:1.85}ul.order_notes{padding:2px 0 0}ul.order_notes li .note_content{padding:10px;background:#efefef;position:relative}ul.order_notes li .note_content p{margin:0;padding:0;word-wrap:break-word}ul.order_notes li p.meta{padding:10px;color:#999;margin:0;font-size:11px}ul.order_notes li p.meta .exact-date{border-bottom:1px dotted #999}ul.order_notes li a.delete_note{color:#a00}ul.order_notes li .note_content:after{content:"";display:block;position:absolute;bottom:-10px;left:20px;width:0;height:0;border-width:10px 10px 0 0;border-style:solid;border-color:#efefef transparent}ul.order_notes li.customer-note .note_content{background:#d7cad2}ul.order_notes li.customer-note .note_content:after{border-color:#d7cad2 transparent}.add_note{border-top:1px solid #ddd;padding:10px 10px 0}.add_note h4{margin-top:5px!important}.add_note #add_order_note{width:100%;height:50px}table.wp-list-table .column-thumb{width:52px;text-align:center;white-space:nowrap}table.wp-list-table .column-name{width:22%}table.wp-list-table .column-product_cat,table.wp-list-table .column-product_tag{width:11%!important}table.wp-list-table .column-featured,table.wp-list-table .column-product_type{width:46px;text-align:left!important}table.wp-list-table .column-customer_message,table.wp-list-table .column-order_notes{width:46px;text-align:center}table.wp-list-table .column-customer_message img,table.wp-list-table .column-order_notes img{margin:0 auto;padding-top:0!important}table.wp-list-table .manage-column.column-featured img,table.wp-list-table .manage-column.column-product_type img{padding-left:2px}table.wp-list-table .column-price .woocommerce-price-suffix{display:none}table.wp-list-table img{margin:1px 2px}table.wp-list-table .row-actions{color:#999}table.wp-list-table td.column-thumb img{margin:0;vertical-align:middle;width:auto;height:auto;max-width:40px;max-height:40px}table.wp-list-table span.na{color:#999}table.wp-list-table .column-is_in_stock{text-align:left!important}table.wp-list-table span.wc-featured,table.wp-list-table span.wc-image,table.wp-list-table span.wc-type{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto}table.wp-list-table span.wc-featured:before,table.wp-list-table span.wc-image:before,table.wp-list-table span.wc-type:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e00c"}table.wp-list-table span.wc-featured{margin:0;cursor:pointer}table.wp-list-table span.wc-featured:before{content:"\e020"}table.wp-list-table span.wc-featured.not-featured:before{content:"\e021"}table.wp-list-table td.column-featured span.wc-featured{font-size:1.2em}table.wp-list-table span.wc-type{margin:0}table.wp-list-table span.wc-type:before{content:"\e01d"}table.wp-list-table span.product-type{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.2em}table.wp-list-table span.product-type:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e006"}table.wp-list-table span.product-type.grouped:before{content:"\e002"}table.wp-list-table span.product-type.external:before{content:"\e034"}table.wp-list-table span.product-type.variable:before{content:"\e003"}table.wp-list-table span.product-type.downloadable:before{content:"\e001"}table.wp-list-table span.product-type.virtual:before{content:"\e000"}table.wp-list-table mark.instock{font-weight:700;color:#7ad03a;background:0 0;line-height:1}table.wp-list-table mark.outofstock{font-weight:700;color:#a44;background:0 0;line-height:1}table.wp-list-table .notes_head,table.wp-list-table .order-notes_head,table.wp-list-table .status_head{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto}table.wp-list-table .notes_head:after,table.wp-list-table .order-notes_head:after,table.wp-list-table .status_head:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}table.wp-list-table .order-notes_head:after{content:"\e028"}table.wp-list-table .notes_head:after{content:"\e026"}table.wp-list-table .status_head:after{content:"\e011"}table.wp-list-table .column-order_items{width:12%}table.wp-list-table .column-order_items table.order_items{width:100%;margin:3px 0 0;padding:0;display:none}table.wp-list-table .column-order_items table.order_items td{border:0;margin:0;padding:0 0 3px}table.wp-list-table .column-order_items table.order_items td.qty{color:#999;padding-right:6px;text-align:left}mark.notice{background:#fff;color:#a00;margin:0 0 0 10px}a.export_rates,a.import_rates{float:right;margin-left:9px;margin-top:-2px;margin-bottom:0}table.wc_input_table,table.wc_tax_rates{width:100%}table.wc_input_table span.tips,table.wc_tax_rates span.tips{color:#2ea2cc}table.wc_input_table td,table.wc_tax_rates td{padding:0;border-right:1px solid #DFDFDF;border-bottom:1px solid #DFDFDF;border-top:0;background:#fff}table.wc_input_table td input[type=number],table.wc_input_table td input[type=text],table.wc_tax_rates td input[type=number],table.wc_tax_rates td input[type=text]{width:100%;padding:5px 7px;margin:0;border:0;background:0 0}table.wc_input_table td.apply_to_shipping,table.wc_input_table td.compound,table.wc_tax_rates td.apply_to_shipping,table.wc_tax_rates td.compound{padding:5px 7px;vertical-align:middle}table.wc_input_table td.apply_to_shipping input,table.wc_input_table td.compound input,table.wc_tax_rates td.apply_to_shipping input,table.wc_tax_rates td.compound input{width:auto;padding:0}table.wc_input_table td:last-child,table.wc_tax_rates td:last-child{border-right:0}table.wc_input_table tr.current td,table.wc_tax_rates tr.current td{background-color:#fefbcc}table.wc_input_table .cost,table.wc_input_table .cost input,table.wc_input_table .item_cost,table.wc_input_table .item_cost input,table.wc_tax_rates .cost,table.wc_tax_rates .cost input,table.wc_tax_rates .item_cost,table.wc_tax_rates .item_cost input{text-align:right}table.wc_input_table th.sort,table.wc_tax_rates th.sort{width:17px;padding:0}table.wc_input_table td.sort,table.wc_tax_rates td.sort{padding:0 4px;cursor:move;background:#f9f9f9;text-align:center;vertical-align:middle}table.wc_input_table td.sort:before,table.wc_tax_rates td.sort:before{content:"\e032";font-family:WooCommerce;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%}table.wc_input_table td.sort:hover:before,table.wc_tax_rates td.sort:hover:before{color:#333}table.wc_input_table .button,table.wc_tax_rates .button{float:left;margin-right:5px}table.wc_input_table .export,table.wc_input_table .import,table.wc_tax_rates .export,table.wc_tax_rates .import{float:right;margin-right:0;margin-left:5px}table.wc_input_table span.tips,table.wc_tax_rates span.tips{padding:0 3px}table.wc_input_table .pagination,table.wc_tax_rates .pagination{float:right}table.wc_input_table .pagination .button,table.wc_tax_rates .pagination .button{margin-left:5px;margin-right:0}table.wc_input_table .pagination .current,table.wc_tax_rates .pagination .current{background:#bbb;text-shadow:none}table.wc_input_table tfoot th,table.wc_tax_rates tfoot th{padding-left:20px;padding-right:20px}table.wc_input_table tr:last-child td,table.wc_tax_rates tr:last-child td{border-bottom:0}table.wc_gateways,table.wc_shipping{position:relative}table.wc_gateways td,table.wc_shipping td{vertical-align:middle;cursor:move;padding:7px}table.wc_gateways th,table.wc_shipping th{padding:9px 7px!important;vertical-align:middle}table.wc_gateways td.name,table.wc_shipping td.name{font-weight:700}table.wc_gateways .settings,table.wc_shipping .settings{text-align:right}table.wc_gateways .default,table.wc_gateways .radio,table.wc_gateways .status,table.wc_shipping .default,table.wc_shipping .radio,table.wc_shipping .status{text-align:center}table.wc_gateways .default .tips,table.wc_gateways .radio .tips,table.wc_gateways .status .tips,table.wc_shipping .default .tips,table.wc_shipping .radio .tips,table.wc_shipping .status .tips{margin:0 auto}table.wc_gateways .default input,table.wc_gateways .radio input,table.wc_gateways .status input,table.wc_shipping .default input,table.wc_shipping .radio input,table.wc_shipping .status input{margin:0}img.help_tip{vertical-align:middle;margin:0 0 0 9px}.postbox img.help_tip{margin-top:-4px}.status-disabled,.status-enabled{font-size:1.4em;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}.status-enabled:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e015";color:#ad74a2}.woocommerce #template div{margin:0}.woocommerce #template div p .button{float:right;margin-left:10px;margin-top:-4px}.woocommerce #template div .editor textarea{margin-bottom:8px}.woocommerce textarea[disabled=disabled]{background:#DFDFDF!important}.woocommerce table.form-table,.woocommerce table.form-table .forminp-radio ul{margin:0}.woocommerce table.form-table .forminp-radio ul li{line-height:1.4em}.woocommerce table.form-table textarea.input-text{height:100%;min-width:150px;display:block}.woocommerce table.form-table input.regular-input{width:25em}.woocommerce table.form-table textarea.wide-input{width:100%}.woocommerce table.form-table img.help_tip{padding:0;margin:-4px 0 0 5px;vertical-align:middle;cursor:help;line-height:1}.woocommerce table.form-table span.help_tip{cursor:help;color:#2ea2cc}.woocommerce table.form-table th{position:relative;padding-right:24px}.woocommerce table.form-table .chosen-container{vertical-align:top;margin-bottom:3px}.woocommerce table.form-table table.widefat th{padding-right:inherit}.woocommerce table.form-table th img.help_tip{margin:0 -24px 0 0;float:right}.woocommerce table.form-table fieldset{margin-top:4px}.woocommerce table.form-table fieldset img.help_tip{margin:-3px 0 0 5px}.woocommerce table.form-table fieldset p.description{margin-bottom:8px}.woocommerce table.form-table fieldset:first-child{margin-top:0}.woocommerce table.form-table .color_box{border:1px solid #ccc;box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.2);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding:4px 6px;float:left;width:90px;margin:0 10px 0 0}.woocommerce table.form-table .color_box strong{text-align:left;display:block;padding:0 0 2px;font-size:.92em}.woocommerce table.form-table .color_box strong img{float:right;margin:1px 0 0}.woocommerce table.form-table .color_box input.colorpick{width:100%;margin:0;font-family:monospace;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce table.form-table .color_box .iris-picker{margin:15px 0 0 -7px}.woocommerce table.form-table .color_box_clear{display:block;clear:both;padding-bottom:10px}.woocommerce table.form-table .iris-picker{z-index:100;position:absolute;display:none;border:1px solid #ccc;box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.2);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.woocommerce table.form-table .iris-picker .ui-slider{border:0!important;background:none!important;margin:0!important;width:auto!important;height:auto!important}.woocommerce table.form-table .iris-picker .ui-slider .ui-slider-handle{margin-bottom:0!important}.woocommerce table.form-table .image_width_settings{vertical-align:middle}.woocommerce table.form-table .image_width_settings label{margin-left:10px}.woocommerce #tabs-wrap table a.remove{margin-left:4px}.woocommerce #tabs-wrap table p{margin:0 0 4px!important;overflow:hidden;zoom:1}.woocommerce #tabs-wrap table p a.add{float:left}#wp-excerpt-editor-container{background:#fff}#product_variation-parent #parent_id{width:100%}#postimagediv img{border:1px solid #d5d5d5;max-width:100%}#woocommerce-product-images .inside{margin:0;padding:0}#woocommerce-product-images .inside .add_product_images{padding:0 12px 12px}#woocommerce-product-images .inside #product_images_container{padding:0 0 0 9px}#woocommerce-product-images .inside #product_images_container ul{margin:0;padding:0}#woocommerce-product-images .inside #product_images_container ul:after,#woocommerce-product-images .inside #product_images_container ul:before{content:" ";display:table}#woocommerce-product-images .inside #product_images_container ul:after{clear:both}#woocommerce-product-images .inside #product_images_container ul li.add,#woocommerce-product-images .inside #product_images_container ul li.image,#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder{width:80px;float:left;cursor:move;border:1px solid #d5d5d5;margin:9px 9px 0 0;background:#f7f7f7;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-product-images .inside #product_images_container ul li.add img,#woocommerce-product-images .inside #product_images_container ul li.image img,#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder img{width:100%;height:auto;display:block}#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder{border:3px dashed #ddd;position:relative}#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e00c";font-size:2.618em;line-height:72px;color:#ddd}#woocommerce-product-images .inside #product_images_container ul ul.actions{position:absolute;top:-8px;right:-8px;padding:2px;display:none}#woocommerce-product-images .inside #product_images_container ul ul.actions li{float:right;margin:0 0 0 2px}#woocommerce-product-images .inside #product_images_container ul ul.actions li a{width:1em;margin:0;height:0;display:block;overflow:hidden}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.tips{cursor:pointer}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.view{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.4em}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.view:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e00c";background-color:#000;color:#fff}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.4em}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e013";color:#fff;background-color:#000;-webkit-border-radius:100%;border-radius:100%;box-shadow:0 1px 2px rgba(0,0,0,.2)}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete:hover:before{background-color:#a00}#woocommerce-product-images .inside #product_images_container ul li:hover ul.actions{display:block}#woocommerce-product-data h3.hndle{padding:10px}#woocommerce-product-data h3.hndle span{display:block;vertical-align:middle;line-height:24px}#woocommerce-product-data h3.hndle span span{display:inline;line-height:inherit;vertical-align:baseline}#woocommerce-product-data h3.hndle label{padding-right:1em;font-size:12px;vertical-align:baseline}#woocommerce-product-data h3.hndle label:first-child{margin-right:1em;border-right:1px solid #dfdfdf}#woocommerce-product-data h3.hndle input,#woocommerce-product-data h3.hndle select{margin:-3px 0 0 .5em;vertical-align:middle}#woocommerce-product-data>.handlediv{margin-top:4px}#woocommerce-product-data .wrap{margin:0}#woocommerce-coupon-description{padding:3px 8px;font-size:1.7em;line-height:1.42em;height:auto;width:100%;outline:0;margin:10px 0;display:block}#woocommerce-coupon-description::-webkit-input-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description::-moz-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description:-ms-input-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description:-moz-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-data .panel-wrap,#woocommerce-product-data .panel-wrap{background:#fff;padding-left:153px}#woocommerce-coupon-data .wc-metaboxes-wrapper,#woocommerce-coupon-data .woocommerce_options_panel,#woocommerce-product-data .wc-metaboxes-wrapper,#woocommerce-product-data .woocommerce_options_panel{float:right;width:100%}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-metaboxes,#woocommerce-coupon-data .wc-metaboxes-wrapper p.toolbar,#woocommerce-coupon-data .woocommerce_options_panel .wc-metaboxes,#woocommerce-coupon-data .woocommerce_options_panel p.toolbar,#woocommerce-product-data .wc-metaboxes-wrapper .wc-metaboxes,#woocommerce-product-data .wc-metaboxes-wrapper p.toolbar,#woocommerce-product-data .woocommerce_options_panel .wc-metaboxes,#woocommerce-product-data .woocommerce_options_panel p.toolbar{padding-left:12px!important;padding-right:20px!important}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios,#woocommerce-product-data .woocommerce_options_panel .wc-radios{display:block;float:left;margin:0}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios li,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios li,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios li,#woocommerce-product-data .woocommerce_options_panel .wc-radios li{display:block;padding:0 0 10px}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios li input,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios li input,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios li input,#woocommerce-product-data .woocommerce_options_panel .wc-radios li input{width:auto}#woocommerce-coupon-data .wc-tabs-back,#woocommerce-product-data .wc-tabs-back{position:absolute;top:0;left:0;bottom:0;background:#f5f5f5;width:145px;border-right:1px solid #DFDFDF}#woocommerce-coupon-data ul.wc-tabs,#woocommerce-product-data ul.wc-tabs,.woocommerce ul.wc-tabs{background:#f5f5f5;line-height:1em;float:left;width:145px;margin:0 0 0 -153px;position:relative;padding:0 0 10px}#woocommerce-coupon-data ul.wc-tabs li,#woocommerce-product-data ul.wc-tabs li,.woocommerce ul.wc-tabs li{display:block;padding:0;margin:0}#woocommerce-coupon-data ul.wc-tabs li a,#woocommerce-product-data ul.wc-tabs li a,.woocommerce ul.wc-tabs li a{padding:10px;line-height:18px!important;margin:0;display:block;background:#f5f5f5;text-decoration:none;border-bottom:1px solid #f5f5f5;border-top:1px solid #eaeaea}#woocommerce-coupon-data ul.wc-tabs li a:before,#woocommerce-product-data ul.wc-tabs li a:before,.woocommerce ul.wc-tabs li a:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:7px;content:"\e028"}#woocommerce-coupon-data ul.wc-tabs li:first-child a,#woocommerce-product-data ul.wc-tabs li:first-child a,.woocommerce ul.wc-tabs li:first-child a{border-top:0!important}#woocommerce-coupon-data ul.wc-tabs li.general_options a:before,#woocommerce-product-data ul.wc-tabs li.general_options a:before,.woocommerce ul.wc-tabs li.general_options a:before{content:"\e006"}#woocommerce-coupon-data ul.wc-tabs li.inventory_options a:before,#woocommerce-product-data ul.wc-tabs li.inventory_options a:before,.woocommerce ul.wc-tabs li.inventory_options a:before{content:"\e02c"}#woocommerce-coupon-data ul.wc-tabs li.shipping_options a:before,#woocommerce-product-data ul.wc-tabs li.shipping_options a:before,.woocommerce ul.wc-tabs li.shipping_options a:before{content:"\e01a"}#woocommerce-coupon-data ul.wc-tabs li.linked_product_options a:before,#woocommerce-product-data ul.wc-tabs li.linked_product_options a:before,.woocommerce ul.wc-tabs li.linked_product_options a:before{content:"\e00d"}#woocommerce-coupon-data ul.wc-tabs li.attribute_options a:before,#woocommerce-product-data ul.wc-tabs li.attribute_options a:before,.woocommerce ul.wc-tabs li.attribute_options a:before{content:"\e02b"}#woocommerce-coupon-data ul.wc-tabs li.advanced_options a:before,#woocommerce-product-data ul.wc-tabs li.advanced_options a:before,.woocommerce ul.wc-tabs li.advanced_options a:before{content:"\e01c"}#woocommerce-coupon-data ul.wc-tabs li.variation_options a:before,#woocommerce-product-data ul.wc-tabs li.variation_options a:before,.woocommerce ul.wc-tabs li.variation_options a:before{content:"\e003"}#woocommerce-coupon-data ul.wc-tabs li.usage_restriction_options a:before,#woocommerce-product-data ul.wc-tabs li.usage_restriction_options a:before,.woocommerce ul.wc-tabs li.usage_restriction_options a:before{content:"\e602"}#woocommerce-coupon-data ul.wc-tabs li.usage_limit_options a:before,#woocommerce-product-data ul.wc-tabs li.usage_limit_options a:before,.woocommerce ul.wc-tabs li.usage_limit_options a:before{content:"\e601"}#woocommerce-coupon-data ul.wc-tabs li.general_coupon_data a:before,#woocommerce-product-data ul.wc-tabs li.general_coupon_data a:before,.woocommerce ul.wc-tabs li.general_coupon_data a:before{content:"\e600"}#woocommerce-coupon-data ul.wc-tabs li.active a,#woocommerce-product-data ul.wc-tabs li.active a,.woocommerce ul.wc-tabs li.active a{border-color:#DFDFDF;position:relative;background-color:#fff;color:#555;margin:0 -1px 0 0}.woocommerce_page_wc-settings .shippingrows th.check-column{padding-top:20px}.woocommerce_page_wc-settings .shippingrows tfoot th{padding-left:10px}.woocommerce_page_wc-settings .shippingrows .add.button:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:7px;content:"\e007"}@media only screen and (max-width:900px){#woocommerce-coupon-data .panel-wrap,#woocommerce-product-data .panel-wrap{padding-left:35px}#woocommerce-coupon-data .wc-tabs-back,#woocommerce-product-data .wc-tabs-back{position:absolute;top:0;left:0;bottom:0;width:28px;border-right:1px solid #DFDFDF}#woocommerce-product-data ul.product_data_tabs,.woocommerce ul.wc-tabs{width:28px;margin-left:-35px}#woocommerce-product-data ul.product_data_tabs li a,.woocommerce ul.wc-tabs li a{overflow:hidden;white-space:nowrap}}#woocommerce-coupon-data .inside,#woocommerce-order-data .inside,#woocommerce-order-downloads .inside,#woocommerce-product-data .inside,#woocommerce-product-type-options .inside{padding:0;margin:0}.panel,.woocommerce_options_panel{padding:9px;color:#555}.panel,.woocommerce_page_settings .woocommerce_options_panel{padding:0}#woocommerce-product-specs .inside,#woocommerce-product-type-options .panel{padding:9px;margin:0}#woocommerce-product-type-options .panel p,.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p{margin:0 0 9px;font-size:12px;padding:5px 9px;line-height:24px}#woocommerce-product-type-options .panel p:after,.woocommerce_options_panel fieldset.form-field:after,.woocommerce_options_panel p:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce_options_panel .checkbox,table.woocommerce_variable_attributes .checkbox{width:auto;vertical-align:middle;margin:7px 0}.woocommerce_options_panel .downloadable_files table,.woocommerce_variations .downloadable_files table{width:100%;padding:0!important}.woocommerce_options_panel .downloadable_files table th,.woocommerce_variations .downloadable_files table th{padding:7px 0 7px 7px}.woocommerce_options_panel .downloadable_files table td,.woocommerce_variations .downloadable_files table td{vertical-align:middle!important;padding:4px 0 4px 7px;position:relative}.woocommerce_options_panel .downloadable_files table td:last-child,.woocommerce_variations .downloadable_files table td:last-child{padding-right:7px}.woocommerce_options_panel .downloadable_files table td input.input_text,.woocommerce_variations .downloadable_files table td input.input_text{width:100%;float:none;margin:1px 0}.woocommerce_options_panel .downloadable_files table td .upload_file_button,.woocommerce_variations .downloadable_files table td .upload_file_button{float:right;width:auto;cursor:pointer}.woocommerce_options_panel .downloadable_files table td .delete,.woocommerce_variations .downloadable_files table td .delete{display:block;text-indent:-9999px;position:relative;height:1em;width:1em}.woocommerce_options_panel .downloadable_files table td .delete:before,.woocommerce_variations .downloadable_files table td .delete:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"\e001";content:"\e013";color:#999}.woocommerce_options_panel .downloadable_files table td .delete:hover:before,.woocommerce_variations .downloadable_files table td .delete:hover:before{color:#a00}.woocommerce_options_panel .downloadable_files table th.sort,.woocommerce_variations .downloadable_files table th.sort{width:17px;padding:0}.woocommerce_options_panel .downloadable_files table td.sort,.woocommerce_variations .downloadable_files table td.sort{padding:0 8px;cursor:move;background:#f9f9f9;text-align:center;vertical-align:middle}.woocommerce_options_panel .downloadable_files table td.sort:before,.woocommerce_variations .downloadable_files table td.sort:before{content:"\e032";font-family:WooCommerce;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%}.woocommerce_options_panel .downloadable_files table td.sort:hover:before,.woocommerce_variations .downloadable_files table td.sort:hover:before{color:#333}.woocommerce_options_panel .downloadable_files{padding:0 9px 0 162px;position:relative;margin:9px 0}.woocommerce_options_panel .downloadable_files label{position:absolute;left:0;margin:0 0 0 12px;line-height:24px}.woocommerce_options_panel p{margin:9px 0}.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p.form-field{padding:5px 20px 5px 162px!important}.woocommerce_options_panel label,.woocommerce_options_panel legend{float:left;width:150px;padding:0;margin:0 0 0 -150px}.woocommerce_options_panel label .req,.woocommerce_options_panel legend .req{font-weight:700;font-style:normal;color:#a00}.woocommerce_options_panel .description{padding:0;margin:0 0 0 7px}.woocommerce_options_panel .description-block{margin-left:0;display:block}.woocommerce_options_panel input,.woocommerce_options_panel select,.woocommerce_options_panel textarea{margin:0}.woocommerce_options_panel textarea{vertical-align:top;height:3.5em;line-height:1.5em}.woocommerce_options_panel input[type=email],.woocommerce_options_panel input[type=number],.woocommerce_options_panel input[type=text]{width:50%;float:left}.woocommerce_options_panel input.button{width:auto;margin-left:8px}.woocommerce_options_panel select{float:left}.woocommerce_options_panel .short,.woocommerce_options_panel input[type=email].short,.woocommerce_options_panel input[type=number].short,.woocommerce_options_panel input[type=text].short{width:25%}.woocommerce_options_panel .sized{width:auto!important;margin-right:6px}.woocommerce_options_panel .options_group{border-top:1px solid #fff;border-bottom:1px solid #DFDFDF}.woocommerce_options_panel .options_group:first-child{border-top:0}.woocommerce_options_panel .options_group:last-child{border-bottom:0}.woocommerce_options_panel .options_group fieldset{margin:9px 0;font-size:12px;padding:5px 9px;line-height:24px}.woocommerce_options_panel .options_group fieldset label{width:auto;float:none}.woocommerce_options_panel .options_group fieldset ul{float:left;width:50%;margin:0;padding:0}.woocommerce_options_panel .options_group fieldset ul li{margin:0;width:auto}.woocommerce_options_panel .options_group fieldset ul li input{width:auto;float:none;margin-right:4px}.woocommerce_options_panel .options_group fieldset ul.wc-radios label{margin-left:0}.woocommerce_options_panel .dimensions_field .wrap input{margin-right:.2%;width:8.2%}.woocommerce_options_panel .dimensions_field .wrap .last{margin-right:0}#woocommerce-product-data input.dp-applied{float:left}#grouped_product_options,#simple_product_options,#virtual_product_options{padding:12px;font-style:italic;color:#666}.wc-metaboxes-wrapper .toolbar{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #DFDFDF;padding:9px 12px!important}.wc-metaboxes-wrapper .toolbar:first-child{border-top:0}.wc-metaboxes-wrapper .toolbar:last-child{border-bottom:0}.wc-metaboxes-wrapper .toolbar .add_variation,.wc-metaboxes-wrapper .toolbar .link_all_variations{float:right;margin-left:5px}.wc-metaboxes-wrapper p.toolbar{overflow:hidden;zoom:1}.wc-metaboxes-wrapper .fr,.wc-metaboxes-wrapper button.add_attribute,.wc-metaboxes-wrapper button.add_variable_attribute,.wc-metaboxes-wrapper select.attribute_taxonomy{float:right;margin:0 0 0 6px}.wc-metaboxes-wrapper .wc-metaboxes{border-bottom:1px solid #DFDFDF;padding:0 12px}.wc-metaboxes-wrapper .wc-metabox-sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;margin-bottom:9px;border-width:1px;border-style:dashed}.wc-metaboxes-wrapper .wc-metabox{background:#fff;border:1px solid #dfdfdf;margin:9px 0!important;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px}.wc-metaboxes-wrapper .wc-metabox .handlediv:before{line-height:.5!important}.wc-metaboxes-wrapper .wc-metabox.closed{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.wc-metaboxes-wrapper .wc-metabox.closed .handlediv:before{content:"\f140"!important}.wc-metaboxes-wrapper .wc-metabox.closed h3{border:0}.wc-metaboxes-wrapper .wc-metabox h3{margin:0!important;padding:6px!important;font-size:1em!important;overflow:hidden;zoom:1;cursor:move}.wc-metaboxes-wrapper .wc-metabox h3 button{float:right}.wc-metaboxes-wrapper .wc-metabox h3 strong{font-weight:400;line-height:24px}.wc-metaboxes-wrapper .wc-metabox h3 select{font-family:sans-serif}.wc-metaboxes-wrapper .wc-metabox h3 .handlediv{background-position:6px 5px!important;display:none;height:24px}.wc-metaboxes-wrapper .wc-metabox h3.fixed{cursor:pointer!important}.wc-metaboxes-wrapper .wc-metabox h3:hover .handlediv{display:block}.wc-metaboxes-wrapper .wc-metabox table{width:100%;position:relative;background:#fff;padding:3px}.wc-metaboxes-wrapper .wc-metabox table td{text-align:left;padding:6px;vertical-align:top;border:0}.wc-metaboxes-wrapper .wc-metabox table td label{text-align:left;display:block;line-height:21px}.wc-metaboxes-wrapper .wc-metabox table td input{float:left;min-width:200px}.wc-metaboxes-wrapper .wc-metabox table td input,.wc-metaboxes-wrapper .wc-metabox table td textarea{width:100%;margin:0;display:block;font-size:14px;padding:4px;color:#555}.wc-metaboxes-wrapper .wc-metabox table td .chosen-container,.wc-metaboxes-wrapper .wc-metabox table td select{width:100%!important}.wc-metaboxes-wrapper .wc-metabox table td input.short{width:200px}.wc-metaboxes-wrapper .wc-metabox table td input.checkbox{width:16px;min-width:inherit;vertical-align:text-bottom;display:inline-block;float:none}.wc-metaboxes-wrapper .wc-metabox table td.attribute_name{width:200px}.wc-metaboxes-wrapper .wc-metabox table .minus,.wc-metaboxes-wrapper .wc-metabox table .plus{margin-top:6px}.wc-metaboxes-wrapper .wc-metabox table .fl{float:left}.wc-metaboxes-wrapper .wc-metabox table .fr{float:right}.wc-metaboxes-wrapper .close_all,.wc-metaboxes-wrapper .expand_all{float:right;margin-left:14px;line-height:22px;text-decoration:none}.wc-metaboxes-wrapper .close_all:before,.wc-metaboxes-wrapper .expand_all:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:7px;content:"\e036";font-size:.8em;color:#999}.wc-metaboxes-wrapper .expand_all:before{content:"\e035"}#variable_product_options .woocommerce_variation table{background:#fafafa;border-top:1px solid #eee;padding:6px}#variable_product_options .woocommerce_variation table td input{min-width:inherit!important}#variable_product_options .woocommerce_variation table td.dimensions_field input{width:32%;margin-right:2%}#variable_product_options .woocommerce_variation table td.dimensions_field .last{margin-right:0}#variable_product_options .woocommerce_variation table td.options{width:150px}#variable_product_options .woocommerce_variation table td.options label{margin-bottom:6px}#variable_product_options .woocommerce_variation table td.data{padding:0 0 0 12px}#variable_product_options .woocommerce_variation table td.data table.data_table{width:100%;padding:0 12px 6px;background:#fff;border:1px solid #dfdfdf;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#variable_product_options .woocommerce_variation table td.data table.data_table td{width:50%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#variable_product_options .woocommerce_variation table td.data table.data_table:before{content:"";display:block;position:absolute;top:33px;left:0;margin:0 0 0 -1px;border:7px solid #dfdfdf;border-color:transparent transparent transparent #dfdfdf}#variable_product_options .woocommerce_variation table td.data table.data_table:after{content:"";display:block;position:absolute;top:34px;left:0;margin:0 0 0 -1px;border:6px solid #fafafa;border-color:transparent transparent transparent #fafafa}#variable_product_options .woocommerce_variation table td.upload_image{white-space:nowrap;width:75px}#variable_product_options .woocommerce_variation table td.upload_image img{float:none;width:73px;border:1px solid #dfdfdf}#variable_product_options .woocommerce_variation table td.upload_image .button{margin:0;padding:4px 10px;width:auto;float:none;vertical-align:middle}#variable_product_options .woocommerce_variation table td.upload_image .upload_image_button{display:block;position:relative}#variable_product_options .woocommerce_variation table td.upload_image .upload_image_button .overlay{display:none;width:75px;height:75px;position:absolute;top:0;left:0;margin:0;padding:0;opacity:.5;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAXklEQVQYGW2OUQrAMAhDFy8+dnKnwiuh2I+aJulDZebDkfSie1b28Q7EXWrfvSm60RQnkQUC8ja7owpmL6d4GdDZ0cNNHyIhZEj4QYCxze6orsluAh8AnR0xKPR07weXJi8JGd3qqwAAAABJRU5ErkJggg==) center center no-repeat #eee}#variable_product_options .woocommerce_variation table td.upload_image .upload_image_button:hover .overlay{display:block}#variable_product_options .woocommerce_variation table td.upload_image .upload_image_button.remove .overlay{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAWElEQVQYGY2OUQ6AMAxCZdm9jSev65K3YKNm+6EFBlVEHDxJJ3Pi0C72xlBNyTs3jU7wEUTTIB51GCp2CL8HLpHEdaOLb/N2dfuq9NT0zOo/M9q6EaImsd/uViMLVuD4KAAAAABJRU5ErkJggg==) center center no-repeat #eee}#variable_product_options .woocommerce_variation table .cancel_sale_schedule,#variable_product_options .woocommerce_variation table .sale_schedule{float:right}#variable_product_options .woocommerce_variation table tr.sale_price_dates_fields td{padding-right:24px;position:relative}#variable_product_options .woocommerce_variation table tr.sale_price_dates_fields td img{position:absolute;right:0;bottom:0;padding:5px 0;margin:0 0 6px}.tips{cursor:help;text-decoration:none}img.tips{padding:5px 0 0}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#464646}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#464646}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#464646}#tiptip_holder.tip_left{padding-right:5px}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#464646}#tiptip_content,.chart-tooltip,.wc_error_tip{font-size:11px;color:#fff;padding:.5em;background:#464646;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.1);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.1);box-shadow:1px 1px 3px rgba(0,0,0,.1);text-align:center;max-width:150px}#tiptip_content code,.chart-tooltip code,.wc_error_tip code{background:#888;padding:1px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}.wc_error_tip{background:#d82223;max-width:20em;white-space:normal;position:absolute;margin:1.5em 1px 0 -1em;z-index:9999999}.wc_error_tip:after{content:"";display:block;border:8px solid #d82223;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;position:absolute;top:-3px;left:50%;margin:-1em 0 0 -3px}img.ui-datepicker-trigger{vertical-align:middle;margin-top:-1px;cursor:pointer}.wc-metabox-content img.ui-datepicker-trigger,.woocommerce_options_panel img.ui-datepicker-trigger{float:left;margin-right:8px;margin-top:4px;margin-left:4px}#ui-datepicker-div{display:none}.woocommerce-reports-wide.woocommerce-reports-wrap,.woocommerce-reports-wrap.woocommerce-reports-wrap{margin-left:300px;padding-top:18px}.woocommerce-reports-wide.halved,.woocommerce-reports-wrap.halved{margin:0;overflow:hidden;zoom:1}.woocommerce-reports-wide .widefat td,.woocommerce-reports-wrap .widefat td{vertical-align:top;padding:7px}.woocommerce-reports-wide .widefat td .description,.woocommerce-reports-wrap .widefat td .description{margin:4px 0 0}.woocommerce-reports-wide .postbox:after,.woocommerce-reports-wrap .postbox:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce-reports-wide .postbox h3,.woocommerce-reports-wrap .postbox h3{cursor:default!important}.woocommerce-reports-wide .postbox .inside,.woocommerce-reports-wrap .postbox .inside{padding:10px;margin:0!important}.woocommerce-reports-wide .postbox h3.stats_range,.woocommerce-reports-wrap .postbox h3.stats_range{padding:0!important;border-bottom-color:#dfdfdf}.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{float:right;line-height:26px;border-left:1px solid #dfdfdf;padding:10px;display:block;text-decoration:none}.woocommerce-reports-wide .postbox h3.stats_range .export_csv:before,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;content:"\e00a";margin-right:4px}.woocommerce-reports-wide .postbox h3.stats_range ul,.woocommerce-reports-wrap .postbox h3.stats_range ul{list-style:none;margin:0;padding:0;zoom:1;background:#f5f5f5}.woocommerce-reports-wide .postbox h3.stats_range ul:after,.woocommerce-reports-wide .postbox h3.stats_range ul:before,.woocommerce-reports-wrap .postbox h3.stats_range ul:after,.woocommerce-reports-wrap .postbox h3.stats_range ul:before{content:" ";display:table}.woocommerce-reports-wide .postbox h3.stats_range ul:after,.woocommerce-reports-wrap .postbox h3.stats_range ul:after{clear:both}.woocommerce-reports-wide .postbox h3.stats_range ul li,.woocommerce-reports-wrap .postbox h3.stats_range ul li{float:left;margin:0;padding:0;line-height:26px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li a{border-right:1px solid #dfdfdf;padding:10px;display:block;text-decoration:none}.woocommerce-reports-wide .postbox h3.stats_range ul li.active,.woocommerce-reports-wrap .postbox h3.stats_range ul li.active{background:#fff;-webkit-box-shadow:0 4px 0 0 #fff;box-shadow:0 4px 0 0 #fff}.woocommerce-reports-wide .postbox h3.stats_range ul li.active a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.active a{color:#777}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:9px 10px;vertical-align:middle}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom div,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom form,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom div,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom form{display:inline;margin:0}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom div input.range_datepicker,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom form input.range_datepicker,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom div input.range_datepicker,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom form input.range_datepicker{padding:0;margin:0 10px 0 0;background:0 0;border:0;color:#777;text-align:center;-webkit-box-shadow:none;box-shadow:none}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding:12px 12px 12px 249px;margin:0!important}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{width:225px;margin-left:-237px;float:left}.woocommerce-reports-wide .postbox .chart-widgets,.woocommerce-reports-wrap .postbox .chart-widgets{margin:0;padding:0}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget{margin:0 0 1em;background:#fafafa;border:1px solid #dfdfdf}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget h4,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget h4{background:#fff;border:1px solid #dfdfdf;border-left-width:0;border-right-width:0;padding:10px;margin:0;color:#2ea2cc;border-top-width:0;background:-webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9)) #fff;background:-webkit-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:-moz-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:-o-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:linear-gradient(to top,#ececec,#f9f9f9) #fff}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget h4.section_title:hover,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget h4.section_title:hover{color:#a00}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title{cursor:pointer}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title span,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title span{display:block}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title span:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title span:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin-left:7px;content:"\e035";float:right;font-size:.9em;line-height:1.618}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title.open,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title.open{color:#333}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title.open span:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title.open span:after{display:none}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section{border-bottom:1px solid #dfdfdf}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section .chosen-container,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section .chosen-container{width:100%!important}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section:last-of-type,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section:last-of-type{border-radius:0 0 3px 3px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table{width:100%}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td{padding:7px 10px;vertical-align:top;border-top:1px solid #e5e5e5;line-height:1.4em}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table tr:first-child td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table tr:first-child td{border-top:0}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.count,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.count{background:#f5f5f5}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.name,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.name{padding-right:0}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.sparkline,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.sparkline{vertical-align:middle}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table .wc_sparkline,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table .wc_sparkline{width:32px;height:1em;display:block;float:right}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table tr.active td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table tr.active td{background:#f5f5f5}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget form,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget p,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget form,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget p{margin:0;padding:10px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget form .submit,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget p .submit,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget form .submit,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget p .submit{margin-top:10px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget #product_ids,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget #product_ids{width:100%}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .select_all,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .select_none,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .select_all,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .select_none{float:right;color:#999;margin-left:4px;margin-top:10px}.woocommerce-reports-wide .postbox .chart-legend,.woocommerce-reports-wrap .postbox .chart-legend{list-style:none;margin:0 0 1em;padding:0;border:1px solid #dfdfdf;border-right-width:0;border-bottom-width:0;background:#fff}.woocommerce-reports-wide .postbox .chart-legend li,.woocommerce-reports-wrap .postbox .chart-legend li{border-right:5px solid #aaa;color:#aaa;padding:1em;display:block;margin:0;-webkit-transition:all ease .5s;box-shadow:inset 0 -1px 0 0 #dfdfdf}.woocommerce-reports-wide .postbox .chart-legend li strong,.woocommerce-reports-wrap .postbox .chart-legend li strong{font-size:1.618em;line-height:1.2em;color:#464646;font-weight:400;display:block;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif}.woocommerce-reports-wide .postbox .chart-legend li:hover,.woocommerce-reports-wrap .postbox .chart-legend li:hover{box-shadow:inset 0 -1px 0 0 #dfdfdf,inset 300px 0 0 rgba(156,93,144,.1);border-right:5px solid #9c5d90!important;padding-left:1.5em;color:#9c5d90}.woocommerce-reports-wide .postbox .pie-chart-legend,.woocommerce-reports-wrap .postbox .pie-chart-legend{margin:12px 0 0;overflow:hidden}.woocommerce-reports-wide .postbox .pie-chart-legend li,.woocommerce-reports-wrap .postbox .pie-chart-legend li{float:left;margin:0;padding:6px 0 0;border-top:4px solid #999;text-align:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:50%}.woocommerce-reports-wide .postbox .stat,.woocommerce-reports-wrap .postbox .stat{font-size:1.5em!important;font-weight:700;text-align:center}.woocommerce-reports-wide .postbox .chart-placeholder,.woocommerce-reports-wrap .postbox .chart-placeholder{width:100%;height:650px;overflow:hidden;position:relative}.woocommerce-reports-wide .postbox .chart-prompt,.woocommerce-reports-wrap .postbox .chart-prompt{line-height:650px;margin:0;color:#999;font-size:1.2em;font-style:italic;text-align:center}.woocommerce-reports-wide .postbox .chart-container,.woocommerce-reports-wrap .postbox .chart-container{background:#fff;padding:12px;position:relative;border:1px solid #dfdfdf;border-radius:3px}.woocommerce-reports-wide .postbox .main .chart-legend,.woocommerce-reports-wrap .postbox .main .chart-legend{margin-top:12px}.woocommerce-reports-wide .postbox .main .chart-legend li,.woocommerce-reports-wrap .postbox .main .chart-legend li{border-right:0;margin:0 8px 0 0;float:left;border-top:4px solid #aaa}.woocommerce-reports-wide .woocommerce-reports-main,.woocommerce-reports-wrap .woocommerce-reports-main{float:left;min-width:100%}.woocommerce-reports-wide .woocommerce-reports-main table td,.woocommerce-reports-wrap .woocommerce-reports-main table td{padding:9px}.woocommerce-reports-wide .woocommerce-reports-sidebar,.woocommerce-reports-wrap .woocommerce-reports-sidebar{display:inline;width:281px;margin-left:-300px;clear:both;float:left}.woocommerce-reports-wide .woocommerce-reports-left,.woocommerce-reports-wrap .woocommerce-reports-left{width:49.5%;float:left}.woocommerce-reports-wide .woocommerce-reports-right,.woocommerce-reports-wrap .woocommerce-reports-right{width:49.5%;float:right}.woocommerce-reports-wide .column-wc_actions a.edit,.woocommerce-reports-wide .column-wc_actions a.view,.woocommerce-reports-wrap .column-wc_actions a.edit,.woocommerce-reports-wrap .column-wc_actions a.view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.woocommerce-reports-wide .column-wc_actions a.edit:after,.woocommerce-reports-wide .column-wc_actions a.view:after,.woocommerce-reports-wrap .column-wc_actions a.edit:after,.woocommerce-reports-wrap .column-wc_actions a.view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.woocommerce-reports-wide .column-wc_actions a.edit:after,.woocommerce-reports-wrap .column-wc_actions a.edit:after{content:"\e01c"}.woocommerce-reports-wide .column-wc_actions a.view:after,.woocommerce-reports-wrap .column-wc_actions a.view:after{content:"\e010"}.woocommerce-wide-reports-wrap{padding-bottom:11px}.woocommerce-wide-reports-wrap .widefat .export-data{float:right}.woocommerce-wide-reports-wrap .widefat td,.woocommerce-wide-reports-wrap .widefat th{vertical-align:middle;padding:7px}form.report_filters div,form.report_filters input,form.report_filters label,form.report_filters p{vertical-align:middle}.chart-tooltip{position:absolute;display:none;line-height:1}table.bar_chart{width:100%}table.bar_chart thead th{text-align:left;color:#ccc;padding:6px 0}table.bar_chart tbody th{padding:6px 0;width:25%;text-align:left!important;font-weight:400!important;border-bottom:1px solid #fee}table.bar_chart tbody td{text-align:right;line-height:24px;padding:6px 6px 6px 0;border-bottom:1px solid #fee}table.bar_chart tbody td span{color:#8a4b75;display:block}table.bar_chart tbody td span.alt{color:#47a03e;margin-top:6px}table.bar_chart tbody td.bars{position:relative;text-align:left;padding:6px 6px 6px 0;border-bottom:1px solid #fee}table.bar_chart tbody td.bars a,table.bar_chart tbody td.bars span{text-decoration:none;clear:both;background:#8a4b75;float:left;display:block;line-height:24px;height:24px;-moz-border-radius:3px;-webkit-border-radius:3px;-o-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}table.bar_chart tbody td.bars span.alt{clear:both;background:#47a03e}table.bar_chart tbody td.bars span.alt span{margin:0;color:#c5dec2!important;text-shadow:0 1px 0 #47a03e;background:0 0}.chosen-container-single .chosen-single{margin-top:1px}.chosen-container-single .chosen-single div b{background:url(../images/chosen-sprite.png) 0 4px no-repeat!important}.chosen-container-active .chosen-single-with-drop div b{background-position:-18px 2px!important}.chosen-container-single .chosen-search input{line-height:13px;width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{width:100%!important}.chosen-container-multi .chosen-choices .search-field input{height:21px!important}.woocommerce_options_panel .chosen-container-multi{width:50%!important;float:left}.woocommerce_options_panel .chosen-container-multi .search-field{min-width:50%}.woocommerce_options_panel .chosen-container-multi .search-field input{min-width:100%}@media only screen and (max-width:1280px){#order_data .order_data_column{width:48%}#order_data .order_data_column:first-child{width:100%}.woocommerce_options_panel .description{display:block;clear:both;margin-left:0}}@media only screen and (max-width:900px){#woocommerce-product-data .wc-tabs-back,#woocommerce-product-data ul.product_data_tabs{width:40px}#woocommerce-coupon-data .wc-metaboxes-wrapper,#woocommerce-coupon-data .woocommerce_options_panel,#woocommerce-product-data .wc-metaboxes-wrapper,#woocommerce-product-data .woocommerce_options_panel{width:98%}#woocommerce-product-data ul.product_data_tabs li a{position:relative;text-indent:-999px;padding:10px}#woocommerce-product-data ul.product_data_tabs li a:before{position:absolute;top:0;right:0;bottom:0;left:0;text-indent:0;text-align:center;line-height:40px;width:40px;height:40px}}@media only screen and (max-width:782px){#wp-excerpt-media-buttons a{font-size:16px;line-height:37px;height:39px;padding:0 20px 0 15px}#wp-excerpt-editor-tools{padding-top:20px;padding-right:15px;overflow:hidden;margin-bottom:-1px}#woocommerce-product-data .checkbox{width:25px}}.woocommerce-checkout .form-row .chosen-container{width:100%!important}.woocommerce-checkout .form-row .chosen-container-single .chosen-single{height:28px;line-height:29px}.woocommerce-checkout .form-row .chosen-container-single .chosen-single div b{background:url(../images/chosen-sprite.png) 0 3px no-repeat!important}.woocommerce-checkout .form-row .chosen-container-active .chosen-single-with-drop div b{background-position:-18px 4px!important}.woocommerce-checkout .form-row .chosen-container-single .chosen-search input{line-height:13px;width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce-checkout .form-row .chosen-container .chosen-drop{width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.woocommerce-checkout .form-row .chosen-container-single .chosen-single div b{background-image:url(../images/chosen-sprite@2x.png)!important;background-position:0 5px!important;background-repeat:no-repeat!important;background-size:52px 37px!important}.woocommerce-checkout .form-row .chosen-container-active .chosen-single-with-drop div b{background-position:-18px 5px!important}}.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:26px;border:1px solid #aaa;border-radius:5px;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:26px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;right:26px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover,.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:url(../images/chosen-sprite.png) 100% -20px no-repeat #fff;background:url(../images/chosen-sprite.png) 100% -20px no-repeat,linear-gradient(#eee 1%,#fff 15%);font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.chosen-container .chosen-results{position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:5px;height:15px;outline:0;border:0!important;background:0 0!important;box-shadow:none;color:#666;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-multi .chosen-choices li.search-field .default{color:#999}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 0 3px 5px;padding:3px 20px 3px 5px;border:1px solid #aaa;border-radius:3px;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#eee),color-stop(80%,#fff));background-image:-webkit-linear-gradient(#eee 20%,#fff 80%);background-image:-moz-linear-gradient(#eee 20%,#fff 80%);background-image:-o-linear-gradient(#eee 20%,#fff 80%);background-image:linear-gradient(#eee 20%,#fff 80%);box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#111!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close,.chosen-disabled .chosen-single{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl .chosen-drop,.chosen-rtl.chosen-container-single-nosearch .chosen-search{left:9999px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:url(../images/chosen-sprite.png) -30px -20px no-repeat #fff;background:url(../images/chosen-sprite.png) -30px -20px no-repeat,linear-gradient(#eee 1%,#fff 15%);direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-rtl .chosen-search input[type=text]{background-image:url(../images/chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}.chosen-container-single .chosen-single abbr{top:8px}.wc-backbone-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:160000}.wc-backbone-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.wc-backbone-modal .wc-backbone-modal-content{position:absolute;top:50%;left:50%;width:500px;background:#fff;margin:-150px 0 0 -250px}.wc-backbone-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.wc-backbone-modal-main{padding-bottom:50px}.wc-backbone-modal-main article,.wc-backbone-modal-main header{display:block;position:relative;padding:4px 16px}.wc-backbone-modal-main header{border-bottom:1px solid #ddd}.wc-backbone-modal-main article{padding:10px 16px}.wc-backbone-modal-main article .pagination{padding:10px 0 0;text-align:center}.wc-backbone-modal-main h1{font-size:22px;font-weight:200;line-height:45px;margin:0}.wc-backbone-modal-main footer{position:absolute;left:0;right:0;bottom:0;height:30px;z-index:100;padding:10px 0;border:0 solid #dfdfdf;border-width:1px 0 0;box-shadow:0 -4px 4px -4px rgba(0,0,0,.1)}.wc-backbone-modal-main footer .inner{padding:0 10px;text-align:right} \ No newline at end of file diff --git a/assets/css/admin.less b/assets/css/admin.less index 863e40d88a8..46a2e09da1e 100644 --- a/assets/css/admin.less +++ b/assets/css/admin.less @@ -527,7 +527,6 @@ ul.wc_coupon_list_block { } div.edit_address { display: none; - overflow: hidden; zoom: 1; padding-right: 1px; } From f147f07232c9d0dd2aab172658646542a4fe1ac9 Mon Sep 17 00:00:00 2001 From: Gustavo Bordoni Date: Fri, 1 Aug 2014 01:47:03 -0300 Subject: [PATCH 007/743] Now using `Chosen` on the Selects from the Edit Order page --- assets/js/admin/meta-boxes-order.js | 79 ++++++++++++++++------------- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/assets/js/admin/meta-boxes-order.js b/assets/js/admin/meta-boxes-order.js index a68e841c664..11ad83c9b01 100644 --- a/assets/js/admin/meta-boxes-order.js +++ b/assets/js/admin/meta-boxes-order.js @@ -75,57 +75,64 @@ jQuery( function ( $ ) { }); - var states = null; + var states = null, + chosen_opts = { + + }; // Check if we have the countries loaded if ( ! ( typeof woocommerce_admin_meta_boxes_order === 'undefined' || typeof woocommerce_admin_meta_boxes_order.countries === 'undefined' ) ) { /* State/Country select boxes */ states = $.parseJSON( woocommerce_admin_meta_boxes_order.countries.replace( /"/g, '"' ) ); } - $( '.js_field-country' ).change( function( e, stickValue ){ - // Check for stickValue before using it - if ( typeof stickValue === 'undefined' ){ - stickValue = false; - } + $( '.js_field-country' ) + .chosen( chosen_opts ) + .change( function( e, stickValue ){ + // Check for stickValue before using it + if ( typeof stickValue === 'undefined' ){ + stickValue = false; + } - // Prevent if we don't have the metabox data - if ( states === null ){ - return; - } + // Prevent if we don't have the metabox data + if ( states === null ){ + return; + } - var $this = $( this ), - country = $this.val(), - $state = $this.parents( '.edit_address' ).find( '.js_field-state' ), - $parent = $state.parent(), - input_name = $state.attr( 'name' ), - input_id = $state.attr( 'id' ), - value = ! stickValue && $this.data( 'woocommerce.stickState-' + country ) ? $this.data( 'woocommerce.stickState-' + country ) : $state.val(), - placeholder = $state.attr( 'placeholder' ); + var $this = $( this ), + country = $this.val(), + $state = $this.parents( '.edit_address' ).find( '.js_field-state' ), + $parent = $state.parent(), + input_name = $state.attr( 'name' ), + input_id = $state.attr( 'id' ), + value = ! stickValue && $this.data( 'woocommerce.stickState-' + country ) ? $this.data( 'woocommerce.stickState-' + country ) : $state.val(), + placeholder = $state.attr( 'placeholder' ); - if ( stickValue ){ - $this.data( 'woocommerce.stickState-' + country, value ); - } + if ( stickValue ){ + $this.data( 'woocommerce.stickState-' + country, value ); + } - if ( states[ country ] ) { - var $states_select = $( '' ), - state = states[ country ]; + if ( states[ country ] ) { + var $states_select = $( '' ), + state = states[ country ]; - $states_select.append( $( '' ) ); + $states_select.append( $( '' ) ); - $.each( state, function( index, name ) { - $states_select.append( $( '' ) ); - } ); + $.each( state, function( index, name ) { + $states_select.append( $( '' ) ); + } ); - $states_select.val( value ); + $states_select.val( value ); - $state.replaceWith( $states_select ); - } else { - $parent.show().find( '.chosen-container' ).remove(); - $state.replaceWith( '' ); - } + $state.replaceWith( $states_select ); - $( 'body' ).trigger( 'contry-change.woocommerce', [country, $( this ).closest( 'div' )] ); - } ).trigger( 'change', true ); + $states_select.show().chosen( chosen_opts ).hide(); + } else { + $parent.show().find( '.chosen-container' ).remove(); + $state.replaceWith( '' ); + } + + $( 'body' ).trigger( 'contry-change.woocommerce', [country, $( this ).closest( 'div' )] ); + } ).trigger( 'change', true ); $( 'body' ) .on( 'change', 'select.js_field-state', function(){ From 0c6553b22020caa2df540754416864f23eeefa84 Mon Sep 17 00:00:00 2001 From: Gustavo Bordoni Date: Sat, 2 Aug 2014 18:34:30 -0300 Subject: [PATCH 008/743] When modifying from a Country with Select Box to choose state it was duplicating the Chosen element --- assets/js/admin/meta-boxes-order.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/assets/js/admin/meta-boxes-order.js b/assets/js/admin/meta-boxes-order.js index 11ad83c9b01..f07013c2d83 100644 --- a/assets/js/admin/meta-boxes-order.js +++ b/assets/js/admin/meta-boxes-order.js @@ -104,13 +104,16 @@ jQuery( function ( $ ) { $parent = $state.parent(), input_name = $state.attr( 'name' ), input_id = $state.attr( 'id' ), - value = ! stickValue && $this.data( 'woocommerce.stickState-' + country ) ? $this.data( 'woocommerce.stickState-' + country ) : $state.val(), + value = $this.data( 'woocommerce.stickState-' + country ) ? $this.data( 'woocommerce.stickState-' + country ) : $state.val(), placeholder = $state.attr( 'placeholder' ); if ( stickValue ){ $this.data( 'woocommerce.stickState-' + country, value ); } + // Remove the previous Chosen DOM element + $parent.show().find( '.chosen-container' ).remove(); + if ( states[ country ] ) { var $states_select = $( '' ), state = states[ country ]; @@ -125,14 +128,13 @@ jQuery( function ( $ ) { $state.replaceWith( $states_select ); - $states_select.show().chosen( chosen_opts ).hide(); + $states_select.show().chosen( chosen_opts ).hide().trigger("chosen:updated"); } else { - $parent.show().find( '.chosen-container' ).remove(); $state.replaceWith( '' ); } $( 'body' ).trigger( 'contry-change.woocommerce', [country, $( this ).closest( 'div' )] ); - } ).trigger( 'change', true ); + } ).trigger( 'change', [ true ] ); $( 'body' ) .on( 'change', 'select.js_field-state', function(){ From a13218eba2dba74fff81d8781fd88f617b33c274 Mon Sep 17 00:00:00 2001 From: Kathy Darling Date: Wed, 8 Oct 2014 23:47:50 +0200 Subject: [PATCH 009/743] add customer details and addresses to emails via `woocommerce_email_customer_details` hook --- includes/class-wc-emails.php | 65 +++++++++++++++++++ templates/emails/admin-new-order.php | 11 +--- templates/emails/customer-completed-order.php | 11 +--- templates/emails/customer-note.php | 11 +--- .../emails/customer-processing-order.php | 11 +--- templates/emails/plain/admin-new-order.php | 10 +-- .../emails/plain/customer-completed-order.php | 10 +-- templates/emails/plain/customer-note.php | 10 +-- .../plain/customer-processing-order.php | 10 +-- 9 files changed, 73 insertions(+), 76 deletions(-) diff --git a/includes/class-wc-emails.php b/includes/class-wc-emails.php index 8f2b5436b86..05096054ab7 100644 --- a/includes/class-wc-emails.php +++ b/includes/class-wc-emails.php @@ -89,6 +89,8 @@ class WC_Emails { add_action( 'woocommerce_email_header', array( $this, 'email_header' ) ); add_action( 'woocommerce_email_footer', array( $this, 'email_footer' ) ); add_action( 'woocommerce_email_order_meta', array( $this, 'order_meta' ), 10, 3 ); + add_action( 'woocommerce_email_customer_details', array( $this, 'customer_details' ), 10, 3 ); + add_action( 'woocommerce_email_customer_details', array( $this, 'email_addresses' ), 10, 3 ); // Hooks for sending emails during store events add_action( 'woocommerce_low_stock_notification', array( $this, 'low_stock' ) ); @@ -307,6 +309,69 @@ class WC_Emails { } } + /** + * Add customer details to email templates. + * + * @access public + * @param mixed $order + * @param bool $sent_to_admin (default: false) + * @param bool $plain_text (default: false) + * @return void + */ + function customer_details( $order, $sent_to_admin = false, $plain_text = false ) { + + $meta = array(); + $show_fields = array(); + + if ($order->billing_email){ + $show_fields[__( 'Email:', 'woocommerce' )] = wptexturize( $order->billing_email ); + } + + if ($order->billing_phone){ + $show_fields[__( 'Tel:', 'woocommerce' )] = wptexturize( $order->billing_phone ); + } + + $show_fields = apply_filters( 'woocommerce_email_customer_keys', $show_fields, $sent_to_admin, $order ); + + if( $show_fields ){ + + $heading = $sent_to_admin ? __( 'Customer details', 'woocommerce' ) : __( 'Your details', 'woocommerce' ); + + if ( $plain_text ) { + + echo $heading . "\n\n"; + + foreach ( $meta as $key => $value ) { + if ( $value ) { + echo $key . ': ' . $value . "\n"; + } + } + + } else { + + echo '

' . $heading . '

'; + + foreach ( $meta as $key => $value ) { + if ( $value ) { + echo '

' . $key . ': ' . $value . '

'; + } + } + } + + } + + } + + /** + * Get the email addresses. + * + * @access public + * @return void + */ + function email_addresses( $order, $sent_to_admin = false, $plain_text = false ) { + wc_get_template( 'emails/email-addresses.php', array( 'order' => $order ) ); + } + /** * Low stock notification email. * diff --git a/templates/emails/admin-new-order.php b/templates/emails/admin-new-order.php index 9eadc49a5e2..f5ab7d1cd27 100644 --- a/templates/emails/admin-new-order.php +++ b/templates/emails/admin-new-order.php @@ -52,15 +52,6 @@ if ( ! defined( 'ABSPATH' ) ) { -

- -billing_email ) : ?> -

billing_email; ?>

- -billing_phone ) : ?> -

billing_phone; ?>

- - - $order ) ); ?> + diff --git a/templates/emails/customer-completed-order.php b/templates/emails/customer-completed-order.php index 66a00e9b95f..c1610f95435 100644 --- a/templates/emails/customer-completed-order.php +++ b/templates/emails/customer-completed-order.php @@ -52,15 +52,6 @@ if ( ! defined( 'ABSPATH' ) ) { -

- -billing_email) : ?> -

billing_email; ?>

- -billing_phone) : ?> -

billing_phone; ?>

- - - $order ) ); ?> + diff --git a/templates/emails/customer-note.php b/templates/emails/customer-note.php index b682e5d62ee..991b87257e4 100644 --- a/templates/emails/customer-note.php +++ b/templates/emails/customer-note.php @@ -56,15 +56,6 @@ if ( ! defined( 'ABSPATH' ) ) { -

- -billing_email) : ?> -

billing_email; ?>

- -billing_phone) : ?> -

billing_phone; ?>

- - - $order ) ); ?> + diff --git a/templates/emails/customer-processing-order.php b/templates/emails/customer-processing-order.php index da6649e9f61..0d0c1fc6aa6 100644 --- a/templates/emails/customer-processing-order.php +++ b/templates/emails/customer-processing-order.php @@ -52,15 +52,6 @@ if ( ! defined( 'ABSPATH' ) ) { -

- -billing_email) : ?> -

billing_email; ?>

- -billing_phone) : ?> -

billing_phone; ?>

- - - $order ) ); ?> + diff --git a/templates/emails/plain/admin-new-order.php b/templates/emails/plain/admin-new-order.php index de3fcacbbaa..b5009398693 100644 --- a/templates/emails/plain/admin-new-order.php +++ b/templates/emails/plain/admin-new-order.php @@ -39,15 +39,7 @@ echo "\n****************************************************\n\n"; do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text ); -echo __( 'Customer details', 'woocommerce' ) . "\n"; - -if ( $order->billing_email ) - echo __( 'Email:', 'woocommerce' ); echo $order->billing_email . "\n"; - -if ( $order->billing_phone ) - echo __( 'Tel:', 'woocommerce' ); ?> billing_phone . "\n"; - -wc_get_template( 'emails/plain/email-addresses.php', array( 'order' => $order ) ); +do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text ); echo "\n****************************************************\n\n"; diff --git a/templates/emails/plain/customer-completed-order.php b/templates/emails/plain/customer-completed-order.php index 402e52a20d3..e3e58df5492 100644 --- a/templates/emails/plain/customer-completed-order.php +++ b/templates/emails/plain/customer-completed-order.php @@ -38,15 +38,7 @@ echo "\n****************************************************\n\n"; do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text ); -echo __( 'Your details', 'woocommerce' ) . "\n\n"; - -if ( $order->billing_email ) - echo __( 'Email:', 'woocommerce' ); echo $order->billing_email . "\n"; - -if ( $order->billing_phone ) - echo __( 'Tel:', 'woocommerce' ); ?> billing_phone . "\n"; - -wc_get_template( 'emails/plain/email-addresses.php', array( 'order' => $order ) ); +do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text ); echo "\n****************************************************\n\n"; diff --git a/templates/emails/plain/customer-note.php b/templates/emails/plain/customer-note.php index 0def750360a..64e94d5488f 100644 --- a/templates/emails/plain/customer-note.php +++ b/templates/emails/plain/customer-note.php @@ -46,15 +46,7 @@ echo "\n****************************************************\n\n"; do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text ); -echo __( 'Your details', 'woocommerce' ) . "\n\n"; - -if ( $order->billing_email ) - echo __( 'Email:', 'woocommerce' ); echo $order->billing_email . "\n"; - -if ( $order->billing_phone ) - echo __( 'Tel:', 'woocommerce' ); ?> billing_phone . "\n"; - -wc_get_template( 'emails/plain/email-addresses.php', array( 'order' => $order ) ); +do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text ); echo "\n****************************************************\n\n"; diff --git a/templates/emails/plain/customer-processing-order.php b/templates/emails/plain/customer-processing-order.php index e1d48e14ed6..5d375c2ced7 100644 --- a/templates/emails/plain/customer-processing-order.php +++ b/templates/emails/plain/customer-processing-order.php @@ -38,15 +38,7 @@ echo "\n****************************************************\n\n"; do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text ); -echo __( 'Your details', 'woocommerce' ) . "\n\n"; - -if ( $order->billing_email ) - echo __( 'Email:', 'woocommerce' ); echo $order->billing_email . "\n"; - -if ( $order->billing_phone ) - echo __( 'Tel:', 'woocommerce' ); ?> billing_phone . "\n"; - -wc_get_template( 'emails/plain/email-addresses.php', array( 'order' => $order ) ); +do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text ); echo "\n****************************************************\n\n"; From f13a7142fe26434220b76d4a375c4061a7a774e7 Mon Sep 17 00:00:00 2001 From: Kathy Darling Date: Wed, 8 Oct 2014 23:49:12 +0200 Subject: [PATCH 010/743] make `woocommerce_email_order_meta_keys` filter args match `woocommerce_email_customer_details_keys` --- includes/class-wc-emails.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-wc-emails.php b/includes/class-wc-emails.php index 05096054ab7..6985ba8decd 100644 --- a/includes/class-wc-emails.php +++ b/includes/class-wc-emails.php @@ -275,7 +275,7 @@ class WC_Emails { function order_meta( $order, $sent_to_admin = false, $plain_text = false ) { $meta = array(); - $show_fields = apply_filters( 'woocommerce_email_order_meta_keys', array(), $sent_to_admin ); + $show_fields = apply_filters( 'woocommerce_email_order_meta_keys', array(), $sent_to_admin, $order ); if ( $order->customer_note ) $meta[ __( 'Note', 'woocommerce' ) ] = wptexturize( $order->customer_note ); @@ -331,7 +331,7 @@ class WC_Emails { $show_fields[__( 'Tel:', 'woocommerce' )] = wptexturize( $order->billing_phone ); } - $show_fields = apply_filters( 'woocommerce_email_customer_keys', $show_fields, $sent_to_admin, $order ); + $show_fields = apply_filters( 'woocommerce_email_customer_details_keys', $show_fields, $sent_to_admin, $order ); if( $show_fields ){ From eaabcd5dfa9e0f3d156659067ec4db6b93c1a845 Mon Sep 17 00:00:00 2001 From: Kathy Darling Date: Wed, 8 Oct 2014 23:57:48 +0200 Subject: [PATCH 011/743] fix variable naming error --- includes/class-wc-emails.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/class-wc-emails.php b/includes/class-wc-emails.php index 6985ba8decd..f59cf785985 100644 --- a/includes/class-wc-emails.php +++ b/includes/class-wc-emails.php @@ -323,11 +323,11 @@ class WC_Emails { $meta = array(); $show_fields = array(); - if ($order->billing_email){ + if ( $order->billing_email ){ $show_fields[__( 'Email:', 'woocommerce' )] = wptexturize( $order->billing_email ); } - if ($order->billing_phone){ + if ( $order->billing_phone ){ $show_fields[__( 'Tel:', 'woocommerce' )] = wptexturize( $order->billing_phone ); } @@ -341,7 +341,7 @@ class WC_Emails { echo $heading . "\n\n"; - foreach ( $meta as $key => $value ) { + foreach ( $show_fields as $key => $value ) { if ( $value ) { echo $key . ': ' . $value . "\n"; } @@ -351,7 +351,7 @@ class WC_Emails { echo '

' . $heading . '

'; - foreach ( $meta as $key => $value ) { + foreach ( $show_fields as $key => $value ) { if ( $value ) { echo '

' . $key . ': ' . $value . '

'; } From 2c63d5ca13705a52213b0189112b970ace3597a8 Mon Sep 17 00:00:00 2001 From: Kathy Darling Date: Wed, 8 Oct 2014 23:58:13 +0200 Subject: [PATCH 012/743] add filter to rename Customer Details section --- includes/class-wc-emails.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/class-wc-emails.php b/includes/class-wc-emails.php index f59cf785985..ce38e7803ce 100644 --- a/includes/class-wc-emails.php +++ b/includes/class-wc-emails.php @@ -337,6 +337,8 @@ class WC_Emails { $heading = $sent_to_admin ? __( 'Customer details', 'woocommerce' ) : __( 'Your details', 'woocommerce' ); + $heading = apply_filters( 'woocommerce_email_custom_details_header', $heading, $sent_to_admin, $order ); + if ( $plain_text ) { echo $heading . "\n\n"; From 011bb0a7849eae080d7743aaa8617c18838b4aad Mon Sep 17 00:00:00 2001 From: Nicola Mustone Date: Wed, 29 Oct 2014 15:05:43 +0100 Subject: [PATCH 013/743] Added cancelled order admin email --- .../class-wc-meta-box-order-actions.php | 2 +- includes/class-wc-emails.php | 1 + .../emails/class-wc-email-cancelled-order.php | 161 ++++++++++++++++++ templates/emails/admin-cancelled-order.php | 61 +++++++ .../emails/plain/admin-cancelled-order.php | 51 ++++++ woocommerce.php | 2 + 6 files changed, 277 insertions(+), 1 deletion(-) create mode 100644 includes/emails/class-wc-email-cancelled-order.php create mode 100644 templates/emails/admin-cancelled-order.php create mode 100644 templates/emails/plain/admin-cancelled-order.php diff --git a/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php b/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php index 36def66f594..a51bc5fae58 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php @@ -41,7 +41,7 @@ class WC_Meta_Box_Order_Actions { mailer(); - $available_emails = apply_filters( 'woocommerce_resend_order_emails_available', array( 'new_order', 'customer_processing_order', 'customer_completed_order', 'customer_invoice' ) ); + $available_emails = apply_filters( 'woocommerce_resend_order_emails_available', array( 'new_order', 'cancelled_order', 'customer_processing_order', 'customer_completed_order', 'customer_invoice' ) ); $mails = $mailer->get_emails(); if ( ! empty( $mails ) ) { diff --git a/includes/class-wc-emails.php b/includes/class-wc-emails.php index 4ed4e837c9c..2d182358011 100644 --- a/includes/class-wc-emails.php +++ b/includes/class-wc-emails.php @@ -106,6 +106,7 @@ class WC_Emails { include_once( 'emails/class-wc-email.php' ); $this->emails['WC_Email_New_Order'] = include( 'emails/class-wc-email-new-order.php' ); + $this->emails['WC_Email_Cancelled_Order'] = include( 'emails/class-wc-email-cancelled-order.php' ); $this->emails['WC_Email_Customer_Processing_Order'] = include( 'emails/class-wc-email-customer-processing-order.php' ); $this->emails['WC_Email_Customer_Completed_Order'] = include( 'emails/class-wc-email-customer-completed-order.php' ); $this->emails['WC_Email_Customer_Invoice'] = include( 'emails/class-wc-email-customer-invoice.php' ); diff --git a/includes/emails/class-wc-email-cancelled-order.php b/includes/emails/class-wc-email-cancelled-order.php new file mode 100644 index 00000000000..fadc20caedc --- /dev/null +++ b/includes/emails/class-wc-email-cancelled-order.php @@ -0,0 +1,161 @@ +id = 'cancelled_order'; + $this->title = __( 'Cancelled order', 'woocommerce' ); + $this->description = __( 'Cancelled order emails are sent when an order has been marked to cancelled from pending or on hold.', 'woocommerce' ); + + $this->heading = __( 'Cancelled order', 'woocommerce' ); + $this->subject = __( '[{site_title}] Cancelled order ({order_number})', 'woocommerce' ); + + $this->template_html = 'emails/admin-cancelled-order.php'; + $this->template_plain = 'emails/plain/admin-cancelled-order.php'; + + // Triggers for this email + add_action( 'woocommerce_order_status_pending_to_cancelled_notification', array( $this, 'trigger' ) ); + add_action( 'woocommerce_order_status_on-hold_to_cancelled_notification', array( $this, 'trigger' ) ); + + // Call parent constructor + parent::__construct(); + + // Other settings + $this->recipient = $this->get_option( 'recipient' ); + + if ( ! $this->recipient ) + $this->recipient = get_option( 'admin_email' ); + } + + /** + * trigger function. + * + * @access public + * @return void + */ + function trigger( $order_id ) { + + if ( $order_id ) { + $this->object = wc_get_order( $order_id ); + + $this->find['order-number'] = '{order_number}'; + + $this->replace['order-number'] = $this->object->get_order_number(); + } + + if ( ! $this->is_enabled() || ! $this->get_recipient() ) { + return; + } + + $this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() ); + } + + /** + * get_content_html function. + * + * @access public + * @return string + */ + function get_content_html() { + ob_start(); + wc_get_template( $this->template_html, array( + 'order' => $this->object, + 'email_heading' => $this->get_heading(), + 'sent_to_admin' => true, + 'plain_text' => false + ) ); + return ob_get_clean(); + } + + /** + * get_content_plain function. + * + * @access public + * @return string + */ + function get_content_plain() { + ob_start(); + wc_get_template( $this->template_plain, array( + 'order' => $this->object, + 'email_heading' => $this->get_heading(), + 'sent_to_admin' => true, + 'plain_text' => true + ) ); + return ob_get_clean(); + } + + /** + * Initialise Settings Form Fields + * + * @access public + * @return void + */ + function init_form_fields() { + $this->form_fields = array( + 'enabled' => array( + 'title' => __( 'Enable/Disable', 'woocommerce' ), + 'type' => 'checkbox', + 'label' => __( 'Enable this email notification', 'woocommerce' ), + 'default' => 'yes' + ), + 'recipient' => array( + 'title' => __( 'Recipient(s)', 'woocommerce' ), + 'type' => 'text', + 'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s.', 'woocommerce' ), esc_attr( get_option('admin_email') ) ), + 'placeholder' => '', + 'default' => '' + ), + 'subject' => array( + 'title' => __( 'Subject', 'woocommerce' ), + 'type' => 'text', + 'description' => sprintf( __( 'This controls the email subject line. Leave blank to use the default subject: %s.', 'woocommerce' ), $this->subject ), + 'placeholder' => '', + 'default' => '' + ), + 'heading' => array( + 'title' => __( 'Email Heading', 'woocommerce' ), + 'type' => 'text', + 'description' => sprintf( __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: %s.', 'woocommerce' ), $this->heading ), + 'placeholder' => '', + 'default' => '' + ), + 'email_type' => array( + 'title' => __( 'Email type', 'woocommerce' ), + 'type' => 'select', + 'description' => __( 'Choose which format of email to send.', 'woocommerce' ), + 'default' => 'html', + 'class' => 'email_type', + 'options' => array( + 'plain' => __( 'Plain text', 'woocommerce' ), + 'html' => __( 'HTML', 'woocommerce' ), + 'multipart' => __( 'Multipart', 'woocommerce' ), + ) + ) + ); + } +} + +endif; + +return new WC_Email_Cancelled_Order(); diff --git a/templates/emails/admin-cancelled-order.php b/templates/emails/admin-cancelled-order.php new file mode 100644 index 00000000000..094e9195995 --- /dev/null +++ b/templates/emails/admin-cancelled-order.php @@ -0,0 +1,61 @@ + + + + +

id, $order->billing_first_name . ' ' . $order->billing_last_name ); ?>

+ + + +

get_order_number() ); ?> (%s', date_i18n( 'c', strtotime( $order->order_date ) ), date_i18n( wc_date_format(), strtotime( $order->order_date ) ) ); ?>)

+ + + + + + + + + + + email_order_items_table( false, true ); ?> + + + get_order_item_totals() ) { + $i = 0; + foreach ( $totals as $total ) { + $i++; + ?> + + + + +
+ + + + + +

+ +billing_email ) : ?> +

billing_email; ?>

+ +billing_phone ) : ?> +

billing_phone; ?>

+ + + $order ) ); ?> + + diff --git a/templates/emails/plain/admin-cancelled-order.php b/templates/emails/plain/admin-cancelled-order.php new file mode 100644 index 00000000000..3b6b2b64b0a --- /dev/null +++ b/templates/emails/plain/admin-cancelled-order.php @@ -0,0 +1,51 @@ +id, $order->billing_first_name . ' ' . $order->billing_last_name ) . "\n\n"; + +echo "****************************************************\n\n"; + +do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text ); + +echo sprintf( __( 'Order number: %s', 'woocommerce'), $order->get_order_number() ) . "\n"; +echo sprintf( __( 'Order link: %s', 'woocommerce'), admin_url( 'post.php?post=' . $order->id . '&action=edit' ) ) . "\n"; +echo sprintf( __( 'Order date: %s', 'woocommerce'), date_i18n( __( 'jS F Y', 'woocommerce' ), strtotime( $order->order_date ) ) ) . "\n"; + +do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text ); + +echo "\n" . $order->email_order_items_table( false, true, '', '', '', true ); + +echo "----------\n\n"; + +if ( $totals = $order->get_order_item_totals() ) { + foreach ( $totals as $total ) { + echo $total['label'] . "\t " . $total['value'] . "\n"; + } +} + +echo "\n****************************************************\n\n"; + +do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text ); + +echo __( 'Customer details', 'woocommerce' ) . "\n"; + +if ( $order->billing_email ) + echo __( 'Email:', 'woocommerce' ); echo $order->billing_email . "\n"; + +if ( $order->billing_phone ) + echo __( 'Tel:', 'woocommerce' ); ?> billing_phone . "\n"; + +wc_get_template( 'emails/plain/email-addresses.php', array( 'order' => $order ) ); + +echo "\n****************************************************\n\n"; + +echo apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ); diff --git a/woocommerce.php b/woocommerce.php index 4a542159869..b41a15b0309 100644 --- a/woocommerce.php +++ b/woocommerce.php @@ -391,10 +391,12 @@ final class WooCommerce { 'woocommerce_product_on_backorder', 'woocommerce_order_status_pending_to_processing', 'woocommerce_order_status_pending_to_completed', + 'woocommerce_order_status_pending_to_cancelled', 'woocommerce_order_status_pending_to_on-hold', 'woocommerce_order_status_failed_to_processing', 'woocommerce_order_status_failed_to_completed', 'woocommerce_order_status_on-hold_to_processing', + 'woocommerce_order_status_on-hold_to_cancelled', 'woocommerce_order_status_completed', 'woocommerce_new_customer_note', 'woocommerce_created_customer' From 5c04007605e8e46c81f8ef1ba7d8c4baba1345dd Mon Sep 17 00:00:00 2001 From: James Koster Date: Fri, 31 Oct 2014 19:07:00 +0000 Subject: [PATCH 014/743] products settings tab. #6639 --- .../settings/class-wc-settings-products.php | 273 +++++++++--------- 1 file changed, 143 insertions(+), 130 deletions(-) diff --git a/includes/admin/settings/class-wc-settings-products.php b/includes/admin/settings/class-wc-settings-products.php index 80812b097ff..bb993b7fd20 100644 --- a/includes/admin/settings/class-wc-settings-products.php +++ b/includes/admin/settings/class-wc-settings-products.php @@ -41,8 +41,10 @@ class WC_Settings_Products extends WC_Settings_Page { public function get_sections() { $sections = array( - '' => __( 'Product Options', 'woocommerce' ), - 'inventory' => __( 'Inventory', 'woocommerce' ) + '' => __( 'Display', 'woocommerce' ), + 'inventory' => __( 'Inventory', 'woocommerce' ), + 'downloadable' => __( 'Downloadable Products', 'woocommerce' ), + 'reviews' => __( 'Reviews', 'woocommerce' ), ); return apply_filters( 'woocommerce_get_sections_' . $this->id, $sections ); @@ -79,7 +81,46 @@ class WC_Settings_Products extends WC_Settings_Page { $settings = apply_filters( 'woocommerce_inventory_settings', array( - array( 'title' => __( 'Inventory Options', 'woocommerce' ), 'type' => 'title', 'desc' => '', 'id' => 'inventory_options' ), + array( 'title' => __( 'Measurements', 'woocommerce' ), 'type' => 'title', 'id' => 'product_measurement_options' ), + + array( + 'title' => __( 'Weight Unit', 'woocommerce' ), + 'desc' => __( 'This controls what unit you will define weights in.', 'woocommerce' ), + 'id' => 'woocommerce_weight_unit', + 'class' => 'chosen_select', + 'css' => 'min-width:300px;', + 'default' => 'kg', + 'type' => 'select', + 'options' => array( + 'kg' => __( 'kg', 'woocommerce' ), + 'g' => __( 'g', 'woocommerce' ), + 'lbs' => __( 'lbs', 'woocommerce' ), + 'oz' => __( 'oz', 'woocommerce' ), + ), + 'desc_tip' => true, + ), + + array( + 'title' => __( 'Dimensions Unit', 'woocommerce' ), + 'desc' => __( 'This controls what unit you will define lengths in.', 'woocommerce' ), + 'id' => 'woocommerce_dimension_unit', + 'class' => 'chosen_select', + 'css' => 'min-width:300px;', + 'default' => 'cm', + 'type' => 'select', + 'options' => array( + 'm' => __( 'm', 'woocommerce' ), + 'cm' => __( 'cm', 'woocommerce' ), + 'mm' => __( 'mm', 'woocommerce' ), + 'in' => __( 'in', 'woocommerce' ), + 'yd' => __( 'yd', 'woocommerce' ), + ), + 'desc_tip' => true, + ), + + array( 'type' => 'sectionend', 'id' => 'product_measurement_options'), + + array( 'title' => __( 'Inventory', 'woocommerce' ), 'type' => 'title', 'desc' => '', 'id' => 'product_inventory_options' ), array( 'title' => __( 'Manage Stock', 'woocommerce' ), @@ -182,10 +223,104 @@ class WC_Settings_Products extends WC_Settings_Page { 'desc_tip' => true, ), - array( 'type' => 'sectionend', 'id' => 'inventory_options'), + array( 'type' => 'sectionend', 'id' => 'product_inventory_options'), )); + } elseif ( $current_section == 'downloadable' ) { + $settings = apply_filters( 'woocommerce_downloadable_products_settings', array( + array( 'title' => __( 'Downloadable Products', 'woocommerce' ), 'type' => 'title', 'id' => 'digital_download_options' ), + + array( + 'title' => __( 'File Download Method', 'woocommerce' ), + 'desc' => __( 'Forcing downloads will keep URLs hidden, but some servers may serve large files unreliably. If supported, X-Accel-Redirect/ X-Sendfile can be used to serve downloads instead (server requires mod_xsendfile).', 'woocommerce' ), + 'id' => 'woocommerce_file_download_method', + 'type' => 'select', + 'class' => 'chosen_select', + 'css' => 'min-width:300px;', + 'default' => 'force', + 'desc_tip' => true, + 'options' => array( + 'force' => __( 'Force Downloads', 'woocommerce' ), + 'xsendfile' => __( 'X-Accel-Redirect/X-Sendfile', 'woocommerce' ), + 'redirect' => __( 'Redirect only', 'woocommerce' ), + ), + 'autoload' => false + ), + + array( + 'title' => __( 'Access Restriction', 'woocommerce' ), + 'desc' => __( 'Downloads require login', 'woocommerce' ), + 'id' => 'woocommerce_downloads_require_login', + 'type' => 'checkbox', + 'default' => 'no', + 'desc_tip' => __( 'This setting does not apply to guest purchases.', 'woocommerce' ), + 'checkboxgroup' => 'start', + 'autoload' => false + ), + + array( + 'desc' => __( 'Grant access to downloadable products after payment', 'woocommerce' ), + 'id' => 'woocommerce_downloads_grant_access_after_payment', + 'type' => 'checkbox', + 'default' => 'yes', + 'desc_tip' => __( 'Enable this option to grant access to downloads when orders are "processing", rather than "completed".', 'woocommerce' ), + 'checkboxgroup' => 'end', + 'autoload' => false + ), + + array( 'type' => 'sectionend', 'id' => 'digital_download_options' ), + + )); + + } elseif ( $current_section == 'reviews' ) { + $settings = apply_filters( 'woocommerce_reviews_settings', array( + array( 'title' => __( 'Reviews', 'woocommerce' ), 'type' => 'title','desc' => '', 'id' => 'product_rating_options' ), + + array( + 'title' => __( 'Product Ratings', 'woocommerce' ), + 'desc' => __( 'Enable ratings on reviews', 'woocommerce' ), + 'id' => 'woocommerce_enable_review_rating', + 'default' => 'yes', + 'type' => 'checkbox', + 'checkboxgroup' => 'start', + 'show_if_checked' => 'option', + 'autoload' => false + ), + + array( + 'desc' => __( 'Ratings are required to leave a review', 'woocommerce' ), + 'id' => 'woocommerce_review_rating_required', + 'default' => 'yes', + 'type' => 'checkbox', + 'checkboxgroup' => '', + 'show_if_checked' => 'yes', + 'autoload' => false + ), + + array( + 'desc' => __( 'Show "verified owner" label for customer reviews', 'woocommerce' ), + 'id' => 'woocommerce_review_rating_verification_label', + 'default' => 'yes', + 'type' => 'checkbox', + 'checkboxgroup' => '', + 'show_if_checked' => 'yes', + 'autoload' => false + ), + + array( + 'desc' => __( 'Only allow reviews from "verified owners"', 'woocommerce' ), + 'id' => 'woocommerce_review_rating_verification_required', + 'default' => 'no', + 'type' => 'checkbox', + 'checkboxgroup' => 'end', + 'show_if_checked' => 'yes', + 'autoload' => false + ), + + array( 'type' => 'sectionend', 'id' => 'product_rating_options' ), + + )); } else { // Get shop page @@ -201,10 +336,10 @@ class WC_Settings_Products extends WC_Settings_Page { $settings = apply_filters( 'woocommerce_product_settings', array( - array( 'title' => __( 'Product Listings', 'woocommerce' ), 'type' => 'title','desc' => '', 'id' => 'catalog_options' ), + array( 'title' => __( 'Shop & Product Pages', 'woocommerce' ), 'type' => 'title','desc' => '', 'id' => 'catalog_options' ), array( - 'title' => __( 'Product Archive / Shop Page', 'woocommerce' ), + 'title' => __( 'Shop Page', 'woocommerce' ), 'desc' => '
' . sprintf( __( 'The base page can also be used in your product permalinks.', 'woocommerce' ), admin_url( 'options-permalink.php' ) ), 'id' => 'woocommerce_shop_page_id', 'type' => 'single_select_page', @@ -266,7 +401,7 @@ class WC_Settings_Products extends WC_Settings_Page { ), array( - 'title' => __( 'Add to cart', 'woocommerce' ), + 'title' => __( 'Add to cart behaviour', 'woocommerce' ), 'desc' => __( 'Redirect to the cart page after successful addition', 'woocommerce' ), 'id' => 'woocommerce_cart_redirect_after_add', 'default' => 'no', @@ -284,87 +419,7 @@ class WC_Settings_Products extends WC_Settings_Page { array( 'type' => 'sectionend', 'id' => 'catalog_options' ), - array( 'title' => __( 'Product Data', 'woocommerce' ), 'type' => 'title', 'id' => 'product_data_options' ), - - array( - 'title' => __( 'Weight Unit', 'woocommerce' ), - 'desc' => __( 'This controls what unit you will define weights in.', 'woocommerce' ), - 'id' => 'woocommerce_weight_unit', - 'class' => 'chosen_select', - 'css' => 'min-width:300px;', - 'default' => 'kg', - 'type' => 'select', - 'options' => array( - 'kg' => __( 'kg', 'woocommerce' ), - 'g' => __( 'g', 'woocommerce' ), - 'lbs' => __( 'lbs', 'woocommerce' ), - 'oz' => __( 'oz', 'woocommerce' ), - ), - 'desc_tip' => true, - ), - - array( - 'title' => __( 'Dimensions Unit', 'woocommerce' ), - 'desc' => __( 'This controls what unit you will define lengths in.', 'woocommerce' ), - 'id' => 'woocommerce_dimension_unit', - 'class' => 'chosen_select', - 'css' => 'min-width:300px;', - 'default' => 'cm', - 'type' => 'select', - 'options' => array( - 'm' => __( 'm', 'woocommerce' ), - 'cm' => __( 'cm', 'woocommerce' ), - 'mm' => __( 'mm', 'woocommerce' ), - 'in' => __( 'in', 'woocommerce' ), - 'yd' => __( 'yd', 'woocommerce' ), - ), - 'desc_tip' => true, - ), - - array( - 'title' => __( 'Product Ratings', 'woocommerce' ), - 'desc' => __( 'Enable ratings on reviews', 'woocommerce' ), - 'id' => 'woocommerce_enable_review_rating', - 'default' => 'yes', - 'type' => 'checkbox', - 'checkboxgroup' => 'start', - 'show_if_checked' => 'option', - 'autoload' => false - ), - - array( - 'desc' => __( 'Ratings are required to leave a review', 'woocommerce' ), - 'id' => 'woocommerce_review_rating_required', - 'default' => 'yes', - 'type' => 'checkbox', - 'checkboxgroup' => '', - 'show_if_checked' => 'yes', - 'autoload' => false - ), - - array( - 'desc' => __( 'Show "verified owner" label for customer reviews', 'woocommerce' ), - 'id' => 'woocommerce_review_rating_verification_label', - 'default' => 'yes', - 'type' => 'checkbox', - 'checkboxgroup' => '', - 'show_if_checked' => 'yes', - 'autoload' => false - ), - - array( - 'desc' => __( 'Only allow reviews from "verified owners"', 'woocommerce' ), - 'id' => 'woocommerce_review_rating_verification_required', - 'default' => 'no', - 'type' => 'checkbox', - 'checkboxgroup' => 'end', - 'show_if_checked' => 'yes', - 'autoload' => false - ), - - array( 'type' => 'sectionend', 'id' => 'product_data_options' ), - - array( 'title' => __( 'Product Image Sizes', 'woocommerce' ), 'type' => 'title','desc' => sprintf(__( 'These settings affect the actual dimensions of images in your catalog - the display on the front-end will still be affected by CSS styles. After changing these settings you may need to regenerate your thumbnails.', 'woocommerce' ), 'http://wordpress.org/extend/plugins/regenerate-thumbnails/'), 'id' => 'image_options' ), + array( 'title' => __( 'Product Images', 'woocommerce' ), 'type' => 'title','desc' => sprintf(__( 'These settings affect the actual dimensions of images in your catalog - the display on the front-end will still be affected by CSS styles. After changing these settings you may need to regenerate your thumbnails.', 'woocommerce' ), 'http://wordpress.org/extend/plugins/regenerate-thumbnails/'), 'id' => 'image_options' ), array( 'title' => __( 'Catalog Images', 'woocommerce' ), @@ -410,48 +465,6 @@ class WC_Settings_Products extends WC_Settings_Page { array( 'type' => 'sectionend', 'id' => 'image_options' ), - array( 'title' => __( 'Downloadable Products', 'woocommerce' ), 'type' => 'title', 'id' => 'digital_download_options' ), - - array( - 'title' => __( 'File Download Method', 'woocommerce' ), - 'desc' => __( 'Forcing downloads will keep URLs hidden, but some servers may serve large files unreliably. If supported, X-Accel-Redirect/ X-Sendfile can be used to serve downloads instead (server requires mod_xsendfile).', 'woocommerce' ), - 'id' => 'woocommerce_file_download_method', - 'type' => 'select', - 'class' => 'chosen_select', - 'css' => 'min-width:300px;', - 'default' => 'force', - 'desc_tip' => true, - 'options' => array( - 'force' => __( 'Force Downloads', 'woocommerce' ), - 'xsendfile' => __( 'X-Accel-Redirect/X-Sendfile', 'woocommerce' ), - 'redirect' => __( 'Redirect only', 'woocommerce' ), - ), - 'autoload' => false - ), - - array( - 'title' => __( 'Access Restriction', 'woocommerce' ), - 'desc' => __( 'Downloads require login', 'woocommerce' ), - 'id' => 'woocommerce_downloads_require_login', - 'type' => 'checkbox', - 'default' => 'no', - 'desc_tip' => __( 'This setting does not apply to guest purchases.', 'woocommerce' ), - 'checkboxgroup' => 'start', - 'autoload' => false - ), - - array( - 'desc' => __( 'Grant access to downloadable products after payment', 'woocommerce' ), - 'id' => 'woocommerce_downloads_grant_access_after_payment', - 'type' => 'checkbox', - 'default' => 'yes', - 'desc_tip' => __( 'Enable this option to grant access to downloads when orders are "processing", rather than "completed".', 'woocommerce' ), - 'checkboxgroup' => 'end', - 'autoload' => false - ), - - array( 'type' => 'sectionend', 'id' => 'digital_download_options' ), - )); } From 6c4a65dbca96494e27acd600889331e39224606f Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Tue, 4 Nov 2014 00:22:28 -0800 Subject: [PATCH 015/743] Fixed the WooCommerce Status widget links, closes #6685 --- includes/admin/class-wc-admin-dashboard.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/admin/class-wc-admin-dashboard.php b/includes/admin/class-wc-admin-dashboard.php index 38c41060170..8cf1763a909 100644 --- a/includes/admin/class-wc-admin-dashboard.php +++ b/includes/admin/class-wc-admin-dashboard.php @@ -143,12 +143,12 @@ class WC_Admin_Dashboard {
  • - + %s order awaiting processing", "%s orders awaiting processing", $processing_count, 'woocommerce' ), $processing_count ); ?>
  • - + %s order on-hold", "%s orders on-hold", $on_hold_count, 'woocommerce' ), $on_hold_count ); ?>
  • From fbe890646bc1515cd692f15d646d458a9a18deca Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Tue, 4 Nov 2014 09:15:20 -0800 Subject: [PATCH 016/743] Added keyup event for refunds gateway button --- assets/js/admin/meta-boxes-order.js | 2 +- assets/js/admin/meta-boxes-order.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/admin/meta-boxes-order.js b/assets/js/admin/meta-boxes-order.js index 7a67241547b..10b1b684442 100644 --- a/assets/js/admin/meta-boxes-order.js +++ b/assets/js/admin/meta-boxes-order.js @@ -641,7 +641,7 @@ jQuery( function ( $ ) { // Refund actions $( 'body' ) - .on( 'change', '.wc-order-refund-items #refund_amount', function() { + .on( 'change keyup', '.wc-order-refund-items #refund_amount', function() { var total = accounting.unformat( $( this ).val(), woocommerce_admin.mon_decimal_point ); $( 'button .wc-order-refund-amount .amount' ).text( accounting.formatMoney( total, { diff --git a/assets/js/admin/meta-boxes-order.min.js b/assets/js/admin/meta-boxes-order.min.js index 327fdbf63d5..83afe2230e9 100644 --- a/assets/js/admin/meta-boxes-order.min.js +++ b/assets/js/admin/meta-boxes-order.min.js @@ -1 +1 @@ -jQuery(function(a){function b(){a("#woocommerce-order-items").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}})}function c(){a("#woocommerce-order-items").unblock()}function d(){a("#tiptip_holder").removeAttr("style"),a("#tiptip_arrow").removeAttr("style"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}function e(){var e={order_id:woocommerce_admin_meta_boxes.post_id,action:"woocommerce_load_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}a("#woocommerce-order-actions input, #woocommerce-order-actions a").click(function(){window.onbeforeunload=""}),a("a.edit_address").click(function(b){b.preventDefault(),a(this).hide(),a(this).closest(".order_data_column").find("div.address").hide(),a(this).closest(".order_data_column").find("div.edit_address").show()}),a("body").on("click","a.edit-order-item",function(){return a(this).closest("tr").find(".view").hide(),a(this).closest("tr").find(".edit").show(),a(this).hide(),a("button.add-line-item").click(),a("button.cancel-action").attr("data-reload",!0),!1}).on("click",".woocommerce_order_items a.delete-order-item",function(){var d=window.confirm(woocommerce_admin_meta_boxes.remove_item_notice);if(d){var e=a(this).closest("tr.item, tr.fee, tr.shipping"),f=e.attr("data-order_item_id");b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){e.remove(),c()}})}return!1}).on("click","#order_refunds .delete_refund",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_refund)){var c=a(this).closest("tr.refund"),d=c.attr("data-order_refund_id");b();var f={action:"woocommerce_delete_refund",refund_id:d,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(){e()}})}return!1}).on("change",".woocommerce_order_items input.quantity",function(){var b=a(this).closest("tr.item"),c=a(this).val(),d=a(this).attr("data-qty"),e=a("input.line_total",b),f=a("input.line_subtotal",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/d;e.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var h=accounting.unformat(f.attr("data-subtotal"),woocommerce_admin.mon_decimal_point)/d;f.val(parseFloat(accounting.formatNumber(h*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/d;e>0&&b.val(parseFloat(accounting.formatNumber(e*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var f=a("input.line_subtotal_tax",a(this)),g=accounting.unformat(f.attr("data-subtotal_tax"),woocommerce_admin.mon_decimal_point)/d;g>0&&f.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("quantity_changed")}).on("change",".woocommerce_order_items input.refund_order_item_qty",function(){var b=a(this).closest("tr.item"),c=b.find("input.quantity").val(),d=a(this).val(),e=a("input.line_total",b),f=a("input.refund_line_total",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/c;f.val(parseFloat(accounting.formatNumber(g*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=a("input.refund_line_tax",a(this)),f=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/c;f>0&&e.val(parseFloat(accounting.formatNumber(f*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("refund_quantity_changed")}).on("change",".woocommerce_order_items .refund input",function(){var b=0,c=a(".woocommerce_order_items").find("tr.item, tr.fee, tr.shipping");c.each(function(){var c=a(this),d=c.find(".refund input:not(.refund_order_item_qty)");d.each(function(c,d){b+=parseFloat(accounting.unformat(a(d).val()||0,woocommerce_admin.mon_decimal_point))})}),a("#refund_amount").val(accounting.formatNumber(b,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change()}).on("click",".woocommerce_order_items button.add_order_item_meta",function(){var d=a(this),e=d.closest("tr.item"),f={order_item_id:e.attr("data-order_item_id"),action:"woocommerce_add_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(a){e.find("tbody.meta_items").append(a),c()}}),!1}).on("click",".woocommerce_order_items button.remove_order_item_meta",function(){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_meta)){var d=a(this).closest("tr"),e={meta_id:d.attr("data-meta_id"),action:"woocommerce_remove_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(){d.hide(),c()}})}return!1}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){var b=a(this).next();(""===b.val()||b.is(".match-total"))&&b.val(a(this).val()).addClass("match-total")}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){a(this).removeClass("match-total")}),a("#woocommerce-order-items").on("click","button.add-line-item",function(){return a("div.wc-order-add-item").slideDown(),a("div.wc-order-bulk-actions").slideUp(),!1}).on("click","button.refund-items",function(){return a("div.wc-order-refund-items").slideDown(),a("div.wc-order-bulk-actions").slideUp(),a("div.wc-order-totals-items").slideUp(),a("#woocommerce-order-items div.refund").show(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").hide(),!1}).on("click",".cancel-action",function(){return a(this).closest("div.wc-order-data-row").slideUp(),a("div.wc-order-bulk-actions").slideDown(),a("div.wc-order-totals-items").slideDown(),a("#woocommerce-order-items div.refund").hide(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").show(),"true"===a(this).attr("data-reload")&&e(),!1}).on("click","button.add-order-item",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-products"}),!1}).on("click","button.add-order-fee",function(){b();var d={action:"woocommerce_add_order_fee",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_fee_line_items").append(b),c()}),!1}).on("click","button.add-order-shipping",function(){b();var d={action:"woocommerce_add_order_shipping",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_shipping_line_items").append(b),c()}),!1}).on("click","button.add-order-tax",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-tax"}),!1}).on("click","input.check-column",function(){a(this).is(":checked")?a("#woocommerce-order-items").find(".check-column input").attr("checked","checked"):a("#woocommerce-order-items").find(".check-column input").removeAttr("checked")}).on("click",".do_bulk_action",function(){var d=a(this).closest(".bulk-actions").find("select").val(),e=a("#woocommerce-order-items").find(".check-column input:checked"),f=[];if(a(e).each(function(){var b=a(this).closest("tr");b.attr("data-order_item_id")&&f.push(b.attr("data-order_item_id"))}),0===f.length)return void window.alert(woocommerce_admin_meta_boxes.i18n_select_items);if("delete"===d){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_notice)){b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){a(e).each(function(){a(this).closest("tr").remove()}),c()}})}}else if("reduce_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_reduce_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}else if("increase_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_increase_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}return!1}).on("click","button.calculate-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_totals)){b();var c=0,d=0,e=0,f=a("#_order_discount").val()||"0";f=accounting.unformat(f.replace(",",".")),a(".woocommerce_order_items tr.shipping input.line_total").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),e+=parseFloat(b)}),a(".woocommerce_order_items input.line_tax").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),d+=parseFloat(b)}),a(".woocommerce_order_items tr.item, .woocommerce_order_items tr.fee").each(function(){var b=a(this).find("input.line_total").val()||"0";c+=accounting.unformat(b.replace(",","."))}),"yes"===woocommerce_admin_meta_boxes.round_at_subtotal&&(d=parseFloat(accounting.toFixed(d,woocommerce_admin_meta_boxes.rounding_precision))),a("#_order_total").val(accounting.formatNumber(c+d+e-f,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change(),a("button.save-action").click()}return!1}).on("click","button.save-action",function(){var e={order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),action:"woocommerce_save_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}}),a(this).trigger("items_saved"),!1}).on("click","a.delete-order-tax",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_tax)){b();var e={action:"woocommerce_remove_order_tax",rate_id:a(this).attr("data-rate_id"),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}).on("click","button.calculate-tax-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_line_taxes)){b();var e=a("#_shipping_country").val(),f=a("#_billing_country").val(),g=woocommerce_admin_meta_boxes.base_country,h="",i="",j="";e?(g=e,h=a("#_shipping_state").val(),i=a("#_shipping_postcode").val(),j=a("#_shipping_city").val()):f&&(g=f,h=a("#_billing_state").val(),i=a("#_billing_postcode").val(),j=a("#_billing_city").val());var k={action:"woocommerce_calc_line_taxes",order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),country:g,state:h,postcode:i,city:j,security:woocommerce_admin_meta_boxes.calc_totals_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:k,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}),a("body").on("change",".wc-order-refund-items #refund_amount",function(){var b=accounting.unformat(a(this).val(),woocommerce_admin.mon_decimal_point);a("button .wc-order-refund-amount .amount").text(accounting.formatMoney(b,{symbol:woocommerce_admin_meta_boxes.currency_format_symbol,decimal:woocommerce_admin_meta_boxes.currency_format_decimal_sep,thousand:woocommerce_admin_meta_boxes.currency_format_thousand_sep,precision:woocommerce_admin_meta_boxes.currency_format_num_decimals,format:woocommerce_admin_meta_boxes.currency_format}))}).on("click",".wc-order-refund-items button.do-api-refund, .wc-order-refund-items button.do-manual-refund",function(){if(b(),window.confirm(woocommerce_admin_meta_boxes.i18n_do_refund)){var d=a("input#refund_amount").val(),f=a("input#refund_reason").val(),g={},h={},i={};a(".refund input.refund_order_item_qty").each(function(b,c){a(c).closest("tr").data("order_item_id")&&c.value&&(g[a(c).closest("tr").data("order_item_id")]=c.value)}),a(".refund input.refund_line_total").each(function(b,c){a(c).closest("tr").data("order_item_id")&&(h[a(c).closest("tr").data("order_item_id")]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point))}),a(".refund input.refund_line_tax").each(function(b,c){if(a(c).closest("tr").data("order_item_id")){var d=a(c).data("tax_id");i[a(c).closest("tr").data("order_item_id")]||(i[a(c).closest("tr").data("order_item_id")]={}),i[a(c).closest("tr").data("order_item_id")][d]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point)}});var j={action:"woocommerce_refund_line_items",order_id:woocommerce_admin_meta_boxes.post_id,refund_amount:d,refund_reason:f,line_item_qtys:JSON.stringify(g,null,""),line_item_totals:JSON.stringify(h,null,""),line_item_tax_totals:JSON.stringify(i,null,""),api_refund:a(this).is(".do-api-refund"),restock_refunded_items:a("#restock_refunded_items:checked").size()?"true":"false",security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,j,function(a){a===!0?e():a.error?(window.alert(a.error),c()):console.log(a)})}else c()}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-products"===f){var g=a("select#add_item_id").val();if(g){var h=g.length;b(),a.each(g,function(b,e){var f={action:"woocommerce_add_order_item",item_to_add:e,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,f,function(b){a("table.woocommerce_order_items tbody#order_line_items").append(b),--h||(a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","").val(""),d(),a("select#add_item_id").trigger("chosen:updated"),c())})})}else a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","red")}}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-tax"===f){var g=a("#manual_tax_rate_id").val(),h=a("input[name=add_order_tax]:checked").val();if(g&&(h=g),!h)return!1;var i=a(".order-tax-id").map(function(){return a(this).val()}).get();if(-1===a.inArray(h,i)){b();var j={action:"woocommerce_add_order_tax",rate_id:h,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:j,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}else window.alert(woocommerce_admin_meta_boxes.i18n_tax_rate_already_exists)}}),a("span.inline_total").closest(".totals_group").find("input").change(),a(".order_download_permissions").on("click","button.grant_access",function(){var b=a("select#grant_access_id").val();if(b){a(".order_download_permissions").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var c={action:"woocommerce_grant_access_to_download",product_ids:b,loop:a(".order_download_permissions .wc-metabox").size(),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.grant_access_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(b){b?a(".order_download_permissions .wc-metaboxes").append(b):window.alert(woocommerce_admin_meta_boxes.i18n_download_permission_fail),a(".date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,showOn:"button",buttonImage:woocommerce_admin_meta_boxes.calendar_image,buttonImageOnly:!0}),a("#grant_access_id").val("").trigger("chosen:updated"),a(".order_download_permissions").unblock()}),!1}}).on("click","button.revoke_access",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_permission_revoke)){var b=a(this).parent().parent(),c=a(this).attr("rel").split(",")[0],d=a(this).attr("rel").split(",")[1];if(c>0){a(b).block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var e={action:"woocommerce_revoke_access_to_download",product_id:c,download_id:d,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.revoke_access_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,e,function(){a(b).fadeOut("300",function(){a(b).remove()})})}else a(b).fadeOut("300",function(){a(b).remove()})}return!1}),a("button.load_customer_billing").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_billing)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"billing",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_billing_first_name").val(c.billing_first_name),a("input#_billing_last_name").val(c.billing_last_name),a("input#_billing_company").val(c.billing_company),a("input#_billing_address_1").val(c.billing_address_1),a("input#_billing_address_2").val(c.billing_address_2),a("input#_billing_city").val(c.billing_city),a("input#_billing_postcode").val(c.billing_postcode),a("#_billing_country").val(c.billing_country),a("input#_billing_state").val(c.billing_state),a("input#_billing_email").val(c.billing_email),a("input#_billing_phone").val(c.billing_phone)),a(".edit_address").unblock()}})}return!1}),a("button.load_customer_shipping").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_shipping)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"shipping",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_shipping_first_name").val(c.shipping_first_name),a("input#_shipping_last_name").val(c.shipping_last_name),a("input#_shipping_company").val(c.shipping_company),a("input#_shipping_address_1").val(c.shipping_address_1),a("input#_shipping_address_2").val(c.shipping_address_2),a("input#_shipping_city").val(c.shipping_city),a("input#_shipping_postcode").val(c.shipping_postcode),a("#_shipping_country").val(c.shipping_country),a("input#_shipping_state").val(c.shipping_state)),a(".edit_address").unblock()}})}return!1}),a("button.billing-same-as-shipping").on("click",function(){return window.confirm(woocommerce_admin_meta_boxes.copy_billing)&&(a("input#_shipping_first_name").val(a("input#_billing_first_name").val()),a("input#_shipping_last_name").val(a("input#_billing_last_name").val()),a("input#_shipping_company").val(a("input#_billing_company").val()),a("input#_shipping_address_1").val(a("input#_billing_address_1").val()),a("input#_shipping_address_2").val(a("input#_billing_address_2").val()),a("input#_shipping_city").val(a("input#_billing_city").val()),a("input#_shipping_postcode").val(a("input#_billing_postcode").val()),a("#_shipping_country").val(a("#_billing_country").val()),a("input#_shipping_state").val(a("input#_billing_state").val())),!1}),a(".totals_group").on("click","a.add_total_row",function(){return a(this).closest(".totals_group").find(".total_rows").append(a(this).data("row")),!1}),a(".total_rows").on("click","a.delete_total_row",function(){var b=a(this).closest(".total_row"),c=b.attr("data-order_item_id");return c?b.append('').hide():b.remove(),!1}),a("#woocommerce-order-notes").on("click","a.add_note",function(){if(a("textarea#add_order_note").val()){a("#woocommerce-order-notes").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var b={action:"woocommerce_add_order_note",post_id:woocommerce_admin_meta_boxes.post_id,note:a("textarea#add_order_note").val(),note_type:a("select#order_note_type").val(),security:woocommerce_admin_meta_boxes.add_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,b,function(b){a("ul.order_notes").prepend(b),a("#woocommerce-order-notes").unblock(),a("#add_order_note").val("")}),!1}}).on("click","a.delete_note",function(){var b=a(this).closest("li.note");a(b).block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var c={action:"woocommerce_delete_order_note",note_id:a(b).attr("rel"),security:woocommerce_admin_meta_boxes.delete_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(){a(b).remove()}),!1})}); \ No newline at end of file +jQuery(function(a){function b(){a("#woocommerce-order-items").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}})}function c(){a("#woocommerce-order-items").unblock()}function d(){a("#tiptip_holder").removeAttr("style"),a("#tiptip_arrow").removeAttr("style"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}function e(){var e={order_id:woocommerce_admin_meta_boxes.post_id,action:"woocommerce_load_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}a("#woocommerce-order-actions input, #woocommerce-order-actions a").click(function(){window.onbeforeunload=""}),a("a.edit_address").click(function(b){b.preventDefault(),a(this).hide(),a(this).closest(".order_data_column").find("div.address").hide(),a(this).closest(".order_data_column").find("div.edit_address").show()}),a("body").on("click","a.edit-order-item",function(){return a(this).closest("tr").find(".view").hide(),a(this).closest("tr").find(".edit").show(),a(this).hide(),a("button.add-line-item").click(),a("button.cancel-action").attr("data-reload",!0),!1}).on("click",".woocommerce_order_items a.delete-order-item",function(){var d=window.confirm(woocommerce_admin_meta_boxes.remove_item_notice);if(d){var e=a(this).closest("tr.item, tr.fee, tr.shipping"),f=e.attr("data-order_item_id");b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){e.remove(),c()}})}return!1}).on("click","#order_refunds .delete_refund",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_refund)){var c=a(this).closest("tr.refund"),d=c.attr("data-order_refund_id");b();var f={action:"woocommerce_delete_refund",refund_id:d,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(){e()}})}return!1}).on("change",".woocommerce_order_items input.quantity",function(){var b=a(this).closest("tr.item"),c=a(this).val(),d=a(this).attr("data-qty"),e=a("input.line_total",b),f=a("input.line_subtotal",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/d;e.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var h=accounting.unformat(f.attr("data-subtotal"),woocommerce_admin.mon_decimal_point)/d;f.val(parseFloat(accounting.formatNumber(h*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/d;e>0&&b.val(parseFloat(accounting.formatNumber(e*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var f=a("input.line_subtotal_tax",a(this)),g=accounting.unformat(f.attr("data-subtotal_tax"),woocommerce_admin.mon_decimal_point)/d;g>0&&f.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("quantity_changed")}).on("change",".woocommerce_order_items input.refund_order_item_qty",function(){var b=a(this).closest("tr.item"),c=b.find("input.quantity").val(),d=a(this).val(),e=a("input.line_total",b),f=a("input.refund_line_total",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/c;f.val(parseFloat(accounting.formatNumber(g*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=a("input.refund_line_tax",a(this)),f=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/c;f>0&&e.val(parseFloat(accounting.formatNumber(f*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("refund_quantity_changed")}).on("change",".woocommerce_order_items .refund input",function(){var b=0,c=a(".woocommerce_order_items").find("tr.item, tr.fee, tr.shipping");c.each(function(){var c=a(this),d=c.find(".refund input:not(.refund_order_item_qty)");d.each(function(c,d){b+=parseFloat(accounting.unformat(a(d).val()||0,woocommerce_admin.mon_decimal_point))})}),a("#refund_amount").val(accounting.formatNumber(b,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change()}).on("click",".woocommerce_order_items button.add_order_item_meta",function(){var d=a(this),e=d.closest("tr.item"),f={order_item_id:e.attr("data-order_item_id"),action:"woocommerce_add_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(a){e.find("tbody.meta_items").append(a),c()}}),!1}).on("click",".woocommerce_order_items button.remove_order_item_meta",function(){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_meta)){var d=a(this).closest("tr"),e={meta_id:d.attr("data-meta_id"),action:"woocommerce_remove_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(){d.hide(),c()}})}return!1}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){var b=a(this).next();(""===b.val()||b.is(".match-total"))&&b.val(a(this).val()).addClass("match-total")}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){a(this).removeClass("match-total")}),a("#woocommerce-order-items").on("click","button.add-line-item",function(){return a("div.wc-order-add-item").slideDown(),a("div.wc-order-bulk-actions").slideUp(),!1}).on("click","button.refund-items",function(){return a("div.wc-order-refund-items").slideDown(),a("div.wc-order-bulk-actions").slideUp(),a("div.wc-order-totals-items").slideUp(),a("#woocommerce-order-items div.refund").show(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").hide(),!1}).on("click",".cancel-action",function(){return a(this).closest("div.wc-order-data-row").slideUp(),a("div.wc-order-bulk-actions").slideDown(),a("div.wc-order-totals-items").slideDown(),a("#woocommerce-order-items div.refund").hide(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").show(),"true"===a(this).attr("data-reload")&&e(),!1}).on("click","button.add-order-item",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-products"}),!1}).on("click","button.add-order-fee",function(){b();var d={action:"woocommerce_add_order_fee",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_fee_line_items").append(b),c()}),!1}).on("click","button.add-order-shipping",function(){b();var d={action:"woocommerce_add_order_shipping",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_shipping_line_items").append(b),c()}),!1}).on("click","button.add-order-tax",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-tax"}),!1}).on("click","input.check-column",function(){a(this).is(":checked")?a("#woocommerce-order-items").find(".check-column input").attr("checked","checked"):a("#woocommerce-order-items").find(".check-column input").removeAttr("checked")}).on("click",".do_bulk_action",function(){var d=a(this).closest(".bulk-actions").find("select").val(),e=a("#woocommerce-order-items").find(".check-column input:checked"),f=[];if(a(e).each(function(){var b=a(this).closest("tr");b.attr("data-order_item_id")&&f.push(b.attr("data-order_item_id"))}),0===f.length)return void window.alert(woocommerce_admin_meta_boxes.i18n_select_items);if("delete"===d){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_notice)){b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){a(e).each(function(){a(this).closest("tr").remove()}),c()}})}}else if("reduce_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_reduce_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}else if("increase_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_increase_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}return!1}).on("click","button.calculate-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_totals)){b();var c=0,d=0,e=0,f=a("#_order_discount").val()||"0";f=accounting.unformat(f.replace(",",".")),a(".woocommerce_order_items tr.shipping input.line_total").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),e+=parseFloat(b)}),a(".woocommerce_order_items input.line_tax").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),d+=parseFloat(b)}),a(".woocommerce_order_items tr.item, .woocommerce_order_items tr.fee").each(function(){var b=a(this).find("input.line_total").val()||"0";c+=accounting.unformat(b.replace(",","."))}),"yes"===woocommerce_admin_meta_boxes.round_at_subtotal&&(d=parseFloat(accounting.toFixed(d,woocommerce_admin_meta_boxes.rounding_precision))),a("#_order_total").val(accounting.formatNumber(c+d+e-f,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change(),a("button.save-action").click()}return!1}).on("click","button.save-action",function(){var e={order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),action:"woocommerce_save_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}}),a(this).trigger("items_saved"),!1}).on("click","a.delete-order-tax",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_tax)){b();var e={action:"woocommerce_remove_order_tax",rate_id:a(this).attr("data-rate_id"),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}).on("click","button.calculate-tax-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_line_taxes)){b();var e=a("#_shipping_country").val(),f=a("#_billing_country").val(),g=woocommerce_admin_meta_boxes.base_country,h="",i="",j="";e?(g=e,h=a("#_shipping_state").val(),i=a("#_shipping_postcode").val(),j=a("#_shipping_city").val()):f&&(g=f,h=a("#_billing_state").val(),i=a("#_billing_postcode").val(),j=a("#_billing_city").val());var k={action:"woocommerce_calc_line_taxes",order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),country:g,state:h,postcode:i,city:j,security:woocommerce_admin_meta_boxes.calc_totals_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:k,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}),a("body").on("change keyup",".wc-order-refund-items #refund_amount",function(){var b=accounting.unformat(a(this).val(),woocommerce_admin.mon_decimal_point);a("button .wc-order-refund-amount .amount").text(accounting.formatMoney(b,{symbol:woocommerce_admin_meta_boxes.currency_format_symbol,decimal:woocommerce_admin_meta_boxes.currency_format_decimal_sep,thousand:woocommerce_admin_meta_boxes.currency_format_thousand_sep,precision:woocommerce_admin_meta_boxes.currency_format_num_decimals,format:woocommerce_admin_meta_boxes.currency_format}))}).on("click",".wc-order-refund-items button.do-api-refund, .wc-order-refund-items button.do-manual-refund",function(){if(b(),window.confirm(woocommerce_admin_meta_boxes.i18n_do_refund)){var d=a("input#refund_amount").val(),f=a("input#refund_reason").val(),g={},h={},i={};a(".refund input.refund_order_item_qty").each(function(b,c){a(c).closest("tr").data("order_item_id")&&c.value&&(g[a(c).closest("tr").data("order_item_id")]=c.value)}),a(".refund input.refund_line_total").each(function(b,c){a(c).closest("tr").data("order_item_id")&&(h[a(c).closest("tr").data("order_item_id")]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point))}),a(".refund input.refund_line_tax").each(function(b,c){if(a(c).closest("tr").data("order_item_id")){var d=a(c).data("tax_id");i[a(c).closest("tr").data("order_item_id")]||(i[a(c).closest("tr").data("order_item_id")]={}),i[a(c).closest("tr").data("order_item_id")][d]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point)}});var j={action:"woocommerce_refund_line_items",order_id:woocommerce_admin_meta_boxes.post_id,refund_amount:d,refund_reason:f,line_item_qtys:JSON.stringify(g,null,""),line_item_totals:JSON.stringify(h,null,""),line_item_tax_totals:JSON.stringify(i,null,""),api_refund:a(this).is(".do-api-refund"),restock_refunded_items:a("#restock_refunded_items:checked").size()?"true":"false",security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,j,function(a){a===!0?e():a.error?(window.alert(a.error),c()):console.log(a)})}else c()}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-products"===f){var g=a("select#add_item_id").val();if(g){var h=g.length;b(),a.each(g,function(b,e){var f={action:"woocommerce_add_order_item",item_to_add:e,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,f,function(b){a("table.woocommerce_order_items tbody#order_line_items").append(b),--h||(a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","").val(""),d(),a("select#add_item_id").trigger("chosen:updated"),c())})})}else a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","red")}}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-tax"===f){var g=a("#manual_tax_rate_id").val(),h=a("input[name=add_order_tax]:checked").val();if(g&&(h=g),!h)return!1;var i=a(".order-tax-id").map(function(){return a(this).val()}).get();if(-1===a.inArray(h,i)){b();var j={action:"woocommerce_add_order_tax",rate_id:h,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:j,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}else window.alert(woocommerce_admin_meta_boxes.i18n_tax_rate_already_exists)}}),a("span.inline_total").closest(".totals_group").find("input").change(),a(".order_download_permissions").on("click","button.grant_access",function(){var b=a("select#grant_access_id").val();if(b){a(".order_download_permissions").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var c={action:"woocommerce_grant_access_to_download",product_ids:b,loop:a(".order_download_permissions .wc-metabox").size(),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.grant_access_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(b){b?a(".order_download_permissions .wc-metaboxes").append(b):window.alert(woocommerce_admin_meta_boxes.i18n_download_permission_fail),a(".date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,showOn:"button",buttonImage:woocommerce_admin_meta_boxes.calendar_image,buttonImageOnly:!0}),a("#grant_access_id").val("").trigger("chosen:updated"),a(".order_download_permissions").unblock()}),!1}}).on("click","button.revoke_access",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_permission_revoke)){var b=a(this).parent().parent(),c=a(this).attr("rel").split(",")[0],d=a(this).attr("rel").split(",")[1];if(c>0){a(b).block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var e={action:"woocommerce_revoke_access_to_download",product_id:c,download_id:d,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.revoke_access_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,e,function(){a(b).fadeOut("300",function(){a(b).remove()})})}else a(b).fadeOut("300",function(){a(b).remove()})}return!1}),a("button.load_customer_billing").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_billing)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"billing",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_billing_first_name").val(c.billing_first_name),a("input#_billing_last_name").val(c.billing_last_name),a("input#_billing_company").val(c.billing_company),a("input#_billing_address_1").val(c.billing_address_1),a("input#_billing_address_2").val(c.billing_address_2),a("input#_billing_city").val(c.billing_city),a("input#_billing_postcode").val(c.billing_postcode),a("#_billing_country").val(c.billing_country),a("input#_billing_state").val(c.billing_state),a("input#_billing_email").val(c.billing_email),a("input#_billing_phone").val(c.billing_phone)),a(".edit_address").unblock()}})}return!1}),a("button.load_customer_shipping").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_shipping)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"shipping",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_shipping_first_name").val(c.shipping_first_name),a("input#_shipping_last_name").val(c.shipping_last_name),a("input#_shipping_company").val(c.shipping_company),a("input#_shipping_address_1").val(c.shipping_address_1),a("input#_shipping_address_2").val(c.shipping_address_2),a("input#_shipping_city").val(c.shipping_city),a("input#_shipping_postcode").val(c.shipping_postcode),a("#_shipping_country").val(c.shipping_country),a("input#_shipping_state").val(c.shipping_state)),a(".edit_address").unblock()}})}return!1}),a("button.billing-same-as-shipping").on("click",function(){return window.confirm(woocommerce_admin_meta_boxes.copy_billing)&&(a("input#_shipping_first_name").val(a("input#_billing_first_name").val()),a("input#_shipping_last_name").val(a("input#_billing_last_name").val()),a("input#_shipping_company").val(a("input#_billing_company").val()),a("input#_shipping_address_1").val(a("input#_billing_address_1").val()),a("input#_shipping_address_2").val(a("input#_billing_address_2").val()),a("input#_shipping_city").val(a("input#_billing_city").val()),a("input#_shipping_postcode").val(a("input#_billing_postcode").val()),a("#_shipping_country").val(a("#_billing_country").val()),a("input#_shipping_state").val(a("input#_billing_state").val())),!1}),a(".totals_group").on("click","a.add_total_row",function(){return a(this).closest(".totals_group").find(".total_rows").append(a(this).data("row")),!1}),a(".total_rows").on("click","a.delete_total_row",function(){var b=a(this).closest(".total_row"),c=b.attr("data-order_item_id");return c?b.append('').hide():b.remove(),!1}),a("#woocommerce-order-notes").on("click","a.add_note",function(){if(a("textarea#add_order_note").val()){a("#woocommerce-order-notes").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var b={action:"woocommerce_add_order_note",post_id:woocommerce_admin_meta_boxes.post_id,note:a("textarea#add_order_note").val(),note_type:a("select#order_note_type").val(),security:woocommerce_admin_meta_boxes.add_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,b,function(b){a("ul.order_notes").prepend(b),a("#woocommerce-order-notes").unblock(),a("#add_order_note").val("")}),!1}}).on("click","a.delete_note",function(){var b=a(this).closest("li.note");a(b).block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}});var c={action:"woocommerce_delete_order_note",note_id:a(b).attr("rel"),security:woocommerce_admin_meta_boxes.delete_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(){a(b).remove()}),!1})}); \ No newline at end of file From 2f7fcb56aee09a541297e5def2f9190d93e6dcf9 Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Tue, 4 Nov 2014 11:49:15 -0800 Subject: [PATCH 017/743] Improved the Shipping class field in quick edit and bulk edit, closes #6681 --- assets/js/admin/quick-edit.js | 162 +++++++++--------- assets/js/admin/quick-edit.min.js | 2 +- includes/admin/class-wc-admin-menus.php | 7 + includes/admin/class-wc-admin-post-types.php | 23 ++- .../admin/views/html-bulk-edit-product.php | 140 ++++++++------- .../admin/views/html-quick-edit-product.php | 80 +++++---- includes/class-wc-post-types.php | 2 +- readme.txt | 1 + 8 files changed, 237 insertions(+), 180 deletions(-) diff --git a/assets/js/admin/quick-edit.js b/assets/js/admin/quick-edit.js index ad79c0df7f0..4a5e5c6ae34 100644 --- a/assets/js/admin/quick-edit.js +++ b/assets/js/admin/quick-edit.js @@ -1,116 +1,116 @@ -jQuery(function(){ - jQuery('#the-list').on('click', '.editinline', function(){ +/*global inlineEditPost */ +jQuery(function( $ ) { + $( '#the-list' ).on( 'click', '.editinline', function() { inlineEditPost.revert(); - var post_id = jQuery(this).closest('tr').attr('id'); + var post_id = $( this ).closest( 'tr' ).attr( 'id' ); - post_id = post_id.replace("post-", ""); + post_id = post_id.replace( 'post-', '' ); - var $wc_inline_data = jQuery('#woocommerce_inline_' + post_id ); + var $wc_inline_data = $( '#woocommerce_inline_' + post_id ); - var sku = $wc_inline_data.find('.sku').text(); - var regular_price = $wc_inline_data.find('.regular_price').text(); - var sale_price = $wc_inline_data.find('.sale_price').text(); - var weight = $wc_inline_data.find('.weight').text(); - var length = $wc_inline_data.find('.length').text(); - var width = $wc_inline_data.find('.width').text(); - var height = $wc_inline_data.find('.height').text(); - var visibility = $wc_inline_data.find('.visibility').text(); - var stock_status = $wc_inline_data.find('.stock_status').text(); - var stock = $wc_inline_data.find('.stock').text(); - var featured = $wc_inline_data.find('.featured').text(); - var manage_stock = $wc_inline_data.find('.manage_stock').text(); - var menu_order = $wc_inline_data.find('.menu_order').text(); - var tax_status = $wc_inline_data.find('.tax_status').text(); - var tax_class = $wc_inline_data.find('.tax_class').text(); - var backorders = $wc_inline_data.find('.backorders').text(); + var sku = $wc_inline_data.find( '.sku' ).text(), + regular_price = $wc_inline_data.find( '.regular_price' ).text(), + sale_price = $wc_inline_data.find( '.sale_price ').text(), + weight = $wc_inline_data.find( '.weight' ).text(), + length = $wc_inline_data.find( '.length' ).text(), + width = $wc_inline_data.find( '.width' ).text(), + height = $wc_inline_data.find( '.height' ).text(), + shipping_class = $wc_inline_data.find( '.shipping_class' ).text(), + visibility = $wc_inline_data.find( '.visibility' ).text(), + stock_status = $wc_inline_data.find( '.stock_status' ).text(), + stock = $wc_inline_data.find( '.stock' ).text(), + featured = $wc_inline_data.find( '.featured' ).text(), + manage_stock = $wc_inline_data.find( '.manage_stock' ).text(), + menu_order = $wc_inline_data.find( '.menu_order' ).text(), + tax_status = $wc_inline_data.find( '.tax_status' ).text(), + tax_class = $wc_inline_data.find( '.tax_class' ).text(), + backorders = $wc_inline_data.find( '.backorders' ).text(); - jQuery('input[name="_sku"]', '.inline-edit-row').val(sku); - jQuery('input[name="_regular_price"]', '.inline-edit-row').val(regular_price); - jQuery('input[name="_sale_price"]', '.inline-edit-row').val(sale_price); - jQuery('input[name="_weight"]', '.inline-edit-row').val(weight); - jQuery('input[name="_length"]', '.inline-edit-row').val(length); - jQuery('input[name="_width"]', '.inline-edit-row').val(width); - jQuery('input[name="_height"]', '.inline-edit-row').val(height); - jQuery('input[name="_stock"]', '.inline-edit-row').val(stock); - jQuery('input[name="menu_order"]', '.inline-edit-row').val(menu_order); + $( 'input[name="_sku"]', '.inline-edit-row' ).val( sku ); + $( 'input[name="_regular_price"]', '.inline-edit-row' ).val( regular_price ); + $( 'input[name="_sale_price"]', '.inline-edit-row' ).val( sale_price ); + $( 'input[name="_weight"]', '.inline-edit-row' ).val( weight ); + $( 'input[name="_length"]', '.inline-edit-row' ).val( length ); + $( 'input[name="_width"]', '.inline-edit-row' ).val( width ); + $( 'input[name="_height"]', '.inline-edit-row' ).val( height ); - jQuery('select[name="_tax_status"] option[value="' + tax_status + '"]', '.inline-edit-row').attr('selected', 'selected'); - jQuery('select[name="_tax_class"] option[value="' + tax_class + '"]', '.inline-edit-row').attr('selected', 'selected'); + $( 'select[name="_shipping_class"] option:selected', '.inline-edit-row' ).attr( 'selected', false ).change(); + $( 'select[name="_shipping_class"] option[value="' + shipping_class + '"]' ).attr( 'selected', 'selected' ).change(); - jQuery('select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option').removeAttr('selected'); + $( 'input[name="_stock"]', '.inline-edit-row' ).val( stock ); + $( 'input[name="menu_order"]', '.inline-edit-row' ).val( menu_order ); - jQuery('select[name="_visibility"] option[value="' + visibility + '"]', '.inline-edit-row').attr('selected', 'selected'); - jQuery('select[name="_stock_status"] option[value="' + stock_status + '"]', '.inline-edit-row').attr('selected', 'selected'); - jQuery('select[name="_backorders"] option[value="' + backorders + '"]', '.inline-edit-row').attr('selected', 'selected'); + $( 'select[name="_tax_status"] option[value="' + tax_status + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' ); + $( 'select[name="_tax_class"] option[value="' + tax_class + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' ); - if (featured=='yes') { - jQuery('input[name="_featured"]', '.inline-edit-row').attr('checked', 'checked'); + $( 'select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option' ).removeAttr( 'selected' ); + + $( 'select[name="_visibility"] option[value="' + visibility + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' ); + $( 'select[name="_stock_status"] option[value="' + stock_status + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' ); + $( 'select[name="_backorders"] option[value="' + backorders + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' ); + + if ( 'yes' === featured ) { + $( 'input[name="_featured"]', '.inline-edit-row' ).attr( 'checked', 'checked' ); } else { - jQuery('input[name="_featured"]', '.inline-edit-row').removeAttr('checked'); + $( 'input[name="_featured"]', '.inline-edit-row' ).removeAttr( 'checked' ); } - if (manage_stock=='yes') { - jQuery('.stock_qty_field', '.inline-edit-row').show().removeAttr('style'); - jQuery('input[name="_manage_stock"]', '.inline-edit-row').attr('checked', 'checked'); + if ( 'yes' === manage_stock ) { + $( '.stock_qty_field', '.inline-edit-row' ).show().removeAttr( 'style' ); + $( 'input[name="_manage_stock"]', '.inline-edit-row' ).attr( 'checked', 'checked' ); } else { - jQuery('.stock_qty_field', '.inline-edit-row').hide(); - jQuery('input[name="_manage_stock"]', '.inline-edit-row').removeAttr('checked'); + $( '.stock_qty_field', '.inline-edit-row' ).hide(); + $( 'input[name="_manage_stock"]', '.inline-edit-row' ).removeAttr( 'checked' ); } // Conditional display - var product_type = $wc_inline_data.find('.product_type').text(); - var product_is_virtual = $wc_inline_data.find('.product_is_virtual').text(); + var product_type = $wc_inline_data.find( '.product_type' ).text(), + product_is_virtual = $wc_inline_data.find( '.product_is_virtual' ).text(); - if (product_type=='simple' || product_type=='external') { - jQuery('.price_fields', '.inline-edit-row').show().removeAttr('style'); + if ( 'simple' === product_type || 'external' === product_type ) { + $( '.price_fields', '.inline-edit-row' ).show().removeAttr( 'style' ); } else { - jQuery('.price_fields', '.inline-edit-row').hide(); + $( '.price_fields', '.inline-edit-row' ).hide(); } - if (product_is_virtual=='yes') { - jQuery('.dimension_fields', '.inline-edit-row').hide(); + if ( 'yes' === product_is_virtual ) { + $( '.dimension_fields', '.inline-edit-row' ).hide(); } else { - jQuery('.dimension_fields', '.inline-edit-row').show().removeAttr('style'); + $( '.dimension_fields', '.inline-edit-row' ).show().removeAttr( 'style' ); } - if (product_type=='grouped') { - jQuery('.stock_fields', '.inline-edit-row').hide(); + if ( 'grouped' === product_type ) { + $( '.stock_fields', '.inline-edit-row' ).hide(); } else { - jQuery('.stock_fields', '.inline-edit-row').show().removeAttr('style'); + $( '.stock_fields', '.inline-edit-row' ).show().removeAttr( 'style' ); } - }); - - jQuery('#the-list').on('change', '.inline-edit-row input[name="_manage_stock"]', function(){ - - if (jQuery(this).is(':checked')) { - jQuery('.stock_qty_field', '.inline-edit-row').show().removeAttr('style'); - } else { - jQuery('.stock_qty_field', '.inline-edit-row').hide(); - } - - }); - - jQuery('#wpbody').on('click', '#doaction, #doaction2', function(){ - jQuery('input.text', '.inline-edit-row').val(''); - jQuery('#woocommerce-fields select').prop('selectedIndex',0); - jQuery('#woocommerce-fields-bulk .inline-edit-group .alignright').hide(); }); - jQuery('#wpbody').on('change', '#woocommerce-fields-bulk .inline-edit-group .change_to', function(){ + $( '#the-list' ).on( 'change', '.inline-edit-row input[name="_manage_stock"]', function() { - if (jQuery(this).val() > 0) { - jQuery(this).closest('div').find('.alignright').show(); - } else { - jQuery(this).closest('div').find('.alignright').hide(); - } + if ( $( this ).is( ':checked' ) ) { + $( '.stock_qty_field', '.inline-edit-row' ).show().removeAttr( 'style' ); + } else { + $( '.stock_qty_field', '.inline-edit-row' ).hide(); + } - }); + }); - jQuery('.product_shipping_class-checklist input').change(function(){ + $( '#wpbody' ).on( 'click', '#doaction, #doaction2', function() { + $( 'input.text', '.inline-edit-row' ).val( '' ); + $( '#woocommerce-fields select' ).prop( 'selectedIndex', 0 ); + $( '#woocommerce-fields-bulk .inline-edit-group .alignright' ).hide(); + }); - jQuery(this).closest('li').siblings().find('input:checked').removeAttr('checked'); + $( '#wpbody' ).on( 'change', '#woocommerce-fields-bulk .inline-edit-group .change_to', function() { - }); + if ( 0 < $( this ).val() ) { + $( this ).closest( 'div' ).find( '.alignright' ).show(); + } else { + $( this ).closest( 'div' ).find( '.alignright' ).hide(); + } + + }); }); diff --git a/assets/js/admin/quick-edit.min.js b/assets/js/admin/quick-edit.min.js index a3019700aed..0b6ed635097 100644 --- a/assets/js/admin/quick-edit.min.js +++ b/assets/js/admin/quick-edit.min.js @@ -1 +1 @@ -jQuery(function(){jQuery("#the-list").on("click",".editinline",function(){inlineEditPost.revert();var a=jQuery(this).closest("tr").attr("id");a=a.replace("post-","");var b=jQuery("#woocommerce_inline_"+a),c=b.find(".sku").text(),d=b.find(".regular_price").text(),e=b.find(".sale_price").text(),f=b.find(".weight").text(),g=b.find(".length").text(),h=b.find(".width").text(),i=b.find(".height").text(),j=b.find(".visibility").text(),k=b.find(".stock_status").text(),l=b.find(".stock").text(),m=b.find(".featured").text(),n=b.find(".manage_stock").text(),o=b.find(".menu_order").text(),p=b.find(".tax_status").text(),q=b.find(".tax_class").text(),r=b.find(".backorders").text();jQuery('input[name="_sku"]',".inline-edit-row").val(c),jQuery('input[name="_regular_price"]',".inline-edit-row").val(d),jQuery('input[name="_sale_price"]',".inline-edit-row").val(e),jQuery('input[name="_weight"]',".inline-edit-row").val(f),jQuery('input[name="_length"]',".inline-edit-row").val(g),jQuery('input[name="_width"]',".inline-edit-row").val(h),jQuery('input[name="_height"]',".inline-edit-row").val(i),jQuery('input[name="_stock"]',".inline-edit-row").val(l),jQuery('input[name="menu_order"]',".inline-edit-row").val(o),jQuery('select[name="_tax_status"] option[value="'+p+'"]',".inline-edit-row").attr("selected","selected"),jQuery('select[name="_tax_class"] option[value="'+q+'"]',".inline-edit-row").attr("selected","selected"),jQuery('select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option').removeAttr("selected"),jQuery('select[name="_visibility"] option[value="'+j+'"]',".inline-edit-row").attr("selected","selected"),jQuery('select[name="_stock_status"] option[value="'+k+'"]',".inline-edit-row").attr("selected","selected"),jQuery('select[name="_backorders"] option[value="'+r+'"]',".inline-edit-row").attr("selected","selected"),"yes"==m?jQuery('input[name="_featured"]',".inline-edit-row").attr("checked","checked"):jQuery('input[name="_featured"]',".inline-edit-row").removeAttr("checked"),"yes"==n?(jQuery(".stock_qty_field",".inline-edit-row").show().removeAttr("style"),jQuery('input[name="_manage_stock"]',".inline-edit-row").attr("checked","checked")):(jQuery(".stock_qty_field",".inline-edit-row").hide(),jQuery('input[name="_manage_stock"]',".inline-edit-row").removeAttr("checked"));var s=b.find(".product_type").text(),t=b.find(".product_is_virtual").text();"simple"==s||"external"==s?jQuery(".price_fields",".inline-edit-row").show().removeAttr("style"):jQuery(".price_fields",".inline-edit-row").hide(),"yes"==t?jQuery(".dimension_fields",".inline-edit-row").hide():jQuery(".dimension_fields",".inline-edit-row").show().removeAttr("style"),"grouped"==s?jQuery(".stock_fields",".inline-edit-row").hide():jQuery(".stock_fields",".inline-edit-row").show().removeAttr("style")}),jQuery("#the-list").on("change",'.inline-edit-row input[name="_manage_stock"]',function(){jQuery(this).is(":checked")?jQuery(".stock_qty_field",".inline-edit-row").show().removeAttr("style"):jQuery(".stock_qty_field",".inline-edit-row").hide()}),jQuery("#wpbody").on("click","#doaction, #doaction2",function(){jQuery("input.text",".inline-edit-row").val(""),jQuery("#woocommerce-fields select").prop("selectedIndex",0),jQuery("#woocommerce-fields-bulk .inline-edit-group .alignright").hide()}),jQuery("#wpbody").on("change","#woocommerce-fields-bulk .inline-edit-group .change_to",function(){jQuery(this).val()>0?jQuery(this).closest("div").find(".alignright").show():jQuery(this).closest("div").find(".alignright").hide()}),jQuery(".product_shipping_class-checklist input").change(function(){jQuery(this).closest("li").siblings().find("input:checked").removeAttr("checked")})}); \ No newline at end of file +jQuery(function(a){a("#the-list").on("click",".editinline",function(){inlineEditPost.revert();var b=a(this).closest("tr").attr("id");b=b.replace("post-","");var c=a("#woocommerce_inline_"+b),d=c.find(".sku").text(),e=c.find(".regular_price").text(),f=c.find(".sale_price ").text(),g=c.find(".weight").text(),h=c.find(".length").text(),i=c.find(".width").text(),j=c.find(".height").text(),k=c.find(".shipping_class").text(),l=c.find(".visibility").text(),m=c.find(".stock_status").text(),n=c.find(".stock").text(),o=c.find(".featured").text(),p=c.find(".manage_stock").text(),q=c.find(".menu_order").text(),r=c.find(".tax_status").text(),s=c.find(".tax_class").text(),t=c.find(".backorders").text();a('input[name="_sku"]',".inline-edit-row").val(d),a('input[name="_regular_price"]',".inline-edit-row").val(e),a('input[name="_sale_price"]',".inline-edit-row").val(f),a('input[name="_weight"]',".inline-edit-row").val(g),a('input[name="_length"]',".inline-edit-row").val(h),a('input[name="_width"]',".inline-edit-row").val(i),a('input[name="_height"]',".inline-edit-row").val(j),a('select[name="_shipping_class"] option:selected',".inline-edit-row").attr("selected",!1).change(),a('select[name="_shipping_class"] option[value="'+k+'"]').attr("selected","selected").change(),a('input[name="_stock"]',".inline-edit-row").val(n),a('input[name="menu_order"]',".inline-edit-row").val(q),a('select[name="_tax_status"] option[value="'+r+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_tax_class"] option[value="'+s+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option').removeAttr("selected"),a('select[name="_visibility"] option[value="'+l+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_stock_status"] option[value="'+m+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_backorders"] option[value="'+t+'"]',".inline-edit-row").attr("selected","selected"),"yes"===o?a('input[name="_featured"]',".inline-edit-row").attr("checked","checked"):a('input[name="_featured"]',".inline-edit-row").removeAttr("checked"),"yes"===p?(a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"),a('input[name="_manage_stock"]',".inline-edit-row").attr("checked","checked")):(a(".stock_qty_field",".inline-edit-row").hide(),a('input[name="_manage_stock"]',".inline-edit-row").removeAttr("checked"));var u=c.find(".product_type").text(),v=c.find(".product_is_virtual").text();"simple"===u||"external"===u?a(".price_fields",".inline-edit-row").show().removeAttr("style"):a(".price_fields",".inline-edit-row").hide(),"yes"===v?a(".dimension_fields",".inline-edit-row").hide():a(".dimension_fields",".inline-edit-row").show().removeAttr("style"),"grouped"===u?a(".stock_fields",".inline-edit-row").hide():a(".stock_fields",".inline-edit-row").show().removeAttr("style")}),a("#the-list").on("change",'.inline-edit-row input[name="_manage_stock"]',function(){a(this).is(":checked")?a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"):a(".stock_qty_field",".inline-edit-row").hide()}),a("#wpbody").on("click","#doaction, #doaction2",function(){a("input.text",".inline-edit-row").val(""),a("#woocommerce-fields select").prop("selectedIndex",0),a("#woocommerce-fields-bulk .inline-edit-group .alignright").hide()}),a("#wpbody").on("change","#woocommerce-fields-bulk .inline-edit-group .change_to",function(){0taxonomy && $parent_file == 'edit.php?post_type=product' ) { + $submenu_file = 'edit-tags.php?taxonomy=product_shipping_class&post_type=product'; + } } } diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 62fa2156246..cc8df21c259 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -238,7 +238,7 @@ class WC_Admin_Post_Types { echo '
    '; $i = 0; - $action_count = sizeof($actions); + $action_count = sizeof( $actions ); foreach ( $actions as $action => $link ) { ++$i; @@ -260,6 +260,7 @@ class WC_Admin_Post_Types {
    ' . $the_product->length . '
    ' . $the_product->width . '
    ' . $the_product->height . '
    +
    ' . $the_product->get_shipping_class() . '
    ' . $the_product->visibility . '
    ' . $the_product->stock_status . '
    ' . $the_product->stock . '
    @@ -725,7 +726,6 @@ class WC_Admin_Post_Types { /** * Custom bulk edit - form * - * @access public * @param mixed $column_name * @param mixed $post_type */ @@ -734,13 +734,16 @@ class WC_Admin_Post_Types { return; } + $shipping_class = get_terms( 'product_shipping_class', array( + 'hide_empty' => false, + ) ); + include( WC()->plugin_path() . '/includes/admin/views/html-bulk-edit-product.php' ); } /** * Custom quick edit - form * - * @access public * @param mixed $column_name * @param mixed $post_type */ @@ -749,6 +752,10 @@ class WC_Admin_Post_Types { return; } + $shipping_class = get_terms( 'product_shipping_class', array( + 'hide_empty' => false, + ) ); + include( WC()->plugin_path() . '/includes/admin/views/html-quick-edit-product.php' ); } @@ -850,6 +857,10 @@ class WC_Admin_Post_Types { update_post_meta( $post_id, '_height', wc_clean( $_REQUEST['_height'] ) ); } + if ( ! empty( $_REQUEST['_shipping_class'] ) ) { + wp_set_object_terms( $post_id, wc_clean( $_REQUEST['_shipping_class'] ), 'product_shipping_class' ); + } + if ( isset( $_REQUEST['_visibility'] ) ) { if ( update_post_meta( $post_id, '_visibility', wc_clean( $_REQUEST['_visibility'] ) ) ) { do_action( 'woocommerce_product_set_visibility', $post_id, wc_clean( $_REQUEST['_visibility'] ) ); @@ -975,6 +986,12 @@ class WC_Admin_Post_Types { wc_update_product_stock_status( $post_id, wc_clean( $_REQUEST['_stock_status'] ) ); } + if ( ! empty( $_REQUEST['_shipping_class'] ) ) { + $shipping_class = '_no_shipping_class' == $_REQUEST['_shipping_class'] ? '' : wc_clean( $_REQUEST['_shipping_class'] ); + + wp_set_object_terms( $post_id, $shipping_class, 'product_shipping_class' ); + } + if ( ! empty( $_REQUEST['_visibility'] ) ) { if ( update_post_meta( $post_id, '_visibility', wc_clean( $_REQUEST['_visibility'] ) ) ) { do_action( 'woocommerce_product_set_visibility', $post_id, wc_clean( $_REQUEST['_visibility'] ) ); diff --git a/includes/admin/views/html-bulk-edit-product.php b/includes/admin/views/html-bulk-edit-product.php index 605223715c2..6d631785339 100644 --- a/includes/admin/views/html-bulk-edit-product.php +++ b/includes/admin/views/html-bulk-edit-product.php @@ -19,8 +19,8 @@ if ( ! defined( 'ABSPATH' ) ) {
    - +
    '; get_sidebar( 'content' ); break; + case 'twentyfifteen' : + echo ''; + break; default : echo ''; break; diff --git a/templates/global/wrapper-start.php b/templates/global/wrapper-start.php index c519fff2304..762c0af767c 100644 --- a/templates/global/wrapper-start.php +++ b/templates/global/wrapper-start.php @@ -26,6 +26,9 @@ switch( $template ) { case 'twentyfourteen' : echo '
    '; break; + case 'twentyfifteen' : + echo '
    '; + break; default : echo '
    '; break; From 01a1a8f1df2b301a079d581bc5bb90a3515af635 Mon Sep 17 00:00:00 2001 From: James Koster Date: Fri, 21 Nov 2014 10:29:47 +0000 Subject: [PATCH 239/743] twentyfifteen styles. #6797 --- assets/css/woocommerce-layout.css | 2 +- assets/css/woocommerce-layout.scss | 15 +++++++++++++++ templates/global/wrapper-start.php | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/assets/css/woocommerce-layout.css b/assets/css/woocommerce-layout.css index ef19fbdb645..bf78d7a52be 100644 --- a/assets/css/woocommerce-layout.css +++ b/assets/css/woocommerce-layout.css @@ -1 +1 @@ -.woocommerce .col2-set,.woocommerce-page .col2-set{width:100%}.woocommerce .col2-set:after,.woocommerce .col2-set:before,.woocommerce-page .col2-set:after,.woocommerce-page .col2-set:before{content:" ";display:table}.woocommerce .col2-set:after,.woocommerce-page .col2-set:after{clear:both}.woocommerce .col2-set .col-1,.woocommerce-page .col2-set .col-1{float:left;width:48%}.woocommerce .col2-set .col-2,.woocommerce-page .col2-set .col-2{float:right;width:48%}.woocommerce img,.woocommerce-page img{height:auto;max-width:100%}.woocommerce #content div.product div.images,.woocommerce div.product div.images,.woocommerce-page #content div.product div.images,.woocommerce-page div.product div.images{float:left;width:48%}.woocommerce #content div.product div.thumbnails:after,.woocommerce #content div.product div.thumbnails:before,.woocommerce div.product div.thumbnails:after,.woocommerce div.product div.thumbnails:before,.woocommerce-page #content div.product div.thumbnails:after,.woocommerce-page #content div.product div.thumbnails:before,.woocommerce-page div.product div.thumbnails:after,.woocommerce-page div.product div.thumbnails:before{content:" ";display:table}.woocommerce #content div.product div.thumbnails:after,.woocommerce div.product div.thumbnails:after,.woocommerce-page #content div.product div.thumbnails:after,.woocommerce-page div.product div.thumbnails:after{clear:both}.woocommerce #content div.product div.thumbnails a,.woocommerce div.product div.thumbnails a,.woocommerce-page #content div.product div.thumbnails a,.woocommerce-page div.product div.thumbnails a{float:left;width:30.75%;margin-right:3.8%;margin-bottom:1em}.woocommerce #content div.product div.thumbnails a.last,.woocommerce div.product div.thumbnails a.last,.woocommerce-page #content div.product div.thumbnails a.last,.woocommerce-page div.product div.thumbnails a.last{margin-right:0}.woocommerce #content div.product div.thumbnails a.first,.woocommerce div.product div.thumbnails a.first,.woocommerce-page #content div.product div.thumbnails a.first,.woocommerce-page div.product div.thumbnails a.first{clear:both}.woocommerce #content div.product div.thumbnails.columns-1 a,.woocommerce div.product div.thumbnails.columns-1 a,.woocommerce-page #content div.product div.thumbnails.columns-1 a,.woocommerce-page div.product div.thumbnails.columns-1 a{width:100%;margin-right:0;float:none}.woocommerce #content div.product div.thumbnails.columns-2 a,.woocommerce div.product div.thumbnails.columns-2 a,.woocommerce-page #content div.product div.thumbnails.columns-2 a,.woocommerce-page div.product div.thumbnails.columns-2 a{width:48%}.woocommerce #content div.product div.thumbnails.columns-4 a,.woocommerce div.product div.thumbnails.columns-4 a,.woocommerce-page #content div.product div.thumbnails.columns-4 a,.woocommerce-page div.product div.thumbnails.columns-4 a{width:22.05%}.woocommerce #content div.product div.thumbnails.columns-5 a,.woocommerce div.product div.thumbnails.columns-5 a,.woocommerce-page #content div.product div.thumbnails.columns-5 a,.woocommerce-page div.product div.thumbnails.columns-5 a{width:16.9%}.woocommerce #content div.product div.summary,.woocommerce div.product div.summary,.woocommerce-page #content div.product div.summary,.woocommerce-page div.product div.summary{float:right;width:48%}.woocommerce #content div.product .woocommerce-tabs,.woocommerce div.product .woocommerce-tabs,.woocommerce-page #content div.product .woocommerce-tabs,.woocommerce-page div.product .woocommerce-tabs{clear:both}.woocommerce #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce #content div.product .woocommerce-tabs ul.tabs:before,.woocommerce div.product .woocommerce-tabs ul.tabs:after,.woocommerce div.product .woocommerce-tabs ul.tabs:before,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs:before,.woocommerce-page div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page div.product .woocommerce-tabs ul.tabs:before{content:" ";display:table}.woocommerce #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page div.product .woocommerce-tabs ul.tabs:after{clear:both}.woocommerce #content div.product .woocommerce-tabs ul.tabs li,.woocommerce div.product .woocommerce-tabs ul.tabs li,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs li,.woocommerce-page div.product .woocommerce-tabs ul.tabs li{display:inline-block}.woocommerce #content div.product #reviews .comment:after,.woocommerce #content div.product #reviews .comment:before,.woocommerce div.product #reviews .comment:after,.woocommerce div.product #reviews .comment:before,.woocommerce-page #content div.product #reviews .comment:after,.woocommerce-page #content div.product #reviews .comment:before,.woocommerce-page div.product #reviews .comment:after,.woocommerce-page div.product #reviews .comment:before{content:" ";display:table}.woocommerce #content div.product #reviews .comment:after,.woocommerce div.product #reviews .comment:after,.woocommerce-page #content div.product #reviews .comment:after,.woocommerce-page div.product #reviews .comment:after{clear:both}.woocommerce #content div.product #reviews .comment img,.woocommerce div.product #reviews .comment img,.woocommerce-page #content div.product #reviews .comment img,.woocommerce-page div.product #reviews .comment img{float:right;height:auto}.woocommerce .related,.woocommerce .upsells.products,.woocommerce-page .related,.woocommerce-page .upsells.products{clear:both}.woocommerce .related:after,.woocommerce .related:before,.woocommerce .upsells.products:after,.woocommerce .upsells.products:before,.woocommerce-page .related:after,.woocommerce-page .related:before,.woocommerce-page .upsells.products:after,.woocommerce-page .upsells.products:before{content:" ";display:table}.woocommerce .related:after,.woocommerce .upsells.products:after,.woocommerce-page .related:after,.woocommerce-page .upsells.products:after{clear:both}.woocommerce .related ul,.woocommerce .related ul.products,.woocommerce .upsells.products ul,.woocommerce .upsells.products ul.products,.woocommerce-page .related ul,.woocommerce-page .related ul.products,.woocommerce-page .upsells.products ul,.woocommerce-page .upsells.products ul.products{float:none}.woocommerce .related ul li.product,.woocommerce .related ul.products li.product,.woocommerce .upsells.products ul li.product,.woocommerce .upsells.products ul.products li.product,.woocommerce-page .related ul li.product,.woocommerce-page .related ul.products li.product,.woocommerce-page .upsells.products ul li.product,.woocommerce-page .upsells.products ul.products li.product{width:48%}.woocommerce .related ul li.product img,.woocommerce .related ul.products li.product img,.woocommerce .upsells.products ul li.product img,.woocommerce .upsells.products ul.products li.product img,.woocommerce-page .related ul li.product img,.woocommerce-page .related ul.products li.product img,.woocommerce-page .upsells.products ul li.product img,.woocommerce-page .upsells.products ul.products li.product img{width:100%;height:auto}.woocommerce ul.products,.woocommerce-page ul.products{clear:both}.woocommerce ul.products:after,.woocommerce ul.products:before,.woocommerce-page ul.products:after,.woocommerce-page ul.products:before{content:" ";display:table}.woocommerce ul.products:after,.woocommerce-page ul.products:after{clear:both}.woocommerce ul.products li.product,.woocommerce-page ul.products li.product{float:left;margin:0 3.8% 2.992em 0;padding:0;position:relative;width:22.05%}.woocommerce ul.products li.first,.woocommerce-page ul.products li.first{clear:both}.woocommerce ul.products li.last,.woocommerce-page ul.products li.last{margin-right:0}.woocommerce-page.columns-1 ul.products li.product,.woocommerce.columns-1 ul.products li.product{width:100%;margin-right:0}.woocommerce-page.columns-2 ul.products li.product,.woocommerce.columns-2 ul.products li.product{width:48%}.woocommerce-page.columns-3 ul.products li.product,.woocommerce.columns-3 ul.products li.product{width:30.75%}.woocommerce-page.columns-5 ul.products li.product,.woocommerce.columns-5 ul.products li.product{width:16.95%}.woocommerce-page.columns-6 ul.products li.product,.woocommerce.columns-6 ul.products li.product{width:13.5%}.woocommerce .woocommerce-result-count,.woocommerce-page .woocommerce-result-count{float:left}.woocommerce .woocommerce-ordering,.woocommerce-page .woocommerce-ordering{float:right}.woocommerce .woocommerce-pagination ul.page-numbers:after,.woocommerce .woocommerce-pagination ul.page-numbers:before,.woocommerce-page .woocommerce-pagination ul.page-numbers:after,.woocommerce-page .woocommerce-pagination ul.page-numbers:before{content:" ";display:table}.woocommerce .woocommerce-pagination ul.page-numbers:after,.woocommerce-page .woocommerce-pagination ul.page-numbers:after{clear:both}.woocommerce .woocommerce-pagination ul.page-numbers li,.woocommerce-page .woocommerce-pagination ul.page-numbers li{display:inline-block}.woocommerce #content table.cart img,.woocommerce table.cart img,.woocommerce-page #content table.cart img,.woocommerce-page table.cart img{height:auto}.woocommerce #content table.cart td.actions,.woocommerce table.cart td.actions,.woocommerce-page #content table.cart td.actions,.woocommerce-page table.cart td.actions{text-align:right}.woocommerce #content table.cart td.actions .input-text,.woocommerce table.cart td.actions .input-text,.woocommerce-page #content table.cart td.actions .input-text,.woocommerce-page table.cart td.actions .input-text{width:80px}.woocommerce #content table.cart td.actions .coupon,.woocommerce table.cart td.actions .coupon,.woocommerce-page #content table.cart td.actions .coupon,.woocommerce-page table.cart td.actions .coupon{float:left}.woocommerce #content table.cart td.actions .coupon label,.woocommerce table.cart td.actions .coupon label,.woocommerce-page #content table.cart td.actions .coupon label,.woocommerce-page table.cart td.actions .coupon label{display:none}.woocommerce .cart-collaterals,.woocommerce-page .cart-collaterals{width:100%}.woocommerce .cart-collaterals:after,.woocommerce .cart-collaterals:before,.woocommerce-page .cart-collaterals:after,.woocommerce-page .cart-collaterals:before{content:" ";display:table}.woocommerce .cart-collaterals:after,.woocommerce-page .cart-collaterals:after{clear:both}.woocommerce .cart-collaterals .related,.woocommerce-page .cart-collaterals .related{width:30.75%;float:left}.woocommerce .cart-collaterals .cross-sells,.woocommerce-page .cart-collaterals .cross-sells{width:48%;float:left}.woocommerce .cart-collaterals .cross-sells ul.products,.woocommerce-page .cart-collaterals .cross-sells ul.products{float:none}.woocommerce .cart-collaterals .cross-sells ul.products li,.woocommerce-page .cart-collaterals .cross-sells ul.products li{width:48%}.woocommerce .cart-collaterals .shipping_calculator,.woocommerce-page .cart-collaterals .shipping_calculator{width:48%;clear:right;float:right}.woocommerce .cart-collaterals .shipping_calculator:after,.woocommerce .cart-collaterals .shipping_calculator:before,.woocommerce-page .cart-collaterals .shipping_calculator:after,.woocommerce-page .cart-collaterals .shipping_calculator:before{content:" ";display:table}.woocommerce .cart-collaterals .shipping_calculator:after,.woocommerce-page .cart-collaterals .shipping_calculator:after{clear:both}.woocommerce .cart-collaterals .shipping_calculator .col2-set .col-1,.woocommerce .cart-collaterals .shipping_calculator .col2-set .col-2,.woocommerce-page .cart-collaterals .shipping_calculator .col2-set .col-1,.woocommerce-page .cart-collaterals .shipping_calculator .col2-set .col-2{width:47%}.woocommerce .cart-collaterals .cart_totals,.woocommerce-page .cart-collaterals .cart_totals{float:right;width:48%}.woocommerce ul.cart_list li:after,.woocommerce ul.cart_list li:before,.woocommerce ul.product_list_widget li:after,.woocommerce ul.product_list_widget li:before,.woocommerce-page ul.cart_list li:after,.woocommerce-page ul.cart_list li:before,.woocommerce-page ul.product_list_widget li:after,.woocommerce-page ul.product_list_widget li:before{content:" ";display:table}.woocommerce ul.cart_list li:after,.woocommerce ul.product_list_widget li:after,.woocommerce-page ul.cart_list li:after,.woocommerce-page ul.product_list_widget li:after{clear:both}.woocommerce ul.cart_list li img,.woocommerce ul.product_list_widget li img,.woocommerce-page ul.cart_list li img,.woocommerce-page ul.product_list_widget li img{float:right;height:auto}.woocommerce form .form-row:after,.woocommerce form .form-row:before,.woocommerce-page form .form-row:after,.woocommerce-page form .form-row:before{content:" ";display:table}.woocommerce form .form-row:after,.woocommerce-page form .form-row:after{clear:both}.woocommerce form .form-row label,.woocommerce-page form .form-row label{display:block}.woocommerce form .form-row label.checkbox,.woocommerce-page form .form-row label.checkbox{display:inline}.woocommerce form .form-row select,.woocommerce-page form .form-row select{width:100%}.woocommerce form .form-row .input-text,.woocommerce-page form .form-row .input-text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.woocommerce form .form-row-first,.woocommerce form .form-row-last,.woocommerce-page form .form-row-first,.woocommerce-page form .form-row-last{float:left;width:47%;overflow:visible}.woocommerce form .form-row-last,.woocommerce-page form .form-row-last{float:right}.woocommerce form .form-row-wide,.woocommerce-page form .form-row-wide{clear:both}.woocommerce #payment .form-row select,.woocommerce-page #payment .form-row select{width:auto}.woocommerce #payment .terms,.woocommerce-page #payment .terms{text-align:right;padding:0 1em}.woocommerce #payment #place_order,.woocommerce-page #payment #place_order{float:right}.twentyfourteen .tfwc{padding:12px 10px 0;max-width:474px;margin:0 auto}.twentyfourteen .tfwc .product .entry-summary{padding:0!important;margin:0 0 1.618em!important}.twentyfourteen .tfwc div.product.hentry.has-post-thumbnail{margin-top:0}.twentyfourteen .tfwc .product .images img{margin-bottom:1em}@media screen and (min-width:673px){.twentyfourteen .tfwc{padding-right:30px;padding-left:30px}}@media screen and (min-width:1040px){.twentyfourteen .tfwc{padding-right:15px;padding-left:15px}}@media screen and (min-width:1110px){.twentyfourteen .tfwc{padding-right:30px;padding-left:30px}}@media screen and (min-width:1218px){.twentyfourteen .tfwc{margin-right:54px}.full-width .twentyfourteen .tfwc{margin-right:auto}} \ No newline at end of file +.woocommerce .col2-set,.woocommerce-page .col2-set{width:100%}.woocommerce .col2-set:after,.woocommerce .col2-set:before,.woocommerce-page .col2-set:after,.woocommerce-page .col2-set:before{content:" ";display:table}.woocommerce .col2-set:after,.woocommerce-page .col2-set:after{clear:both}.woocommerce .col2-set .col-1,.woocommerce-page .col2-set .col-1{float:left;width:48%}.woocommerce .col2-set .col-2,.woocommerce-page .col2-set .col-2{float:right;width:48%}.woocommerce img,.woocommerce-page img{height:auto;max-width:100%}.woocommerce #content div.product div.images,.woocommerce div.product div.images,.woocommerce-page #content div.product div.images,.woocommerce-page div.product div.images{float:left;width:48%}.woocommerce #content div.product div.thumbnails:after,.woocommerce #content div.product div.thumbnails:before,.woocommerce div.product div.thumbnails:after,.woocommerce div.product div.thumbnails:before,.woocommerce-page #content div.product div.thumbnails:after,.woocommerce-page #content div.product div.thumbnails:before,.woocommerce-page div.product div.thumbnails:after,.woocommerce-page div.product div.thumbnails:before{content:" ";display:table}.woocommerce #content div.product div.thumbnails:after,.woocommerce div.product div.thumbnails:after,.woocommerce-page #content div.product div.thumbnails:after,.woocommerce-page div.product div.thumbnails:after{clear:both}.woocommerce #content div.product div.thumbnails a,.woocommerce div.product div.thumbnails a,.woocommerce-page #content div.product div.thumbnails a,.woocommerce-page div.product div.thumbnails a{float:left;width:30.75%;margin-right:3.8%;margin-bottom:1em}.woocommerce #content div.product div.thumbnails a.last,.woocommerce div.product div.thumbnails a.last,.woocommerce-page #content div.product div.thumbnails a.last,.woocommerce-page div.product div.thumbnails a.last{margin-right:0}.woocommerce #content div.product div.thumbnails a.first,.woocommerce div.product div.thumbnails a.first,.woocommerce-page #content div.product div.thumbnails a.first,.woocommerce-page div.product div.thumbnails a.first{clear:both}.woocommerce #content div.product div.thumbnails.columns-1 a,.woocommerce div.product div.thumbnails.columns-1 a,.woocommerce-page #content div.product div.thumbnails.columns-1 a,.woocommerce-page div.product div.thumbnails.columns-1 a{width:100%;margin-right:0;float:none}.woocommerce #content div.product div.thumbnails.columns-2 a,.woocommerce div.product div.thumbnails.columns-2 a,.woocommerce-page #content div.product div.thumbnails.columns-2 a,.woocommerce-page div.product div.thumbnails.columns-2 a{width:48%}.woocommerce #content div.product div.thumbnails.columns-4 a,.woocommerce div.product div.thumbnails.columns-4 a,.woocommerce-page #content div.product div.thumbnails.columns-4 a,.woocommerce-page div.product div.thumbnails.columns-4 a{width:22.05%}.woocommerce #content div.product div.thumbnails.columns-5 a,.woocommerce div.product div.thumbnails.columns-5 a,.woocommerce-page #content div.product div.thumbnails.columns-5 a,.woocommerce-page div.product div.thumbnails.columns-5 a{width:16.9%}.woocommerce #content div.product div.summary,.woocommerce div.product div.summary,.woocommerce-page #content div.product div.summary,.woocommerce-page div.product div.summary{float:right;width:48%}.woocommerce #content div.product .woocommerce-tabs,.woocommerce div.product .woocommerce-tabs,.woocommerce-page #content div.product .woocommerce-tabs,.woocommerce-page div.product .woocommerce-tabs{clear:both}.woocommerce #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce #content div.product .woocommerce-tabs ul.tabs:before,.woocommerce div.product .woocommerce-tabs ul.tabs:after,.woocommerce div.product .woocommerce-tabs ul.tabs:before,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs:before,.woocommerce-page div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page div.product .woocommerce-tabs ul.tabs:before{content:" ";display:table}.woocommerce #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page div.product .woocommerce-tabs ul.tabs:after{clear:both}.woocommerce #content div.product .woocommerce-tabs ul.tabs li,.woocommerce div.product .woocommerce-tabs ul.tabs li,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs li,.woocommerce-page div.product .woocommerce-tabs ul.tabs li{display:inline-block}.woocommerce #content div.product #reviews .comment:after,.woocommerce #content div.product #reviews .comment:before,.woocommerce div.product #reviews .comment:after,.woocommerce div.product #reviews .comment:before,.woocommerce-page #content div.product #reviews .comment:after,.woocommerce-page #content div.product #reviews .comment:before,.woocommerce-page div.product #reviews .comment:after,.woocommerce-page div.product #reviews .comment:before{content:" ";display:table}.woocommerce #content div.product #reviews .comment:after,.woocommerce div.product #reviews .comment:after,.woocommerce-page #content div.product #reviews .comment:after,.woocommerce-page div.product #reviews .comment:after{clear:both}.woocommerce #content div.product #reviews .comment img,.woocommerce div.product #reviews .comment img,.woocommerce-page #content div.product #reviews .comment img,.woocommerce-page div.product #reviews .comment img{float:right;height:auto}.woocommerce .related,.woocommerce .upsells.products,.woocommerce-page .related,.woocommerce-page .upsells.products{clear:both}.woocommerce .related:after,.woocommerce .related:before,.woocommerce .upsells.products:after,.woocommerce .upsells.products:before,.woocommerce-page .related:after,.woocommerce-page .related:before,.woocommerce-page .upsells.products:after,.woocommerce-page .upsells.products:before{content:" ";display:table}.woocommerce .related:after,.woocommerce .upsells.products:after,.woocommerce-page .related:after,.woocommerce-page .upsells.products:after{clear:both}.woocommerce .related ul,.woocommerce .related ul.products,.woocommerce .upsells.products ul,.woocommerce .upsells.products ul.products,.woocommerce-page .related ul,.woocommerce-page .related ul.products,.woocommerce-page .upsells.products ul,.woocommerce-page .upsells.products ul.products{float:none}.woocommerce .related ul li.product,.woocommerce .related ul.products li.product,.woocommerce .upsells.products ul li.product,.woocommerce .upsells.products ul.products li.product,.woocommerce-page .related ul li.product,.woocommerce-page .related ul.products li.product,.woocommerce-page .upsells.products ul li.product,.woocommerce-page .upsells.products ul.products li.product{width:48%}.woocommerce .related ul li.product img,.woocommerce .related ul.products li.product img,.woocommerce .upsells.products ul li.product img,.woocommerce .upsells.products ul.products li.product img,.woocommerce-page .related ul li.product img,.woocommerce-page .related ul.products li.product img,.woocommerce-page .upsells.products ul li.product img,.woocommerce-page .upsells.products ul.products li.product img{width:100%;height:auto}.woocommerce ul.products,.woocommerce-page ul.products{clear:both}.woocommerce ul.products:after,.woocommerce ul.products:before,.woocommerce-page ul.products:after,.woocommerce-page ul.products:before{content:" ";display:table}.woocommerce ul.products:after,.woocommerce-page ul.products:after{clear:both}.woocommerce ul.products li.product,.woocommerce-page ul.products li.product{float:left;margin:0 3.8% 2.992em 0;padding:0;position:relative;width:22.05%}.woocommerce ul.products li.first,.woocommerce-page ul.products li.first{clear:both}.woocommerce ul.products li.last,.woocommerce-page ul.products li.last{margin-right:0}.woocommerce-page.columns-1 ul.products li.product,.woocommerce.columns-1 ul.products li.product{width:100%;margin-right:0}.woocommerce-page.columns-2 ul.products li.product,.woocommerce.columns-2 ul.products li.product{width:48%}.woocommerce-page.columns-3 ul.products li.product,.woocommerce.columns-3 ul.products li.product{width:30.75%}.woocommerce-page.columns-5 ul.products li.product,.woocommerce.columns-5 ul.products li.product{width:16.95%}.woocommerce-page.columns-6 ul.products li.product,.woocommerce.columns-6 ul.products li.product{width:13.5%}.woocommerce .woocommerce-result-count,.woocommerce-page .woocommerce-result-count{float:left}.woocommerce .woocommerce-ordering,.woocommerce-page .woocommerce-ordering{float:right}.woocommerce .woocommerce-pagination ul.page-numbers:after,.woocommerce .woocommerce-pagination ul.page-numbers:before,.woocommerce-page .woocommerce-pagination ul.page-numbers:after,.woocommerce-page .woocommerce-pagination ul.page-numbers:before{content:" ";display:table}.woocommerce .woocommerce-pagination ul.page-numbers:after,.woocommerce-page .woocommerce-pagination ul.page-numbers:after{clear:both}.woocommerce .woocommerce-pagination ul.page-numbers li,.woocommerce-page .woocommerce-pagination ul.page-numbers li{display:inline-block}.woocommerce #content table.cart img,.woocommerce table.cart img,.woocommerce-page #content table.cart img,.woocommerce-page table.cart img{height:auto}.woocommerce #content table.cart td.actions,.woocommerce table.cart td.actions,.woocommerce-page #content table.cart td.actions,.woocommerce-page table.cart td.actions{text-align:right}.woocommerce #content table.cart td.actions .input-text,.woocommerce table.cart td.actions .input-text,.woocommerce-page #content table.cart td.actions .input-text,.woocommerce-page table.cart td.actions .input-text{width:80px}.woocommerce #content table.cart td.actions .coupon,.woocommerce table.cart td.actions .coupon,.woocommerce-page #content table.cart td.actions .coupon,.woocommerce-page table.cart td.actions .coupon{float:left}.woocommerce #content table.cart td.actions .coupon label,.woocommerce table.cart td.actions .coupon label,.woocommerce-page #content table.cart td.actions .coupon label,.woocommerce-page table.cart td.actions .coupon label{display:none}.woocommerce .cart-collaterals,.woocommerce-page .cart-collaterals{width:100%}.woocommerce .cart-collaterals:after,.woocommerce .cart-collaterals:before,.woocommerce-page .cart-collaterals:after,.woocommerce-page .cart-collaterals:before{content:" ";display:table}.woocommerce .cart-collaterals:after,.woocommerce-page .cart-collaterals:after{clear:both}.woocommerce .cart-collaterals .related,.woocommerce-page .cart-collaterals .related{width:30.75%;float:left}.woocommerce .cart-collaterals .cross-sells,.woocommerce-page .cart-collaterals .cross-sells{width:48%;float:left}.woocommerce .cart-collaterals .cross-sells ul.products,.woocommerce-page .cart-collaterals .cross-sells ul.products{float:none}.woocommerce .cart-collaterals .cross-sells ul.products li,.woocommerce-page .cart-collaterals .cross-sells ul.products li{width:48%}.woocommerce .cart-collaterals .shipping_calculator,.woocommerce-page .cart-collaterals .shipping_calculator{width:48%;clear:right;float:right}.woocommerce .cart-collaterals .shipping_calculator:after,.woocommerce .cart-collaterals .shipping_calculator:before,.woocommerce-page .cart-collaterals .shipping_calculator:after,.woocommerce-page .cart-collaterals .shipping_calculator:before{content:" ";display:table}.woocommerce .cart-collaterals .shipping_calculator:after,.woocommerce-page .cart-collaterals .shipping_calculator:after{clear:both}.woocommerce .cart-collaterals .shipping_calculator .col2-set .col-1,.woocommerce .cart-collaterals .shipping_calculator .col2-set .col-2,.woocommerce-page .cart-collaterals .shipping_calculator .col2-set .col-1,.woocommerce-page .cart-collaterals .shipping_calculator .col2-set .col-2{width:47%}.woocommerce .cart-collaterals .cart_totals,.woocommerce-page .cart-collaterals .cart_totals{float:right;width:48%}.woocommerce ul.cart_list li:after,.woocommerce ul.cart_list li:before,.woocommerce ul.product_list_widget li:after,.woocommerce ul.product_list_widget li:before,.woocommerce-page ul.cart_list li:after,.woocommerce-page ul.cart_list li:before,.woocommerce-page ul.product_list_widget li:after,.woocommerce-page ul.product_list_widget li:before{content:" ";display:table}.woocommerce ul.cart_list li:after,.woocommerce ul.product_list_widget li:after,.woocommerce-page ul.cart_list li:after,.woocommerce-page ul.product_list_widget li:after{clear:both}.woocommerce ul.cart_list li img,.woocommerce ul.product_list_widget li img,.woocommerce-page ul.cart_list li img,.woocommerce-page ul.product_list_widget li img{float:right;height:auto}.woocommerce form .form-row:after,.woocommerce form .form-row:before,.woocommerce-page form .form-row:after,.woocommerce-page form .form-row:before{content:" ";display:table}.woocommerce form .form-row:after,.woocommerce-page form .form-row:after{clear:both}.woocommerce form .form-row label,.woocommerce-page form .form-row label{display:block}.woocommerce form .form-row label.checkbox,.woocommerce-page form .form-row label.checkbox{display:inline}.woocommerce form .form-row select,.woocommerce-page form .form-row select{width:100%}.woocommerce form .form-row .input-text,.woocommerce-page form .form-row .input-text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.woocommerce form .form-row-first,.woocommerce form .form-row-last,.woocommerce-page form .form-row-first,.woocommerce-page form .form-row-last{float:left;width:47%;overflow:visible}.woocommerce form .form-row-last,.woocommerce-page form .form-row-last{float:right}.woocommerce form .form-row-wide,.woocommerce-page form .form-row-wide{clear:both}.woocommerce #payment .form-row select,.woocommerce-page #payment .form-row select{width:auto}.woocommerce #payment .terms,.woocommerce-page #payment .terms{text-align:right;padding:0 1em}.woocommerce #payment #place_order,.woocommerce-page #payment #place_order{float:right}.twentyfourteen .tfwc{padding:12px 10px 0;max-width:474px;margin:0 auto}.twentyfourteen .tfwc .product .entry-summary{padding:0!important;margin:0 0 1.618em!important}.twentyfourteen .tfwc div.product.hentry.has-post-thumbnail{margin-top:0}.twentyfourteen .tfwc .product .images img{margin-bottom:1em}@media screen and (min-width:673px){.twentyfourteen .tfwc{padding-right:30px;padding-left:30px}}@media screen and (min-width:1040px){.twentyfourteen .tfwc{padding-right:15px;padding-left:15px}}@media screen and (min-width:1110px){.twentyfourteen .tfwc{padding-right:30px;padding-left:30px}}@media screen and (min-width:1218px){.twentyfourteen .tfwc{margin-right:54px}.full-width .twentyfourteen .tfwc{margin-right:auto}}@media screen and (min-width:59.6875em){.twentyfifteen .t15wc{margin:0 8.3333%}.twentyfifteen .t15wc .page-title{margin-left:0}} \ No newline at end of file diff --git a/assets/css/woocommerce-layout.scss b/assets/css/woocommerce-layout.scss index 2cca04a0267..967ff90ab63 100644 --- a/assets/css/woocommerce-layout.scss +++ b/assets/css/woocommerce-layout.scss @@ -417,3 +417,18 @@ } } } + +/** + * Twenty Fifteen specific styles + */ +@media screen and (min-width: 59.6875em) { + .twentyfifteen { + .t15wc { + margin: 0 8.3333%; + + .page-title { + margin-left: 0; + } + } + } +} \ No newline at end of file diff --git a/templates/global/wrapper-start.php b/templates/global/wrapper-start.php index 762c0af767c..2fb3a9603c8 100644 --- a/templates/global/wrapper-start.php +++ b/templates/global/wrapper-start.php @@ -27,7 +27,7 @@ switch( $template ) { echo '
    '; break; case 'twentyfifteen' : - echo '
    '; + echo '
    '; break; default : echo '
    '; From f6f57d1848eaaee293fdccd7287cc00ce98f5cce Mon Sep 17 00:00:00 2001 From: James Koster Date: Fri, 21 Nov 2014 10:51:08 +0000 Subject: [PATCH 240/743] twenty fifteen styles. closes #6797 --- assets/css/woocommerce-layout.css | 2 +- assets/css/woocommerce-layout.scss | 35 +++++++++++++++++++++++++++--- assets/css/woocommerce.css | 2 +- assets/css/woocommerce.scss | 1 + 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/assets/css/woocommerce-layout.css b/assets/css/woocommerce-layout.css index bf78d7a52be..b00c03855c6 100644 --- a/assets/css/woocommerce-layout.css +++ b/assets/css/woocommerce-layout.css @@ -1 +1 @@ -.woocommerce .col2-set,.woocommerce-page .col2-set{width:100%}.woocommerce .col2-set:after,.woocommerce .col2-set:before,.woocommerce-page .col2-set:after,.woocommerce-page .col2-set:before{content:" ";display:table}.woocommerce .col2-set:after,.woocommerce-page .col2-set:after{clear:both}.woocommerce .col2-set .col-1,.woocommerce-page .col2-set .col-1{float:left;width:48%}.woocommerce .col2-set .col-2,.woocommerce-page .col2-set .col-2{float:right;width:48%}.woocommerce img,.woocommerce-page img{height:auto;max-width:100%}.woocommerce #content div.product div.images,.woocommerce div.product div.images,.woocommerce-page #content div.product div.images,.woocommerce-page div.product div.images{float:left;width:48%}.woocommerce #content div.product div.thumbnails:after,.woocommerce #content div.product div.thumbnails:before,.woocommerce div.product div.thumbnails:after,.woocommerce div.product div.thumbnails:before,.woocommerce-page #content div.product div.thumbnails:after,.woocommerce-page #content div.product div.thumbnails:before,.woocommerce-page div.product div.thumbnails:after,.woocommerce-page div.product div.thumbnails:before{content:" ";display:table}.woocommerce #content div.product div.thumbnails:after,.woocommerce div.product div.thumbnails:after,.woocommerce-page #content div.product div.thumbnails:after,.woocommerce-page div.product div.thumbnails:after{clear:both}.woocommerce #content div.product div.thumbnails a,.woocommerce div.product div.thumbnails a,.woocommerce-page #content div.product div.thumbnails a,.woocommerce-page div.product div.thumbnails a{float:left;width:30.75%;margin-right:3.8%;margin-bottom:1em}.woocommerce #content div.product div.thumbnails a.last,.woocommerce div.product div.thumbnails a.last,.woocommerce-page #content div.product div.thumbnails a.last,.woocommerce-page div.product div.thumbnails a.last{margin-right:0}.woocommerce #content div.product div.thumbnails a.first,.woocommerce div.product div.thumbnails a.first,.woocommerce-page #content div.product div.thumbnails a.first,.woocommerce-page div.product div.thumbnails a.first{clear:both}.woocommerce #content div.product div.thumbnails.columns-1 a,.woocommerce div.product div.thumbnails.columns-1 a,.woocommerce-page #content div.product div.thumbnails.columns-1 a,.woocommerce-page div.product div.thumbnails.columns-1 a{width:100%;margin-right:0;float:none}.woocommerce #content div.product div.thumbnails.columns-2 a,.woocommerce div.product div.thumbnails.columns-2 a,.woocommerce-page #content div.product div.thumbnails.columns-2 a,.woocommerce-page div.product div.thumbnails.columns-2 a{width:48%}.woocommerce #content div.product div.thumbnails.columns-4 a,.woocommerce div.product div.thumbnails.columns-4 a,.woocommerce-page #content div.product div.thumbnails.columns-4 a,.woocommerce-page div.product div.thumbnails.columns-4 a{width:22.05%}.woocommerce #content div.product div.thumbnails.columns-5 a,.woocommerce div.product div.thumbnails.columns-5 a,.woocommerce-page #content div.product div.thumbnails.columns-5 a,.woocommerce-page div.product div.thumbnails.columns-5 a{width:16.9%}.woocommerce #content div.product div.summary,.woocommerce div.product div.summary,.woocommerce-page #content div.product div.summary,.woocommerce-page div.product div.summary{float:right;width:48%}.woocommerce #content div.product .woocommerce-tabs,.woocommerce div.product .woocommerce-tabs,.woocommerce-page #content div.product .woocommerce-tabs,.woocommerce-page div.product .woocommerce-tabs{clear:both}.woocommerce #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce #content div.product .woocommerce-tabs ul.tabs:before,.woocommerce div.product .woocommerce-tabs ul.tabs:after,.woocommerce div.product .woocommerce-tabs ul.tabs:before,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs:before,.woocommerce-page div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page div.product .woocommerce-tabs ul.tabs:before{content:" ";display:table}.woocommerce #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page div.product .woocommerce-tabs ul.tabs:after{clear:both}.woocommerce #content div.product .woocommerce-tabs ul.tabs li,.woocommerce div.product .woocommerce-tabs ul.tabs li,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs li,.woocommerce-page div.product .woocommerce-tabs ul.tabs li{display:inline-block}.woocommerce #content div.product #reviews .comment:after,.woocommerce #content div.product #reviews .comment:before,.woocommerce div.product #reviews .comment:after,.woocommerce div.product #reviews .comment:before,.woocommerce-page #content div.product #reviews .comment:after,.woocommerce-page #content div.product #reviews .comment:before,.woocommerce-page div.product #reviews .comment:after,.woocommerce-page div.product #reviews .comment:before{content:" ";display:table}.woocommerce #content div.product #reviews .comment:after,.woocommerce div.product #reviews .comment:after,.woocommerce-page #content div.product #reviews .comment:after,.woocommerce-page div.product #reviews .comment:after{clear:both}.woocommerce #content div.product #reviews .comment img,.woocommerce div.product #reviews .comment img,.woocommerce-page #content div.product #reviews .comment img,.woocommerce-page div.product #reviews .comment img{float:right;height:auto}.woocommerce .related,.woocommerce .upsells.products,.woocommerce-page .related,.woocommerce-page .upsells.products{clear:both}.woocommerce .related:after,.woocommerce .related:before,.woocommerce .upsells.products:after,.woocommerce .upsells.products:before,.woocommerce-page .related:after,.woocommerce-page .related:before,.woocommerce-page .upsells.products:after,.woocommerce-page .upsells.products:before{content:" ";display:table}.woocommerce .related:after,.woocommerce .upsells.products:after,.woocommerce-page .related:after,.woocommerce-page .upsells.products:after{clear:both}.woocommerce .related ul,.woocommerce .related ul.products,.woocommerce .upsells.products ul,.woocommerce .upsells.products ul.products,.woocommerce-page .related ul,.woocommerce-page .related ul.products,.woocommerce-page .upsells.products ul,.woocommerce-page .upsells.products ul.products{float:none}.woocommerce .related ul li.product,.woocommerce .related ul.products li.product,.woocommerce .upsells.products ul li.product,.woocommerce .upsells.products ul.products li.product,.woocommerce-page .related ul li.product,.woocommerce-page .related ul.products li.product,.woocommerce-page .upsells.products ul li.product,.woocommerce-page .upsells.products ul.products li.product{width:48%}.woocommerce .related ul li.product img,.woocommerce .related ul.products li.product img,.woocommerce .upsells.products ul li.product img,.woocommerce .upsells.products ul.products li.product img,.woocommerce-page .related ul li.product img,.woocommerce-page .related ul.products li.product img,.woocommerce-page .upsells.products ul li.product img,.woocommerce-page .upsells.products ul.products li.product img{width:100%;height:auto}.woocommerce ul.products,.woocommerce-page ul.products{clear:both}.woocommerce ul.products:after,.woocommerce ul.products:before,.woocommerce-page ul.products:after,.woocommerce-page ul.products:before{content:" ";display:table}.woocommerce ul.products:after,.woocommerce-page ul.products:after{clear:both}.woocommerce ul.products li.product,.woocommerce-page ul.products li.product{float:left;margin:0 3.8% 2.992em 0;padding:0;position:relative;width:22.05%}.woocommerce ul.products li.first,.woocommerce-page ul.products li.first{clear:both}.woocommerce ul.products li.last,.woocommerce-page ul.products li.last{margin-right:0}.woocommerce-page.columns-1 ul.products li.product,.woocommerce.columns-1 ul.products li.product{width:100%;margin-right:0}.woocommerce-page.columns-2 ul.products li.product,.woocommerce.columns-2 ul.products li.product{width:48%}.woocommerce-page.columns-3 ul.products li.product,.woocommerce.columns-3 ul.products li.product{width:30.75%}.woocommerce-page.columns-5 ul.products li.product,.woocommerce.columns-5 ul.products li.product{width:16.95%}.woocommerce-page.columns-6 ul.products li.product,.woocommerce.columns-6 ul.products li.product{width:13.5%}.woocommerce .woocommerce-result-count,.woocommerce-page .woocommerce-result-count{float:left}.woocommerce .woocommerce-ordering,.woocommerce-page .woocommerce-ordering{float:right}.woocommerce .woocommerce-pagination ul.page-numbers:after,.woocommerce .woocommerce-pagination ul.page-numbers:before,.woocommerce-page .woocommerce-pagination ul.page-numbers:after,.woocommerce-page .woocommerce-pagination ul.page-numbers:before{content:" ";display:table}.woocommerce .woocommerce-pagination ul.page-numbers:after,.woocommerce-page .woocommerce-pagination ul.page-numbers:after{clear:both}.woocommerce .woocommerce-pagination ul.page-numbers li,.woocommerce-page .woocommerce-pagination ul.page-numbers li{display:inline-block}.woocommerce #content table.cart img,.woocommerce table.cart img,.woocommerce-page #content table.cart img,.woocommerce-page table.cart img{height:auto}.woocommerce #content table.cart td.actions,.woocommerce table.cart td.actions,.woocommerce-page #content table.cart td.actions,.woocommerce-page table.cart td.actions{text-align:right}.woocommerce #content table.cart td.actions .input-text,.woocommerce table.cart td.actions .input-text,.woocommerce-page #content table.cart td.actions .input-text,.woocommerce-page table.cart td.actions .input-text{width:80px}.woocommerce #content table.cart td.actions .coupon,.woocommerce table.cart td.actions .coupon,.woocommerce-page #content table.cart td.actions .coupon,.woocommerce-page table.cart td.actions .coupon{float:left}.woocommerce #content table.cart td.actions .coupon label,.woocommerce table.cart td.actions .coupon label,.woocommerce-page #content table.cart td.actions .coupon label,.woocommerce-page table.cart td.actions .coupon label{display:none}.woocommerce .cart-collaterals,.woocommerce-page .cart-collaterals{width:100%}.woocommerce .cart-collaterals:after,.woocommerce .cart-collaterals:before,.woocommerce-page .cart-collaterals:after,.woocommerce-page .cart-collaterals:before{content:" ";display:table}.woocommerce .cart-collaterals:after,.woocommerce-page .cart-collaterals:after{clear:both}.woocommerce .cart-collaterals .related,.woocommerce-page .cart-collaterals .related{width:30.75%;float:left}.woocommerce .cart-collaterals .cross-sells,.woocommerce-page .cart-collaterals .cross-sells{width:48%;float:left}.woocommerce .cart-collaterals .cross-sells ul.products,.woocommerce-page .cart-collaterals .cross-sells ul.products{float:none}.woocommerce .cart-collaterals .cross-sells ul.products li,.woocommerce-page .cart-collaterals .cross-sells ul.products li{width:48%}.woocommerce .cart-collaterals .shipping_calculator,.woocommerce-page .cart-collaterals .shipping_calculator{width:48%;clear:right;float:right}.woocommerce .cart-collaterals .shipping_calculator:after,.woocommerce .cart-collaterals .shipping_calculator:before,.woocommerce-page .cart-collaterals .shipping_calculator:after,.woocommerce-page .cart-collaterals .shipping_calculator:before{content:" ";display:table}.woocommerce .cart-collaterals .shipping_calculator:after,.woocommerce-page .cart-collaterals .shipping_calculator:after{clear:both}.woocommerce .cart-collaterals .shipping_calculator .col2-set .col-1,.woocommerce .cart-collaterals .shipping_calculator .col2-set .col-2,.woocommerce-page .cart-collaterals .shipping_calculator .col2-set .col-1,.woocommerce-page .cart-collaterals .shipping_calculator .col2-set .col-2{width:47%}.woocommerce .cart-collaterals .cart_totals,.woocommerce-page .cart-collaterals .cart_totals{float:right;width:48%}.woocommerce ul.cart_list li:after,.woocommerce ul.cart_list li:before,.woocommerce ul.product_list_widget li:after,.woocommerce ul.product_list_widget li:before,.woocommerce-page ul.cart_list li:after,.woocommerce-page ul.cart_list li:before,.woocommerce-page ul.product_list_widget li:after,.woocommerce-page ul.product_list_widget li:before{content:" ";display:table}.woocommerce ul.cart_list li:after,.woocommerce ul.product_list_widget li:after,.woocommerce-page ul.cart_list li:after,.woocommerce-page ul.product_list_widget li:after{clear:both}.woocommerce ul.cart_list li img,.woocommerce ul.product_list_widget li img,.woocommerce-page ul.cart_list li img,.woocommerce-page ul.product_list_widget li img{float:right;height:auto}.woocommerce form .form-row:after,.woocommerce form .form-row:before,.woocommerce-page form .form-row:after,.woocommerce-page form .form-row:before{content:" ";display:table}.woocommerce form .form-row:after,.woocommerce-page form .form-row:after{clear:both}.woocommerce form .form-row label,.woocommerce-page form .form-row label{display:block}.woocommerce form .form-row label.checkbox,.woocommerce-page form .form-row label.checkbox{display:inline}.woocommerce form .form-row select,.woocommerce-page form .form-row select{width:100%}.woocommerce form .form-row .input-text,.woocommerce-page form .form-row .input-text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.woocommerce form .form-row-first,.woocommerce form .form-row-last,.woocommerce-page form .form-row-first,.woocommerce-page form .form-row-last{float:left;width:47%;overflow:visible}.woocommerce form .form-row-last,.woocommerce-page form .form-row-last{float:right}.woocommerce form .form-row-wide,.woocommerce-page form .form-row-wide{clear:both}.woocommerce #payment .form-row select,.woocommerce-page #payment .form-row select{width:auto}.woocommerce #payment .terms,.woocommerce-page #payment .terms{text-align:right;padding:0 1em}.woocommerce #payment #place_order,.woocommerce-page #payment #place_order{float:right}.twentyfourteen .tfwc{padding:12px 10px 0;max-width:474px;margin:0 auto}.twentyfourteen .tfwc .product .entry-summary{padding:0!important;margin:0 0 1.618em!important}.twentyfourteen .tfwc div.product.hentry.has-post-thumbnail{margin-top:0}.twentyfourteen .tfwc .product .images img{margin-bottom:1em}@media screen and (min-width:673px){.twentyfourteen .tfwc{padding-right:30px;padding-left:30px}}@media screen and (min-width:1040px){.twentyfourteen .tfwc{padding-right:15px;padding-left:15px}}@media screen and (min-width:1110px){.twentyfourteen .tfwc{padding-right:30px;padding-left:30px}}@media screen and (min-width:1218px){.twentyfourteen .tfwc{margin-right:54px}.full-width .twentyfourteen .tfwc{margin-right:auto}}@media screen and (min-width:59.6875em){.twentyfifteen .t15wc{margin:0 8.3333%}.twentyfifteen .t15wc .page-title{margin-left:0}} \ No newline at end of file +.woocommerce .col2-set,.woocommerce-page .col2-set{width:100%}.woocommerce .col2-set:after,.woocommerce .col2-set:before,.woocommerce-page .col2-set:after,.woocommerce-page .col2-set:before{content:" ";display:table}.woocommerce .col2-set:after,.woocommerce-page .col2-set:after{clear:both}.woocommerce .col2-set .col-1,.woocommerce-page .col2-set .col-1{float:left;width:48%}.woocommerce .col2-set .col-2,.woocommerce-page .col2-set .col-2{float:right;width:48%}.woocommerce img,.woocommerce-page img{height:auto;max-width:100%}.woocommerce #content div.product div.images,.woocommerce div.product div.images,.woocommerce-page #content div.product div.images,.woocommerce-page div.product div.images{float:left;width:48%}.woocommerce #content div.product div.thumbnails:after,.woocommerce #content div.product div.thumbnails:before,.woocommerce div.product div.thumbnails:after,.woocommerce div.product div.thumbnails:before,.woocommerce-page #content div.product div.thumbnails:after,.woocommerce-page #content div.product div.thumbnails:before,.woocommerce-page div.product div.thumbnails:after,.woocommerce-page div.product div.thumbnails:before{content:" ";display:table}.woocommerce #content div.product div.thumbnails:after,.woocommerce div.product div.thumbnails:after,.woocommerce-page #content div.product div.thumbnails:after,.woocommerce-page div.product div.thumbnails:after{clear:both}.woocommerce #content div.product div.thumbnails a,.woocommerce div.product div.thumbnails a,.woocommerce-page #content div.product div.thumbnails a,.woocommerce-page div.product div.thumbnails a{float:left;width:30.75%;margin-right:3.8%;margin-bottom:1em}.woocommerce #content div.product div.thumbnails a.last,.woocommerce div.product div.thumbnails a.last,.woocommerce-page #content div.product div.thumbnails a.last,.woocommerce-page div.product div.thumbnails a.last{margin-right:0}.woocommerce #content div.product div.thumbnails a.first,.woocommerce div.product div.thumbnails a.first,.woocommerce-page #content div.product div.thumbnails a.first,.woocommerce-page div.product div.thumbnails a.first{clear:both}.woocommerce #content div.product div.thumbnails.columns-1 a,.woocommerce div.product div.thumbnails.columns-1 a,.woocommerce-page #content div.product div.thumbnails.columns-1 a,.woocommerce-page div.product div.thumbnails.columns-1 a{width:100%;margin-right:0;float:none}.woocommerce #content div.product div.thumbnails.columns-2 a,.woocommerce div.product div.thumbnails.columns-2 a,.woocommerce-page #content div.product div.thumbnails.columns-2 a,.woocommerce-page div.product div.thumbnails.columns-2 a{width:48%}.woocommerce #content div.product div.thumbnails.columns-4 a,.woocommerce div.product div.thumbnails.columns-4 a,.woocommerce-page #content div.product div.thumbnails.columns-4 a,.woocommerce-page div.product div.thumbnails.columns-4 a{width:22.05%}.woocommerce #content div.product div.thumbnails.columns-5 a,.woocommerce div.product div.thumbnails.columns-5 a,.woocommerce-page #content div.product div.thumbnails.columns-5 a,.woocommerce-page div.product div.thumbnails.columns-5 a{width:16.9%}.woocommerce #content div.product div.summary,.woocommerce div.product div.summary,.woocommerce-page #content div.product div.summary,.woocommerce-page div.product div.summary{float:right;width:48%}.woocommerce #content div.product .woocommerce-tabs,.woocommerce div.product .woocommerce-tabs,.woocommerce-page #content div.product .woocommerce-tabs,.woocommerce-page div.product .woocommerce-tabs{clear:both}.woocommerce #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce #content div.product .woocommerce-tabs ul.tabs:before,.woocommerce div.product .woocommerce-tabs ul.tabs:after,.woocommerce div.product .woocommerce-tabs ul.tabs:before,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs:before,.woocommerce-page div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page div.product .woocommerce-tabs ul.tabs:before{content:" ";display:table}.woocommerce #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs:after,.woocommerce-page div.product .woocommerce-tabs ul.tabs:after{clear:both}.woocommerce #content div.product .woocommerce-tabs ul.tabs li,.woocommerce div.product .woocommerce-tabs ul.tabs li,.woocommerce-page #content div.product .woocommerce-tabs ul.tabs li,.woocommerce-page div.product .woocommerce-tabs ul.tabs li{display:inline-block}.woocommerce #content div.product #reviews .comment:after,.woocommerce #content div.product #reviews .comment:before,.woocommerce div.product #reviews .comment:after,.woocommerce div.product #reviews .comment:before,.woocommerce-page #content div.product #reviews .comment:after,.woocommerce-page #content div.product #reviews .comment:before,.woocommerce-page div.product #reviews .comment:after,.woocommerce-page div.product #reviews .comment:before{content:" ";display:table}.woocommerce #content div.product #reviews .comment:after,.woocommerce div.product #reviews .comment:after,.woocommerce-page #content div.product #reviews .comment:after,.woocommerce-page div.product #reviews .comment:after{clear:both}.woocommerce #content div.product #reviews .comment img,.woocommerce div.product #reviews .comment img,.woocommerce-page #content div.product #reviews .comment img,.woocommerce-page div.product #reviews .comment img{float:right;height:auto}.woocommerce .related,.woocommerce .upsells.products,.woocommerce-page .related,.woocommerce-page .upsells.products{clear:both}.woocommerce .related:after,.woocommerce .related:before,.woocommerce .upsells.products:after,.woocommerce .upsells.products:before,.woocommerce-page .related:after,.woocommerce-page .related:before,.woocommerce-page .upsells.products:after,.woocommerce-page .upsells.products:before{content:" ";display:table}.woocommerce .related:after,.woocommerce .upsells.products:after,.woocommerce-page .related:after,.woocommerce-page .upsells.products:after{clear:both}.woocommerce .related ul,.woocommerce .related ul.products,.woocommerce .upsells.products ul,.woocommerce .upsells.products ul.products,.woocommerce-page .related ul,.woocommerce-page .related ul.products,.woocommerce-page .upsells.products ul,.woocommerce-page .upsells.products ul.products{float:none}.woocommerce .related ul li.product,.woocommerce .related ul.products li.product,.woocommerce .upsells.products ul li.product,.woocommerce .upsells.products ul.products li.product,.woocommerce-page .related ul li.product,.woocommerce-page .related ul.products li.product,.woocommerce-page .upsells.products ul li.product,.woocommerce-page .upsells.products ul.products li.product{width:48%}.woocommerce .related ul li.product img,.woocommerce .related ul.products li.product img,.woocommerce .upsells.products ul li.product img,.woocommerce .upsells.products ul.products li.product img,.woocommerce-page .related ul li.product img,.woocommerce-page .related ul.products li.product img,.woocommerce-page .upsells.products ul li.product img,.woocommerce-page .upsells.products ul.products li.product img{width:100%;height:auto}.woocommerce ul.products,.woocommerce-page ul.products{clear:both}.woocommerce ul.products:after,.woocommerce ul.products:before,.woocommerce-page ul.products:after,.woocommerce-page ul.products:before{content:" ";display:table}.woocommerce ul.products:after,.woocommerce-page ul.products:after{clear:both}.woocommerce ul.products li.product,.woocommerce-page ul.products li.product{float:left;margin:0 3.8% 2.992em 0;padding:0;position:relative;width:22.05%}.woocommerce ul.products li.first,.woocommerce-page ul.products li.first{clear:both}.woocommerce ul.products li.last,.woocommerce-page ul.products li.last{margin-right:0}.woocommerce-page.columns-1 ul.products li.product,.woocommerce.columns-1 ul.products li.product{width:100%;margin-right:0}.woocommerce-page.columns-2 ul.products li.product,.woocommerce.columns-2 ul.products li.product{width:48%}.woocommerce-page.columns-3 ul.products li.product,.woocommerce.columns-3 ul.products li.product{width:30.75%}.woocommerce-page.columns-5 ul.products li.product,.woocommerce.columns-5 ul.products li.product{width:16.95%}.woocommerce-page.columns-6 ul.products li.product,.woocommerce.columns-6 ul.products li.product{width:13.5%}.woocommerce .woocommerce-result-count,.woocommerce-page .woocommerce-result-count{float:left}.woocommerce .woocommerce-ordering,.woocommerce-page .woocommerce-ordering{float:right}.woocommerce .woocommerce-pagination ul.page-numbers:after,.woocommerce .woocommerce-pagination ul.page-numbers:before,.woocommerce-page .woocommerce-pagination ul.page-numbers:after,.woocommerce-page .woocommerce-pagination ul.page-numbers:before{content:" ";display:table}.woocommerce .woocommerce-pagination ul.page-numbers:after,.woocommerce-page .woocommerce-pagination ul.page-numbers:after{clear:both}.woocommerce .woocommerce-pagination ul.page-numbers li,.woocommerce-page .woocommerce-pagination ul.page-numbers li{display:inline-block}.woocommerce #content table.cart img,.woocommerce table.cart img,.woocommerce-page #content table.cart img,.woocommerce-page table.cart img{height:auto}.woocommerce #content table.cart td.actions,.woocommerce table.cart td.actions,.woocommerce-page #content table.cart td.actions,.woocommerce-page table.cart td.actions{text-align:right}.woocommerce #content table.cart td.actions .input-text,.woocommerce table.cart td.actions .input-text,.woocommerce-page #content table.cart td.actions .input-text,.woocommerce-page table.cart td.actions .input-text{width:80px}.woocommerce #content table.cart td.actions .coupon,.woocommerce table.cart td.actions .coupon,.woocommerce-page #content table.cart td.actions .coupon,.woocommerce-page table.cart td.actions .coupon{float:left}.woocommerce #content table.cart td.actions .coupon label,.woocommerce table.cart td.actions .coupon label,.woocommerce-page #content table.cart td.actions .coupon label,.woocommerce-page table.cart td.actions .coupon label{display:none}.woocommerce .cart-collaterals,.woocommerce-page .cart-collaterals{width:100%}.woocommerce .cart-collaterals:after,.woocommerce .cart-collaterals:before,.woocommerce-page .cart-collaterals:after,.woocommerce-page .cart-collaterals:before{content:" ";display:table}.woocommerce .cart-collaterals:after,.woocommerce-page .cart-collaterals:after{clear:both}.woocommerce .cart-collaterals .related,.woocommerce-page .cart-collaterals .related{width:30.75%;float:left}.woocommerce .cart-collaterals .cross-sells,.woocommerce-page .cart-collaterals .cross-sells{width:48%;float:left}.woocommerce .cart-collaterals .cross-sells ul.products,.woocommerce-page .cart-collaterals .cross-sells ul.products{float:none}.woocommerce .cart-collaterals .cross-sells ul.products li,.woocommerce-page .cart-collaterals .cross-sells ul.products li{width:48%}.woocommerce .cart-collaterals .shipping_calculator,.woocommerce-page .cart-collaterals .shipping_calculator{width:48%;clear:right;float:right}.woocommerce .cart-collaterals .shipping_calculator:after,.woocommerce .cart-collaterals .shipping_calculator:before,.woocommerce-page .cart-collaterals .shipping_calculator:after,.woocommerce-page .cart-collaterals .shipping_calculator:before{content:" ";display:table}.woocommerce .cart-collaterals .shipping_calculator:after,.woocommerce-page .cart-collaterals .shipping_calculator:after{clear:both}.woocommerce .cart-collaterals .shipping_calculator .col2-set .col-1,.woocommerce .cart-collaterals .shipping_calculator .col2-set .col-2,.woocommerce-page .cart-collaterals .shipping_calculator .col2-set .col-1,.woocommerce-page .cart-collaterals .shipping_calculator .col2-set .col-2{width:47%}.woocommerce .cart-collaterals .cart_totals,.woocommerce-page .cart-collaterals .cart_totals{float:right;width:48%}.woocommerce ul.cart_list li:after,.woocommerce ul.cart_list li:before,.woocommerce ul.product_list_widget li:after,.woocommerce ul.product_list_widget li:before,.woocommerce-page ul.cart_list li:after,.woocommerce-page ul.cart_list li:before,.woocommerce-page ul.product_list_widget li:after,.woocommerce-page ul.product_list_widget li:before{content:" ";display:table}.woocommerce ul.cart_list li:after,.woocommerce ul.product_list_widget li:after,.woocommerce-page ul.cart_list li:after,.woocommerce-page ul.product_list_widget li:after{clear:both}.woocommerce ul.cart_list li img,.woocommerce ul.product_list_widget li img,.woocommerce-page ul.cart_list li img,.woocommerce-page ul.product_list_widget li img{float:right;height:auto}.woocommerce form .form-row:after,.woocommerce form .form-row:before,.woocommerce-page form .form-row:after,.woocommerce-page form .form-row:before{content:" ";display:table}.woocommerce form .form-row:after,.woocommerce-page form .form-row:after{clear:both}.woocommerce form .form-row label,.woocommerce-page form .form-row label{display:block}.woocommerce form .form-row label.checkbox,.woocommerce-page form .form-row label.checkbox{display:inline}.woocommerce form .form-row select,.woocommerce-page form .form-row select{width:100%}.woocommerce form .form-row .input-text,.woocommerce-page form .form-row .input-text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.woocommerce form .form-row-first,.woocommerce form .form-row-last,.woocommerce-page form .form-row-first,.woocommerce-page form .form-row-last{float:left;width:47%;overflow:visible}.woocommerce form .form-row-last,.woocommerce-page form .form-row-last{float:right}.woocommerce form .form-row-wide,.woocommerce-page form .form-row-wide{clear:both}.woocommerce #payment .form-row select,.woocommerce-page #payment .form-row select{width:auto}.woocommerce #payment .terms,.woocommerce-page #payment .terms{text-align:right;padding:0 1em}.woocommerce #payment #place_order,.woocommerce-page #payment #place_order{float:right}.twentyfourteen .tfwc{padding:12px 10px 0;max-width:474px;margin:0 auto}.twentyfourteen .tfwc .product .entry-summary{padding:0!important;margin:0 0 1.618em!important}.twentyfourteen .tfwc div.product.hentry.has-post-thumbnail{margin-top:0}.twentyfourteen .tfwc .product .images img{margin-bottom:1em}@media screen and (min-width:673px){.twentyfourteen .tfwc{padding-right:30px;padding-left:30px}}@media screen and (min-width:1040px){.twentyfourteen .tfwc{padding-right:15px;padding-left:15px}}@media screen and (min-width:1110px){.twentyfourteen .tfwc{padding-right:30px;padding-left:30px}}@media screen and (min-width:1218px){.twentyfourteen .tfwc{margin-right:54px}.full-width .twentyfourteen .tfwc{margin-right:auto}}.twentyfifteen .t15wc{padding-left:7.6923%;padding-right:7.6923%;padding-top:7.6923%;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.15)}.twentyfifteen .t15wc .page-title{margin-left:0}@media screen and (min-width:59.6875em){.twentyfifteen .t15wc{margin-left:8.3333%;margin-right:8.3333%}.single-product .twentyfifteen .entry-summary{padding:0!important}}@media screen and (min-width:38.75em){.twentyfifteen .t15wc{margin-right:7.6923%;margin-left:7.6923%;margin-top:8.3333%}} \ No newline at end of file diff --git a/assets/css/woocommerce-layout.scss b/assets/css/woocommerce-layout.scss index 967ff90ab63..6962140aab4 100644 --- a/assets/css/woocommerce-layout.scss +++ b/assets/css/woocommerce-layout.scss @@ -421,14 +421,43 @@ /** * Twenty Fifteen specific styles */ +.twentyfifteen { + .t15wc { + padding-left: 7.6923%; + padding-right: 7.6923%; + padding-top: 7.6923%; + background: #fff; + box-shadow: 0 0 1px rgba(0, 0, 0, 0.15); + + .page-title { + margin-left: 0; + } + } +} + @media screen and (min-width: 59.6875em) { .twentyfifteen { .t15wc { - margin: 0 8.3333%; + margin-left: 8.3333%; + margin-right: 8.3333%; + } + } - .page-title { - margin-left: 0; + .single-product { + .twentyfifteen { + .entry-summary { + padding: 0 !important; } } } +} + +@media screen and (min-width: 38.75em) { + .twentyfifteen { + .t15wc { + margin-right: 7.6923%; + margin-left: 7.6923%; + margin-top: 8.3333%; + } + } } \ No newline at end of file diff --git a/assets/css/woocommerce.css b/assets/css/woocommerce.css index c718f4f5644..567668e1ee3 100644 --- a/assets/css/woocommerce.css +++ b/assets/css/woocommerce.css @@ -1 +1 @@ -@charset "UTF-8";@-moz-keyframes spin{100%{-moz-transform:rotate(360deg)}}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}p.demo_store{position:fixed;top:0;left:0;right:0;margin:0;width:100%;font-size:1em;padding:1em 0;text-align:center;background-color:#a46497;color:#fff;z-index:99998;box-shadow:0 1px 1em rgba(0,0,0,.2)}.admin-bar p.demo_store{top:32px}.wc-forward a:after{font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin-left:.618em;content:"";vertical-align:top;display:inline-block;line-height:inherit}.wc-backward a:before,.wc-backward:before{font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";vertical-align:top;display:inline-block;line-height:inherit}.clear{clear:both}.woocommerce .blockUI.blockOverlay:before,.woocommerce .loader:before{height:1em;width:1em;position:absolute;top:50%;left:50%;margin-left:-.5em;margin-top:-.5em;display:block;-webkit-animation:spin 2s linear infinite;-moz-animation:spin 2s linear infinite;animation:spin 2s linear infinite;font-family:Dashicons;content:"\f463";line-height:1;text-align:center;font-size:2em;color:rgba(0,0,0,.75);vertical-align:top;-webkit-font-smoothing:antialiased;font-weight:400}.woocommerce a.remove{display:block;font-size:1.5em;height:1em;width:1em;text-align:center;line-height:1;border-radius:100%;color:red!important;text-decoration:none;font-weight:700}.woocommerce a.remove:hover{color:#fff!important;background:red}.woocommerce .woocommerce-error,.woocommerce .woocommerce-info,.woocommerce .woocommerce-message{padding:1em 2em 1em 3.5em!important;margin:0 0 2em!important;position:relative;background-color:#f7f6f7;color:#515151;border-top:3px solid #a46497;list-style:none!important;width:auto}.woocommerce .woocommerce-error:after,.woocommerce .woocommerce-error:before,.woocommerce .woocommerce-info:after,.woocommerce .woocommerce-info:before,.woocommerce .woocommerce-message:after,.woocommerce .woocommerce-message:before{content:" ";display:table}.woocommerce .woocommerce-error:after,.woocommerce .woocommerce-info:after,.woocommerce .woocommerce-message:after{clear:both}.woocommerce .woocommerce-error:before,.woocommerce .woocommerce-info:before,.woocommerce .woocommerce-message:before{font-family:WooCommerce;content:"\e028";display:inline-block;position:absolute;top:1em;left:1.5em}.woocommerce .woocommerce-error .button,.woocommerce .woocommerce-info .button,.woocommerce .woocommerce-message .button{float:right}.woocommerce .woocommerce-error li,.woocommerce .woocommerce-info li,.woocommerce .woocommerce-message li{list-style:none!important;padding-left:0!important;margin-left:0!important}.woocommerce .woocommerce-message{border-top-color:#8fae1b}.woocommerce .woocommerce-message:before{content:"\e015";color:#8fae1b}.woocommerce .woocommerce-info{border-top-color:#1e85be}.woocommerce .woocommerce-info:before{color:#1e85be}.woocommerce .woocommerce-error{border-top-color:#b81c23}.woocommerce .woocommerce-error:before{content:"\e016";color:#b81c23}.woocommerce small.note{display:block;color:#777;font-size:.857em;margin-top:10px}.woocommerce .woocommerce-breadcrumb{margin:0 0 1em;padding:0;font-size:.92em;color:#777}.woocommerce .woocommerce-breadcrumb:after,.woocommerce .woocommerce-breadcrumb:before{content:" ";display:table}.woocommerce .woocommerce-breadcrumb:after{clear:both}.woocommerce .woocommerce-breadcrumb a{color:#777}.woocommerce .quantity .qty{width:2.618em;text-align:center}.woocommerce div.product{margin-bottom:0;position:relative}.woocommerce div.product .product_title{clear:none;margin-top:0;padding:0}.woocommerce div.product p.price,.woocommerce div.product span.price{color:#77a464;font-size:1.25em}.woocommerce div.product p.price ins,.woocommerce div.product span.price ins{background:inherit;font-weight:700}.woocommerce div.product p.price del,.woocommerce div.product span.price del{opacity:.5;display:block}.woocommerce div.product p.stock{font-size:.92em}.woocommerce div.product .stock{color:#77a464}.woocommerce div.product .out-of-stock{color:red}.woocommerce div.product .woocommerce-product-rating{margin-bottom:1.618em}.woocommerce div.product div.images{margin-bottom:2em}.woocommerce div.product div.images img{display:block;width:100%;height:auto;box-shadow:none}.woocommerce div.product div.images div.thumbnails{padding-top:1em}.woocommerce div.product div.summary{margin-bottom:2em}.woocommerce div.product div.social{text-align:right;margin:0 0 1em}.woocommerce div.product div.social span{margin:0 0 0 2px}.woocommerce div.product div.social span span{margin:0}.woocommerce div.product div.social span .stButton .chicklets{padding-left:16px;width:0}.woocommerce div.product div.social iframe{float:left;margin-top:3px}.woocommerce div.product .woocommerce-tabs ul.tabs{list-style:none;padding:0 0 0 1em;margin:0 0 1.618em;overflow:hidden;position:relative}.woocommerce div.product .woocommerce-tabs ul.tabs li{border:1px solid #d3ced2;background-color:#ebe9eb;display:inline-block;position:relative;z-index:0;border-radius:4px 4px 0 0;margin:0 -5px;padding:0 1em}.woocommerce div.product .woocommerce-tabs ul.tabs li a{display:inline-block;padding:.5em 0;font-weight:700;color:#515151;text-decoration:none}.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover{text-decoration:none;color:#6b6b6b}.woocommerce div.product .woocommerce-tabs ul.tabs li.active{background:#fff;z-index:2;border-bottom-color:#fff}.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{color:inherit;text-shadow:inherit}.woocommerce div.product .woocommerce-tabs ul.tabs li.active:before{box-shadow:2px 2px 0 #fff}.woocommerce div.product .woocommerce-tabs ul.tabs li.active:after{box-shadow:-2px 2px 0 #fff}.woocommerce div.product .woocommerce-tabs ul.tabs li:after,.woocommerce div.product .woocommerce-tabs ul.tabs li:before{border:1px solid #d3ced2;position:absolute;bottom:-1px;width:5px;height:5px;content:" "}.woocommerce div.product .woocommerce-tabs ul.tabs li:before{left:-6px;-webkit-border-bottom-right-radius:4px;-moz-border-bottom-right-radius:4px;border-bottom-right-radius:4px;border-width:0 1px 1px 0;box-shadow:2px 2px 0 #ebe9eb}.woocommerce div.product .woocommerce-tabs ul.tabs li:after{right:-6px;-webkit-border-bottom-left-radius:4px;-moz-border-bottom-left-radius:4px;border-bottom-left-radius:4px;border-width:0 0 1px 1px;box-shadow:-2px 2px 0 #ebe9eb}.woocommerce div.product .woocommerce-tabs ul.tabs:before{position:absolute;content:" ";width:100%;bottom:0;left:0;border-bottom:1px solid #d3ced2;z-index:1}.woocommerce div.product .woocommerce-tabs .panel{margin:0 0 2em;padding:0}.woocommerce div.product p.cart{margin-bottom:2em}.woocommerce div.product p.cart:after,.woocommerce div.product p.cart:before{content:" ";display:table}.woocommerce div.product p.cart:after{clear:both}.woocommerce div.product form.cart{margin-bottom:2em}.woocommerce div.product form.cart:after,.woocommerce div.product form.cart:before{content:" ";display:table}.woocommerce div.product form.cart:after{clear:both}.woocommerce div.product form.cart div.quantity{float:left;margin:0 4px 0 0}.woocommerce div.product form.cart table{border-width:0 0 1px}.woocommerce div.product form.cart table td{padding-left:0}.woocommerce div.product form.cart table div.quantity{float:none;margin:0}.woocommerce div.product form.cart table small.stock{display:block;float:none}.woocommerce div.product form.cart .variations{margin-bottom:1em}.woocommerce div.product form.cart .variations label{font-weight:700}.woocommerce div.product form.cart .variations select{width:100%;float:left}.woocommerce div.product form.cart .variations td.label{padding-right:1em}.woocommerce div.product form.cart .variations td{vertical-align:top}.woocommerce div.product form.cart .button{vertical-align:middle;float:left}.woocommerce div.product form.cart .group_table td.label{padding-right:1em;padding-left:1em}.woocommerce div.product form.cart .group_table td{vertical-align:top;padding-bottom:.5em;border:0}.woocommerce span.onsale{min-height:3.236em;min-width:3.236em;padding:.202em;font-weight:700;position:absolute;text-align:center;line-height:3.236;top:-.5em;left:-.5em;margin:0;border-radius:100%;background-color:#77a464;color:#fff;font-size:.857em;-webkit-font-smoothing:antialiased}.woocommerce .products ul,.woocommerce ul.products{margin:0 0 1em;padding:0;list-style:none;clear:both}.woocommerce .products ul:after,.woocommerce .products ul:before,.woocommerce ul.products:after,.woocommerce ul.products:before{content:" ";display:table}.woocommerce .products ul:after,.woocommerce ul.products:after{clear:both}.woocommerce .products ul li,.woocommerce ul.products li{list-style:none}.woocommerce ul.products li.product .onsale{top:0;right:0;left:auto;margin:-.5em -.5em 0 0}.woocommerce ul.products li.product h3{padding:.5em 0;margin:0;font-size:1em}.woocommerce ul.products li.product a{text-decoration:none}.woocommerce ul.products li.product a img{width:100%;height:auto;display:block;margin:0 0 1em;box-shadow:none}.woocommerce ul.products li.product strong{display:block}.woocommerce ul.products li.product .star-rating{font-size:.857em}.woocommerce ul.products li.product .button{margin-top:1em}.woocommerce ul.products li.product .price{color:#77a464;display:block;font-weight:400;margin-bottom:.5em;font-size:.857em}.woocommerce ul.products li.product .price del{color:inherit;opacity:.5;display:block}.woocommerce ul.products li.product .price ins{background:0 0;font-weight:700}.woocommerce ul.products li.product .price .from{font-size:.67em;margin:-2px 0 0;text-transform:uppercase;color:rgba(132,132,132,.5)}.woocommerce .woocommerce-ordering,.woocommerce .woocommerce-result-count{margin:0 0 1em}.woocommerce .woocommerce-ordering select{vertical-align:top}.woocommerce nav.woocommerce-pagination{text-align:center}.woocommerce nav.woocommerce-pagination ul{display:inline-block;white-space:nowrap;padding:0;clear:both;border:1px solid #d3ced2;border-right:0;margin:1px}.woocommerce nav.woocommerce-pagination ul li{border-right:1px solid #d3ced2;padding:0;margin:0;float:left;display:inline;overflow:hidden}.woocommerce nav.woocommerce-pagination ul li a,.woocommerce nav.woocommerce-pagination ul li span{margin:0;text-decoration:none;line-height:1;font-size:1em;font-weight:400;padding:.5em;min-width:1em;display:block}.woocommerce nav.woocommerce-pagination ul li a:focus,.woocommerce nav.woocommerce-pagination ul li a:hover,.woocommerce nav.woocommerce-pagination ul li span.current{background:#ebe9eb;color:#8a7e88}.woocommerce #respond input#submit,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button{font-size:100%;margin:0;line-height:1;cursor:pointer;position:relative;font-family:inherit;text-decoration:none;overflow:visible;padding:.618em 1em;font-weight:700;border-radius:3px;left:auto;color:#515151;background-color:#ebe9eb;border:0;white-space:nowrap;display:inline-block;background-image:none;box-shadow:none;-webkit-box-shadow:none;text-shadow:none}.woocommerce #respond input#submit.loading,.woocommerce a.button.loading,.woocommerce button.button.loading,.woocommerce input.button.loading{opacity:.25;padding-right:2.618em}.woocommerce #respond input#submit.loading:after,.woocommerce a.button.loading:after,.woocommerce button.button.loading:after,.woocommerce input.button.loading:after{font-family:Dashicons;content:"\f463";vertical-align:top;-webkit-font-smoothing:antialiased;font-weight:400;position:absolute;top:.618em;right:1em;-webkit-animation:spin 2s linear infinite;-moz-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.woocommerce #respond input#submit.added:after,.woocommerce a.button.added:after,.woocommerce button.button.added:after,.woocommerce input.button.added:after{font-family:WooCommerce;content:"\e017";margin-left:.53em;vertical-align:bottom}.woocommerce #respond input#submit:hover,.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover{background-color:#dad8da;text-decoration:none;background-image:none;color:#515151}.woocommerce #respond input#submit.alt,.woocommerce a.button.alt,.woocommerce button.button.alt,.woocommerce input.button.alt{background-color:#a46497;color:#fff;-webkit-font-smoothing:antialiased}.woocommerce #respond input#submit.alt:hover,.woocommerce a.button.alt:hover,.woocommerce button.button.alt:hover,.woocommerce input.button.alt:hover{background-color:#935386;color:#fff}.woocommerce #respond input#submit.alt.disabled,.woocommerce #respond input#submit.alt.disabled:hover,.woocommerce #respond input#submit.alt:disabled,.woocommerce #respond input#submit.alt:disabled:hover,.woocommerce #respond input#submit.alt:disabled[disabled],.woocommerce #respond input#submit.alt:disabled[disabled]:hover,.woocommerce a.button.alt.disabled,.woocommerce a.button.alt.disabled:hover,.woocommerce a.button.alt:disabled,.woocommerce a.button.alt:disabled:hover,.woocommerce a.button.alt:disabled[disabled],.woocommerce a.button.alt:disabled[disabled]:hover,.woocommerce button.button.alt.disabled,.woocommerce button.button.alt.disabled:hover,.woocommerce button.button.alt:disabled,.woocommerce button.button.alt:disabled:hover,.woocommerce button.button.alt:disabled[disabled],.woocommerce button.button.alt:disabled[disabled]:hover,.woocommerce input.button.alt.disabled,.woocommerce input.button.alt.disabled:hover,.woocommerce input.button.alt:disabled,.woocommerce input.button.alt:disabled:hover,.woocommerce input.button.alt:disabled[disabled],.woocommerce input.button.alt:disabled[disabled]:hover{background-color:#a46497;color:#fff}.woocommerce #respond input#submit.disabled,.woocommerce #respond input#submit:disabled,.woocommerce #respond input#submit:disabled[disabled],.woocommerce a.button.disabled,.woocommerce a.button:disabled,.woocommerce a.button:disabled[disabled],.woocommerce button.button.disabled,.woocommerce button.button:disabled,.woocommerce button.button:disabled[disabled],.woocommerce input.button.disabled,.woocommerce input.button:disabled,.woocommerce input.button:disabled[disabled]{color:inherit;cursor:not-allowed;opacity:.5}.woocommerce #respond input#submit.disabled:hover,.woocommerce #respond input#submit:disabled:hover,.woocommerce #respond input#submit:disabled[disabled]:hover,.woocommerce a.button.disabled:hover,.woocommerce a.button:disabled:hover,.woocommerce a.button:disabled[disabled]:hover,.woocommerce button.button.disabled:hover,.woocommerce button.button:disabled:hover,.woocommerce button.button:disabled[disabled]:hover,.woocommerce input.button.disabled:hover,.woocommerce input.button:disabled:hover,.woocommerce input.button:disabled[disabled]:hover{color:inherit;background-color:#ebe9eb}.woocommerce .cart .button,.woocommerce .cart input.button{float:none}.woocommerce a.added_to_cart{padding-top:.5em;white-space:nowrap;display:inline-block}.woocommerce #reviews h2 small{float:right;color:#777;font-size:15px;margin:10px 0 0}.woocommerce #reviews h2 small a{text-decoration:none;color:#777}.woocommerce #reviews h3{margin:0}.woocommerce #reviews #respond{margin:0;border:0;padding:0}.woocommerce #reviews #comment{height:75px}.woocommerce #reviews #comments .add_review:after,.woocommerce #reviews #comments .add_review:before{content:" ";display:table}.woocommerce #reviews #comments .add_review:after{clear:both}.woocommerce #reviews #comments h2{clear:none}.woocommerce #reviews #comments ol.commentlist{margin:0;width:100%;background:0 0;list-style:none}.woocommerce #reviews #comments ol.commentlist:after,.woocommerce #reviews #comments ol.commentlist:before{content:" ";display:table}.woocommerce #reviews #comments ol.commentlist:after{clear:both}.woocommerce #reviews #comments ol.commentlist li{padding:0;margin:0 0 20px;position:relative;background:0;border:0}.woocommerce #reviews #comments ol.commentlist li .meta{color:#777;font-size:.75em}.woocommerce #reviews #comments ol.commentlist li img.avatar{float:left;position:absolute;top:0;left:0;padding:3px;width:32px;height:auto;background:#ebe9eb;border:1px solid #e4e1e3;margin:0;box-shadow:none}.woocommerce #reviews #comments ol.commentlist li .comment-text{margin:0 0 0 50px;border:1px solid #e4e1e3;border-radius:4px;padding:1em 1em 0}.woocommerce #reviews #comments ol.commentlist li .comment-text:after,.woocommerce #reviews #comments ol.commentlist li .comment-text:before{content:" ";display:table}.woocommerce #reviews #comments ol.commentlist li .comment-text:after{clear:both}.woocommerce #reviews #comments ol.commentlist li .comment-text p{margin:0 0 1em}.woocommerce #reviews #comments ol.commentlist li .comment-text p.meta{font-size:.83em}.woocommerce #reviews #comments ol.commentlist ul.children{list-style:none;margin:20px 0 0 50px}.woocommerce #reviews #comments ol.commentlist ul.children .star-rating{display:none}.woocommerce #reviews #comments ol.commentlist #respond{border:1px solid #e4e1e3;border-radius:4px;padding:1em 1em 0;margin:20px 0 0 50px}.woocommerce #reviews #comments .commentlist>li:before{content:""}.woocommerce .star-rating{float:right;overflow:hidden;position:relative;height:1em;line-height:1;font-size:1em;width:5.4em;font-family:star}.woocommerce .star-rating:before{content:"\73\73\73\73\73";color:#d3ced2;float:left;top:0;left:0;position:absolute}.woocommerce .star-rating span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}.woocommerce .star-rating span:before{content:"\53\53\53\53\53";top:0;position:absolute;left:0}.woocommerce .woocommerce-product-rating{line-height:2;display:block}.woocommerce .woocommerce-product-rating:after,.woocommerce .woocommerce-product-rating:before{content:" ";display:table}.woocommerce .woocommerce-product-rating:after{clear:both}.woocommerce .woocommerce-product-rating .star-rating{margin:.5em 4px 0 0;float:left}.woocommerce .products .star-rating{display:block;margin:0 0 .5em;float:none}.woocommerce .hreview-aggregate .star-rating{margin:10px 0 0}.woocommerce #review_form #respond{position:static;margin:0;width:auto;padding:0;background:0 0;border:0}.woocommerce #review_form #respond:after,.woocommerce #review_form #respond:before{content:" ";display:table}.woocommerce #review_form #respond:after{clear:both}.woocommerce #review_form #respond p{margin:0 0 10px}.woocommerce #review_form #respond .form-submit input{left:auto}.woocommerce #review_form #respond textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.woocommerce p.stars{position:relative;font-size:1em}.woocommerce p.stars a{display:inline-block;font-weight:700;margin-right:1em;text-indent:-9999px;position:relative}.woocommerce p.stars a:last-child{border-right:0}.woocommerce p.stars a.star-1,.woocommerce p.stars a.star-2,.woocommerce p.stars a.star-3,.woocommerce p.stars a.star-4,.woocommerce p.stars a.star-5{border-right:1px solid #ccc}.woocommerce p.stars a.star-1:after,.woocommerce p.stars a.star-2:after,.woocommerce p.stars a.star-3:after,.woocommerce p.stars a.star-4:after,.woocommerce p.stars a.star-5:after{font-family:WooCommerce;text-indent:0;position:absolute;top:0;left:0}.woocommerce p.stars a.star-1{width:2em}.woocommerce p.stars a.star-1:after{content:"\e021"}.woocommerce p.stars a.star-1.active:after,.woocommerce p.stars a.star-1:hover:after{content:""}.woocommerce p.stars a.star-2{width:3em}.woocommerce p.stars a.star-2:after{content:"\e021\e021"}.woocommerce p.stars a.star-2.active:after,.woocommerce p.stars a.star-2:hover:after{content:""}.woocommerce p.stars a.star-3{width:4em}.woocommerce p.stars a.star-3:after{content:"\e021\e021\e021"}.woocommerce p.stars a.star-3.active:after,.woocommerce p.stars a.star-3:hover:after{content:""}.woocommerce p.stars a.star-4{width:5em}.woocommerce p.stars a.star-4:after{content:"\e021\e021\e021\e021"}.woocommerce p.stars a.star-4.active:after,.woocommerce p.stars a.star-4:hover:after{content:""}.woocommerce p.stars a.star-5{width:6em;border:0}.woocommerce p.stars a.star-5:after{content:"\e021\e021\e021\e021\e021"}.woocommerce p.stars a.star-5.active:after,.woocommerce p.stars a.star-5:hover:after{content:""}.woocommerce table.shop_attributes{border:0;border-top:1px dotted rgba(0,0,0,.1);margin-bottom:1.618em;width:100%}.woocommerce table.shop_attributes th{width:150px;font-weight:700;padding:8px;border-top:0;border-bottom:1px dotted rgba(0,0,0,.1);margin:0;line-height:1.5}.woocommerce table.shop_attributes td{font-style:italic;padding:0;border-top:0;border-bottom:1px dotted rgba(0,0,0,.1);margin:0;line-height:1.5}.woocommerce table.shop_attributes td p{margin:0;padding:8px 0}.woocommerce table.shop_attributes .alt td,.woocommerce table.shop_attributes .alt th{background:rgba(0,0,0,.025)}.woocommerce table.shop_table{border:1px solid rgba(0,0,0,.1);margin:0 -1px 24px 0;text-align:left;width:100%;border-collapse:separate;border-radius:5px}.woocommerce table.shop_table th{font-weight:700;padding:9px 12px}.woocommerce table.shop_table td{border-top:1px solid rgba(0,0,0,.1);padding:6px 12px;vertical-align:middle}.woocommerce table.shop_table td small{font-weight:400}.woocommerce table.shop_table tbody tr:first-child td,.woocommerce table.shop_table tbody tr:first-child th{border-top:0}.woocommerce table.shop_table tbody th,.woocommerce table.shop_table tfoot td,.woocommerce table.shop_table tfoot th{font-weight:700;border-top:1px solid rgba(0,0,0,.1)}.woocommerce table.my_account_orders{font-size:.85em}.woocommerce table.my_account_orders td,.woocommerce table.my_account_orders th{padding:4px 8px;vertical-align:middle}.woocommerce table.my_account_orders .button{white-space:nowrap}.woocommerce table.my_account_orders .order-actions{text-align:right}.woocommerce table.my_account_orders .order-actions .button{margin:.125em 0 .125em .25em}.woocommerce td.product-name dl.variation{margin:.25em 0}.woocommerce td.product-name dl.variation:after,.woocommerce td.product-name dl.variation:before{content:" ";display:table}.woocommerce td.product-name dl.variation:after{clear:both}.woocommerce td.product-name dl.variation dd,.woocommerce td.product-name dl.variation dt{display:inline-block;float:left;margin-bottom:1em}.woocommerce td.product-name dl.variation dt{font-weight:700;padding:0 0 .25em;margin:0 4px 0 0;clear:left}.woocommerce td.product-name dl.variation dd{padding:0 0 .25em}.woocommerce td.product-name dl.variation dd p:last-child{margin-bottom:0}.woocommerce td.product-name p.backorder_notification{font-size:.83em}.woocommerce td.product-quantity{min-width:80px}.woocommerce ul.cart_list,.woocommerce ul.product_list_widget{list-style:none;padding:0;margin:0}.woocommerce ul.cart_list li,.woocommerce ul.product_list_widget li{padding:4px 0;margin:0;list-style:none}.woocommerce ul.cart_list li:after,.woocommerce ul.cart_list li:before,.woocommerce ul.product_list_widget li:after,.woocommerce ul.product_list_widget li:before{content:" ";display:table}.woocommerce ul.cart_list li:after,.woocommerce ul.product_list_widget li:after{clear:both}.woocommerce ul.cart_list li a,.woocommerce ul.product_list_widget li a{display:block;font-weight:700}.woocommerce ul.cart_list li img,.woocommerce ul.product_list_widget li img{float:right;margin-left:4px;width:32px;height:auto;box-shadow:none}.woocommerce ul.cart_list li dl,.woocommerce ul.product_list_widget li dl{margin:0;padding-left:1em;border-left:2px solid rgba(0,0,0,.1)}.woocommerce ul.cart_list li dl:after,.woocommerce ul.cart_list li dl:before,.woocommerce ul.product_list_widget li dl:after,.woocommerce ul.product_list_widget li dl:before{content:" ";display:table}.woocommerce ul.cart_list li dl:after,.woocommerce ul.product_list_widget li dl:after{clear:both}.woocommerce ul.cart_list li dl dd,.woocommerce ul.cart_list li dl dt,.woocommerce ul.product_list_widget li dl dd,.woocommerce ul.product_list_widget li dl dt{display:inline-block;float:left;margin-bottom:1em}.woocommerce ul.cart_list li dl dt,.woocommerce ul.product_list_widget li dl dt{font-weight:700;padding:0 0 .25em;margin:0 4px 0 0;clear:left}.woocommerce ul.cart_list li dl dd,.woocommerce ul.product_list_widget li dl dd{padding:0 0 .25em}.woocommerce ul.cart_list li dl dd p:last-child,.woocommerce ul.product_list_widget li dl dd p:last-child{margin-bottom:0}.woocommerce ul.cart_list li .star-rating,.woocommerce ul.product_list_widget li .star-rating{float:none}.woocommerce .widget_shopping_cart .total,.woocommerce.widget_shopping_cart .total{border-top:3px double #ebe9eb;padding:4px 0 0}.woocommerce .widget_shopping_cart .total strong,.woocommerce.widget_shopping_cart .total strong{min-width:40px;display:inline-block}.woocommerce .widget_shopping_cart .cart_list li,.woocommerce.widget_shopping_cart .cart_list li{padding-left:2em;position:relative;padding-top:0}.woocommerce .widget_shopping_cart .cart_list li a.remove,.woocommerce.widget_shopping_cart .cart_list li a.remove{position:absolute;top:0;left:0}.woocommerce .widget_shopping_cart .buttons:after,.woocommerce .widget_shopping_cart .buttons:before,.woocommerce.widget_shopping_cart .buttons:after,.woocommerce.widget_shopping_cart .buttons:before{content:" ";display:table}.woocommerce .widget_shopping_cart .buttons:after,.woocommerce.widget_shopping_cart .buttons:after{clear:both}.woocommerce form .form-row{padding:3px;margin:0 0 6px}.woocommerce form .form-row [placeholder]:focus::-webkit-input-placeholder{-webkit-transition:opacity .5s .5s ease;-moz-transition:opacity .5s .5s ease;transition:opacity .5s .5s ease;opacity:0}.woocommerce form .form-row label{line-height:2}.woocommerce form .form-row label.hidden{visibility:hidden}.woocommerce form .form-row label.inline{display:inline}.woocommerce form .form-row select{cursor:pointer;margin:0}.woocommerce form .form-row .required{color:red;font-weight:700;border:0}.woocommerce form .form-row .input-checkbox{display:inline;margin:-2px 8px 0 0;text-align:center;vertical-align:middle}.woocommerce form .form-row input.input-text,.woocommerce form .form-row textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;margin:0;outline:0;line-height:1}.woocommerce form .form-row textarea{height:4em;line-height:1.5;display:block;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.woocommerce form .form-row.woocommerce-invalid .chosen-drop,.woocommerce form .form-row.woocommerce-invalid .chosen-single,.woocommerce form .form-row.woocommerce-invalid input.input-text,.woocommerce form .form-row.woocommerce-invalid select{border-color:#a00}.woocommerce form .form-row.woocommerce-validated .chosen-drop,.woocommerce form .form-row.woocommerce-validated .chosen-single,.woocommerce form .form-row.woocommerce-validated input.input-text,.woocommerce form .form-row.woocommerce-validated select{border-color:#69bf29}.woocommerce form .form-row ::-webkit-input-placeholder{line-height:normal}.woocommerce form .form-row :-moz-placeholder{line-height:normal}.woocommerce form .form-row :-ms-input-placeholder{line-height:normal}.woocommerce form.checkout_coupon,.woocommerce form.login,.woocommerce form.register{border:1px solid #d3ced2;padding:20px;margin:2em 0;text-align:left;border-radius:5px}.woocommerce ul#shipping_method{list-style:none;margin:0;padding:0}.woocommerce ul#shipping_method li{margin:0;padding:.25em 0 .25em 22px;text-indent:-22px;list-style:none}.woocommerce ul#shipping_method .amount{font-weight:700}.woocommerce p.woocommerce-shipping-contents{margin:0}.woocommerce .order_details{margin:0 0 1.5em;list-style:none}.woocommerce .order_details:after,.woocommerce .order_details:before{content:" ";display:table}.woocommerce .order_details:after{clear:both}.woocommerce .order_details li{float:left;margin-right:2em;text-transform:uppercase;font-size:.715em;line-height:1;border-right:1px dashed #d3ced2;padding-right:2em}.woocommerce .order_details li strong{display:block;font-size:1.4em;text-transform:none;line-height:1.5}.woocommerce .order_details li:last-of-type{border:none}.woocommerce .widget_layered_nav ul{margin:0;padding:0;border:0;list-style:none}.woocommerce .widget_layered_nav ul li{padding:0 0 1px;list-style:none}.woocommerce .widget_layered_nav ul li:after,.woocommerce .widget_layered_nav ul li:before{content:" ";display:table}.woocommerce .widget_layered_nav ul li:after{clear:both}.woocommerce .widget_layered_nav ul li a,.woocommerce .widget_layered_nav ul li span{padding:1px 0}.woocommerce .widget_layered_nav ul li.chosen a:before{font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";vertical-align:top;display:inline-block;color:#a00}.woocommerce .widget_layered_nav_filters ul{margin:0;padding:0;border:0;list-style:none;overflow:hidden;zoom:1}.woocommerce .widget_layered_nav_filters ul li{float:left;padding:0 1px 1px 0;list-style:none}.woocommerce .widget_layered_nav_filters ul li a:before{font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";vertical-align:top;display:inline-block;color:#a00}.woocommerce .widget_price_filter .price_slider{margin-bottom:1em}.woocommerce .widget_price_filter .price_slider_amount{text-align:right;line-height:2.4;font-size:.8751em}.woocommerce .widget_price_filter .price_slider_amount .button{font-size:1.15em;float:left}.woocommerce .widget_price_filter .ui-slider{position:relative;text-align:left}.woocommerce .widget_price_filter .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1em;height:1em;background-color:#a46497;border-radius:1em;cursor:ew-resize;outline:0;top:-.3em}.woocommerce .widget_price_filter .ui-slider .ui-slider-handle:last-child{margin-left:-.8em}.woocommerce .widget_price_filter .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;border-radius:1em;background-color:#a46497}.woocommerce .widget_price_filter .price_slider_wrapper .ui-widget-content{border-radius:1em;background-color:#602053;border:0}.woocommerce .widget_price_filter .ui-slider-horizontal{height:.5em}.woocommerce .widget_price_filter .ui-slider-horizontal .ui-slider-range{top:0;height:100%}.woocommerce .widget_price_filter .ui-slider-horizontal .ui-slider-range-min{left:-1px}.woocommerce .widget_price_filter .ui-slider-horizontal .ui-slider-range-max{right:-1px}.woocommerce-account .addresses .title:after,.woocommerce-account .addresses .title:before{content:" ";display:table}.woocommerce-account .addresses .title:after{clear:both}.woocommerce-account .addresses .title h3{float:left}.woocommerce-account .addresses .title .edit{float:right}.woocommerce-account ol.commentlist.notes li.note p.meta{font-weight:700;margin-bottom:0}.woocommerce-account ol.commentlist.notes li.note .description p:last-child{margin-bottom:0}.woocommerce-account ul.digital-downloads{margin-left:0;padding-left:0}.woocommerce-account ul.digital-downloads li{list-style:none;margin-left:0;padding-left:0}.woocommerce-account ul.digital-downloads li:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:""}.woocommerce-account ul.digital-downloads li .count{float:right}.woocommerce-cart table.cart .product-thumbnail{min-width:32px}.woocommerce-cart table.cart img{width:32px;box-shadow:none}.woocommerce-cart table.cart td,.woocommerce-cart table.cart th{vertical-align:middle}.woocommerce-cart table.cart td.actions .coupon .input-text{float:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #d3ced2;padding:6px 6px 5px;margin:0 4px 0 0;outline:0;line-height:1}.woocommerce-cart table.cart input{margin:0;vertical-align:middle;line-height:1}.woocommerce-cart .wc-proceed-to-checkout{padding:1em 0}.woocommerce-cart .wc-proceed-to-checkout:after,.woocommerce-cart .wc-proceed-to-checkout:before{content:" ";display:table}.woocommerce-cart .wc-proceed-to-checkout:after{clear:both}.woocommerce-cart .wc-proceed-to-checkout a.checkout-button{display:block;text-align:center;margin-bottom:1em}.woocommerce-cart .cart-collaterals .shipping_calculator .button{width:100%;float:none;display:block}.woocommerce-cart .cart-collaterals .shipping_calculator .shipping-calculator-button:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-left:.618em;content:""}.woocommerce-cart .cart-collaterals .cart_totals p{margin:0}.woocommerce-cart .cart-collaterals .cart_totals p small{color:#777;font-size:.83em}.woocommerce-cart .cart-collaterals .cart_totals table{border-collapse:separate;border-radius:5px;margin:0 0 6px;padding:0}.woocommerce-cart .cart-collaterals .cart_totals table tr:first-child td,.woocommerce-cart .cart-collaterals .cart_totals table tr:first-child th{border-top:0}.woocommerce-cart .cart-collaterals .cart_totals table th{padding:6px 12px 0 0;width:25%}.woocommerce-cart .cart-collaterals .cart_totals table td{padding:6px 0}.woocommerce-cart .cart-collaterals .cart_totals table td,.woocommerce-cart .cart-collaterals .cart_totals table th{vertical-align:top}.woocommerce-cart .cart-collaterals .cart_totals table small{display:block;color:#777}.woocommerce-cart .cart-collaterals .cart_totals table select{width:100%}.woocommerce-cart .cart-collaterals .cart_totals .discount td{color:#77a464}.woocommerce-cart .cart-collaterals .cart_totals tr td,.woocommerce-cart .cart-collaterals .cart_totals tr th{border-top:1px solid #ebe9eb}.woocommerce-cart .cart-collaterals .cross-sells ul.products li.product{margin-top:0}.woocommerce-checkout .checkout .col-2 h3#ship-to-different-address{float:left;clear:none}.woocommerce-checkout .checkout .col-2 .form-row-first,.woocommerce-checkout .checkout .col-2 .notes{clear:left}.woocommerce-checkout .checkout .create-account small{font-size:11px;color:#777;font-weight:400}.woocommerce-checkout .checkout div.shipping-address{padding:0;clear:left;width:100%}.woocommerce-checkout .checkout .shipping_address{clear:both}.woocommerce-checkout #payment{background:#ebe9eb;border-radius:5px}.woocommerce-checkout #payment ul.payment_methods{text-align:left;padding:1em;border-bottom:1px solid #d3ced2;margin:0;list-style:none}.woocommerce-checkout #payment ul.payment_methods:after,.woocommerce-checkout #payment ul.payment_methods:before{content:" ";display:table}.woocommerce-checkout #payment ul.payment_methods:after{clear:both}.woocommerce-checkout #payment ul.payment_methods li{line-height:2;text-align:left;margin:0;font-weight:400}.woocommerce-checkout #payment ul.payment_methods li input{margin:0 1em 0 0}.woocommerce-checkout #payment ul.payment_methods li img{vertical-align:middle;margin:-2px 0 0 .5em;padding:0;position:relative;box-shadow:none}.woocommerce-checkout #payment ul.payment_methods li img+img{margin-left:2px}.woocommerce-checkout #payment div.form-row{padding:1em}.woocommerce-checkout #payment div.payment_box{position:relative;width:96%;padding:1em 2%;margin:1em 0;font-size:.92em;border-radius:2px;line-height:1.5;background-color:#dfdcde;color:#515151}.woocommerce-checkout #payment div.payment_box input.input-text,.woocommerce-checkout #payment div.payment_box textarea{border-color:#bbb3b9 #c7c1c6 #c7c1c6}.woocommerce-checkout #payment div.payment_box ::-webkit-input-placeholder{color:#bbb3b9}.woocommerce-checkout #payment div.payment_box :-moz-placeholder{color:#bbb3b9}.woocommerce-checkout #payment div.payment_box :-ms-input-placeholder{color:#bbb3b9}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number{font-size:1.5em;padding:8px;background-repeat:no-repeat;background-position:right}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.visa,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.visa,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.visa{background-image:url(../images/icons/credit-cards/visa.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.mastercard,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.mastercard,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.mastercard{background-image:url(../images/icons/credit-cards/mastercard.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.laser,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.laser,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.laser{background-image:url(../images/icons/credit-cards/laser.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.dinersclub,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.dinersclub,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.dinersclub{background-image:url(../images/icons/credit-cards/diners.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.maestro,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.maestro,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.maestro{background-image:url(../images/icons/credit-cards/maestro.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.jcb,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.jcb,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.jcb{background-image:url(../images/icons/credit-cards/jcb.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.amex,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.amex,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.amex{background-image:url(../images/icons/credit-cards/amex.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.discover,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.discover,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.discover{background-image:url(../images/icons/credit-cards/discover.png)}.woocommerce-checkout #payment div.payment_box span.help{font-size:.857em;color:#777;font-weight:400}.woocommerce-checkout #payment div.payment_box .form-row{margin:0 0 1em}.woocommerce-checkout #payment div.payment_box p:last-child{margin-bottom:0}.woocommerce-checkout #payment div.payment_box:after{content:"";display:block;border:8px solid #dfdcde;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;position:absolute;top:-3px;left:0;margin:-1em 0 0 2em}.woocommerce-checkout #payment .payment_method_paypal .about_paypal{float:right;line-height:52px;font-size:.83em}.woocommerce-checkout #payment .payment_method_paypal img{max-height:52px;vertical-align:middle}#content.twentyeleven .woocommerce-pagination a{font-size:1em;line-height:1}.single-product .twentythirteen #reply-title,.single-product .twentythirteen #respond #commentform,.single-product .twentythirteen .entry-summary{padding:0}.single-product .twentythirteen p.stars{clear:both}.twentythirteen .woocommerce-breadcrumb{padding-top:40px}.twentyfourteen ul.products li.product{margin-top:0!important} \ No newline at end of file +@charset "UTF-8";@-moz-keyframes spin{100%{-moz-transform:rotate(360deg)}}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}p.demo_store{position:fixed;top:0;left:0;right:0;margin:0;width:100%;font-size:1em;padding:1em 0;text-align:center;background-color:#a46497;color:#fff;z-index:99998;box-shadow:0 1px 1em rgba(0,0,0,.2)}.admin-bar p.demo_store{top:32px}.wc-forward a:after{font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin-left:.618em;content:"";vertical-align:top;display:inline-block;line-height:inherit}.wc-backward a:before,.wc-backward:before{font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";vertical-align:top;display:inline-block;line-height:inherit}.clear{clear:both}.woocommerce .blockUI.blockOverlay:before,.woocommerce .loader:before{height:1em;width:1em;position:absolute;top:50%;left:50%;margin-left:-.5em;margin-top:-.5em;display:block;-webkit-animation:spin 2s linear infinite;-moz-animation:spin 2s linear infinite;animation:spin 2s linear infinite;font-family:Dashicons;content:"\f463";line-height:1;text-align:center;font-size:2em;color:rgba(0,0,0,.75);vertical-align:top;-webkit-font-smoothing:antialiased;font-weight:400}.woocommerce a.remove{display:block;font-size:1.5em;height:1em;width:1em;text-align:center;line-height:1;border-radius:100%;color:red!important;text-decoration:none;font-weight:700}.woocommerce a.remove:hover{color:#fff!important;background:red}.woocommerce .woocommerce-error,.woocommerce .woocommerce-info,.woocommerce .woocommerce-message{padding:1em 2em 1em 3.5em!important;margin:0 0 2em!important;position:relative;background-color:#f7f6f7;color:#515151;border-top:3px solid #a46497;list-style:none!important;width:auto}.woocommerce .woocommerce-error:after,.woocommerce .woocommerce-error:before,.woocommerce .woocommerce-info:after,.woocommerce .woocommerce-info:before,.woocommerce .woocommerce-message:after,.woocommerce .woocommerce-message:before{content:" ";display:table}.woocommerce .woocommerce-error:after,.woocommerce .woocommerce-info:after,.woocommerce .woocommerce-message:after{clear:both}.woocommerce .woocommerce-error:before,.woocommerce .woocommerce-info:before,.woocommerce .woocommerce-message:before{font-family:WooCommerce;content:"\e028";display:inline-block;position:absolute;top:1em;left:1.5em}.woocommerce .woocommerce-error .button,.woocommerce .woocommerce-info .button,.woocommerce .woocommerce-message .button{float:right}.woocommerce .woocommerce-error li,.woocommerce .woocommerce-info li,.woocommerce .woocommerce-message li{list-style:none!important;padding-left:0!important;margin-left:0!important}.woocommerce .woocommerce-message{border-top-color:#8fae1b}.woocommerce .woocommerce-message:before{content:"\e015";color:#8fae1b}.woocommerce .woocommerce-info{border-top-color:#1e85be}.woocommerce .woocommerce-info:before{color:#1e85be}.woocommerce .woocommerce-error{border-top-color:#b81c23}.woocommerce .woocommerce-error:before{content:"\e016";color:#b81c23}.woocommerce small.note{display:block;color:#777;font-size:.857em;margin-top:10px}.woocommerce .woocommerce-breadcrumb{margin:0 0 1em;padding:0;font-size:.92em;color:#777}.woocommerce .woocommerce-breadcrumb:after,.woocommerce .woocommerce-breadcrumb:before{content:" ";display:table}.woocommerce .woocommerce-breadcrumb:after{clear:both}.woocommerce .woocommerce-breadcrumb a{color:#777}.woocommerce .quantity .qty{width:2.618em;text-align:center}.woocommerce div.product{margin-bottom:0;position:relative}.woocommerce div.product .product_title{clear:none;margin-top:0;padding:0}.woocommerce div.product p.price,.woocommerce div.product span.price{color:#77a464;font-size:1.25em}.woocommerce div.product p.price ins,.woocommerce div.product span.price ins{background:inherit;font-weight:700}.woocommerce div.product p.price del,.woocommerce div.product span.price del{opacity:.5;display:block}.woocommerce div.product p.stock{font-size:.92em}.woocommerce div.product .stock{color:#77a464}.woocommerce div.product .out-of-stock{color:red}.woocommerce div.product .woocommerce-product-rating{margin-bottom:1.618em}.woocommerce div.product div.images{margin-bottom:2em}.woocommerce div.product div.images img{display:block;width:100%;height:auto;box-shadow:none}.woocommerce div.product div.images div.thumbnails{padding-top:1em}.woocommerce div.product div.summary{margin-bottom:2em}.woocommerce div.product div.social{text-align:right;margin:0 0 1em}.woocommerce div.product div.social span{margin:0 0 0 2px}.woocommerce div.product div.social span span{margin:0}.woocommerce div.product div.social span .stButton .chicklets{padding-left:16px;width:0}.woocommerce div.product div.social iframe{float:left;margin-top:3px}.woocommerce div.product .woocommerce-tabs ul.tabs{list-style:none;padding:0 0 0 1em;margin:0 0 1.618em;overflow:hidden;position:relative}.woocommerce div.product .woocommerce-tabs ul.tabs li{border:1px solid #d3ced2;background-color:#ebe9eb;display:inline-block;position:relative;z-index:0;border-radius:4px 4px 0 0;margin:0 -5px;padding:0 1em}.woocommerce div.product .woocommerce-tabs ul.tabs li a{display:inline-block;padding:.5em 0;font-weight:700;color:#515151;text-decoration:none}.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover{text-decoration:none;color:#6b6b6b}.woocommerce div.product .woocommerce-tabs ul.tabs li.active{background:#fff;z-index:2;border-bottom-color:#fff}.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{color:inherit;text-shadow:inherit}.woocommerce div.product .woocommerce-tabs ul.tabs li.active:before{box-shadow:2px 2px 0 #fff}.woocommerce div.product .woocommerce-tabs ul.tabs li.active:after{box-shadow:-2px 2px 0 #fff}.woocommerce div.product .woocommerce-tabs ul.tabs li:after,.woocommerce div.product .woocommerce-tabs ul.tabs li:before{border:1px solid #d3ced2;position:absolute;bottom:-1px;width:5px;height:5px;content:" "}.woocommerce div.product .woocommerce-tabs ul.tabs li:before{left:-6px;-webkit-border-bottom-right-radius:4px;-moz-border-bottom-right-radius:4px;border-bottom-right-radius:4px;border-width:0 1px 1px 0;box-shadow:2px 2px 0 #ebe9eb}.woocommerce div.product .woocommerce-tabs ul.tabs li:after{right:-6px;-webkit-border-bottom-left-radius:4px;-moz-border-bottom-left-radius:4px;border-bottom-left-radius:4px;border-width:0 0 1px 1px;box-shadow:-2px 2px 0 #ebe9eb}.woocommerce div.product .woocommerce-tabs ul.tabs:before{position:absolute;content:" ";width:100%;bottom:0;left:0;border-bottom:1px solid #d3ced2;z-index:1}.woocommerce div.product .woocommerce-tabs .panel{margin:0 0 2em;padding:0}.woocommerce div.product p.cart{margin-bottom:2em}.woocommerce div.product p.cart:after,.woocommerce div.product p.cart:before{content:" ";display:table}.woocommerce div.product p.cart:after{clear:both}.woocommerce div.product form.cart{margin-bottom:2em}.woocommerce div.product form.cart:after,.woocommerce div.product form.cart:before{content:" ";display:table}.woocommerce div.product form.cart:after{clear:both}.woocommerce div.product form.cart div.quantity{float:left;margin:0 4px 0 0}.woocommerce div.product form.cart table{border-width:0 0 1px}.woocommerce div.product form.cart table td{padding-left:0}.woocommerce div.product form.cart table div.quantity{float:none;margin:0}.woocommerce div.product form.cart table small.stock{display:block;float:none}.woocommerce div.product form.cart .variations{margin-bottom:1em}.woocommerce div.product form.cart .variations label{font-weight:700}.woocommerce div.product form.cart .variations select{width:100%;float:left}.woocommerce div.product form.cart .variations td.label{padding-right:1em}.woocommerce div.product form.cart .variations td{vertical-align:top}.woocommerce div.product form.cart .button{vertical-align:middle;float:left}.woocommerce div.product form.cart .group_table td.label{padding-right:1em;padding-left:1em}.woocommerce div.product form.cart .group_table td{vertical-align:top;padding-bottom:.5em;border:0}.woocommerce span.onsale{min-height:3.236em;min-width:3.236em;padding:.202em;font-weight:700;position:absolute;text-align:center;line-height:3.236;top:-.5em;left:-.5em;margin:0;border-radius:100%;background-color:#77a464;color:#fff;font-size:.857em;-webkit-font-smoothing:antialiased}.woocommerce .products ul,.woocommerce ul.products{margin:0 0 1em;padding:0;list-style:none;clear:both}.woocommerce .products ul:after,.woocommerce .products ul:before,.woocommerce ul.products:after,.woocommerce ul.products:before{content:" ";display:table}.woocommerce .products ul:after,.woocommerce ul.products:after{clear:both}.woocommerce .products ul li,.woocommerce ul.products li{list-style:none}.woocommerce ul.products li.product .onsale{top:0;right:0;left:auto;margin:-.5em -.5em 0 0}.woocommerce ul.products li.product h3{padding:.5em 0;margin:0;font-size:1em}.woocommerce ul.products li.product a{text-decoration:none}.woocommerce ul.products li.product a img{width:100%;height:auto;display:block;margin:0 0 1em;box-shadow:none}.woocommerce ul.products li.product strong{display:block}.woocommerce ul.products li.product .star-rating{font-size:.857em}.woocommerce ul.products li.product .button{margin-top:1em}.woocommerce ul.products li.product .price{color:#77a464;display:block;font-weight:400;margin-bottom:.5em;font-size:.857em}.woocommerce ul.products li.product .price del{color:inherit;opacity:.5;display:block}.woocommerce ul.products li.product .price ins{background:0 0;font-weight:700}.woocommerce ul.products li.product .price .from{font-size:.67em;margin:-2px 0 0;text-transform:uppercase;color:rgba(132,132,132,.5)}.woocommerce .woocommerce-ordering,.woocommerce .woocommerce-result-count{margin:0 0 1em}.woocommerce .woocommerce-ordering select{vertical-align:top}.woocommerce nav.woocommerce-pagination{text-align:center}.woocommerce nav.woocommerce-pagination ul{display:inline-block;white-space:nowrap;padding:0;clear:both;border:1px solid #d3ced2;border-right:0;margin:1px}.woocommerce nav.woocommerce-pagination ul li{border-right:1px solid #d3ced2;padding:0;margin:0;float:left;display:inline;overflow:hidden}.woocommerce nav.woocommerce-pagination ul li a,.woocommerce nav.woocommerce-pagination ul li span{margin:0;text-decoration:none;line-height:1;font-size:1em;font-weight:400;padding:.5em;min-width:1em;display:block}.woocommerce nav.woocommerce-pagination ul li a:focus,.woocommerce nav.woocommerce-pagination ul li a:hover,.woocommerce nav.woocommerce-pagination ul li span.current{background:#ebe9eb;color:#8a7e88}.woocommerce #respond input#submit,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button{font-size:100%;margin:0;line-height:1;cursor:pointer;position:relative;font-family:inherit;text-decoration:none;overflow:visible;padding:.618em 1em;font-weight:700;border-radius:3px;left:auto;color:#515151;background-color:#ebe9eb;border:0;white-space:nowrap;display:inline-block;background-image:none;box-shadow:none;-webkit-box-shadow:none;text-shadow:none}.woocommerce #respond input#submit.loading,.woocommerce a.button.loading,.woocommerce button.button.loading,.woocommerce input.button.loading{opacity:.25;padding-right:2.618em}.woocommerce #respond input#submit.loading:after,.woocommerce a.button.loading:after,.woocommerce button.button.loading:after,.woocommerce input.button.loading:after{font-family:Dashicons;content:"\f463";vertical-align:top;-webkit-font-smoothing:antialiased;font-weight:400;position:absolute;top:.618em;right:1em;-webkit-animation:spin 2s linear infinite;-moz-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.woocommerce #respond input#submit.added:after,.woocommerce a.button.added:after,.woocommerce button.button.added:after,.woocommerce input.button.added:after{font-family:WooCommerce;content:"\e017";margin-left:.53em;vertical-align:bottom}.woocommerce #respond input#submit:hover,.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover{background-color:#dad8da;text-decoration:none;background-image:none;color:#515151}.woocommerce #respond input#submit.alt,.woocommerce a.button.alt,.woocommerce button.button.alt,.woocommerce input.button.alt{background-color:#a46497;color:#fff;-webkit-font-smoothing:antialiased}.woocommerce #respond input#submit.alt:hover,.woocommerce a.button.alt:hover,.woocommerce button.button.alt:hover,.woocommerce input.button.alt:hover{background-color:#935386;color:#fff}.woocommerce #respond input#submit.alt.disabled,.woocommerce #respond input#submit.alt.disabled:hover,.woocommerce #respond input#submit.alt:disabled,.woocommerce #respond input#submit.alt:disabled:hover,.woocommerce #respond input#submit.alt:disabled[disabled],.woocommerce #respond input#submit.alt:disabled[disabled]:hover,.woocommerce a.button.alt.disabled,.woocommerce a.button.alt.disabled:hover,.woocommerce a.button.alt:disabled,.woocommerce a.button.alt:disabled:hover,.woocommerce a.button.alt:disabled[disabled],.woocommerce a.button.alt:disabled[disabled]:hover,.woocommerce button.button.alt.disabled,.woocommerce button.button.alt.disabled:hover,.woocommerce button.button.alt:disabled,.woocommerce button.button.alt:disabled:hover,.woocommerce button.button.alt:disabled[disabled],.woocommerce button.button.alt:disabled[disabled]:hover,.woocommerce input.button.alt.disabled,.woocommerce input.button.alt.disabled:hover,.woocommerce input.button.alt:disabled,.woocommerce input.button.alt:disabled:hover,.woocommerce input.button.alt:disabled[disabled],.woocommerce input.button.alt:disabled[disabled]:hover{background-color:#a46497;color:#fff}.woocommerce #respond input#submit.disabled,.woocommerce #respond input#submit:disabled,.woocommerce #respond input#submit:disabled[disabled],.woocommerce a.button.disabled,.woocommerce a.button:disabled,.woocommerce a.button:disabled[disabled],.woocommerce button.button.disabled,.woocommerce button.button:disabled,.woocommerce button.button:disabled[disabled],.woocommerce input.button.disabled,.woocommerce input.button:disabled,.woocommerce input.button:disabled[disabled]{color:inherit;cursor:not-allowed;opacity:.5}.woocommerce #respond input#submit.disabled:hover,.woocommerce #respond input#submit:disabled:hover,.woocommerce #respond input#submit:disabled[disabled]:hover,.woocommerce a.button.disabled:hover,.woocommerce a.button:disabled:hover,.woocommerce a.button:disabled[disabled]:hover,.woocommerce button.button.disabled:hover,.woocommerce button.button:disabled:hover,.woocommerce button.button:disabled[disabled]:hover,.woocommerce input.button.disabled:hover,.woocommerce input.button:disabled:hover,.woocommerce input.button:disabled[disabled]:hover{color:inherit;background-color:#ebe9eb}.woocommerce .cart .button,.woocommerce .cart input.button{float:none}.woocommerce a.added_to_cart{padding-top:.5em;white-space:nowrap;display:inline-block}.woocommerce #reviews h2 small{float:right;color:#777;font-size:15px;margin:10px 0 0}.woocommerce #reviews h2 small a{text-decoration:none;color:#777}.woocommerce #reviews h3{margin:0}.woocommerce #reviews #respond{margin:0;border:0;padding:0}.woocommerce #reviews #comment{height:75px}.woocommerce #reviews #comments .add_review:after,.woocommerce #reviews #comments .add_review:before{content:" ";display:table}.woocommerce #reviews #comments .add_review:after{clear:both}.woocommerce #reviews #comments h2{clear:none}.woocommerce #reviews #comments ol.commentlist{margin:0;width:100%;background:0 0;list-style:none}.woocommerce #reviews #comments ol.commentlist:after,.woocommerce #reviews #comments ol.commentlist:before{content:" ";display:table}.woocommerce #reviews #comments ol.commentlist:after{clear:both}.woocommerce #reviews #comments ol.commentlist li{padding:0;margin:0 0 20px;position:relative;background:0;border:0}.woocommerce #reviews #comments ol.commentlist li .meta{color:#777;font-size:.75em}.woocommerce #reviews #comments ol.commentlist li img.avatar{float:left;position:absolute;top:0;left:0;padding:3px;width:32px;height:auto;background:#ebe9eb;border:1px solid #e4e1e3;margin:0;box-shadow:none}.woocommerce #reviews #comments ol.commentlist li .comment-text{margin:0 0 0 50px;border:1px solid #e4e1e3;border-radius:4px;padding:1em 1em 0}.woocommerce #reviews #comments ol.commentlist li .comment-text:after,.woocommerce #reviews #comments ol.commentlist li .comment-text:before{content:" ";display:table}.woocommerce #reviews #comments ol.commentlist li .comment-text:after{clear:both}.woocommerce #reviews #comments ol.commentlist li .comment-text p{margin:0 0 1em}.woocommerce #reviews #comments ol.commentlist li .comment-text p.meta{font-size:.83em}.woocommerce #reviews #comments ol.commentlist ul.children{list-style:none;margin:20px 0 0 50px}.woocommerce #reviews #comments ol.commentlist ul.children .star-rating{display:none}.woocommerce #reviews #comments ol.commentlist #respond{border:1px solid #e4e1e3;border-radius:4px;padding:1em 1em 0;margin:20px 0 0 50px}.woocommerce #reviews #comments .commentlist>li:before{content:""}.woocommerce .star-rating{float:right;overflow:hidden;position:relative;height:1em;line-height:1;font-size:1em;width:5.4em;font-family:star}.woocommerce .star-rating:before{content:"\73\73\73\73\73";color:#d3ced2;float:left;top:0;left:0;position:absolute}.woocommerce .star-rating span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}.woocommerce .star-rating span:before{content:"\53\53\53\53\53";top:0;position:absolute;left:0}.woocommerce .woocommerce-product-rating{line-height:2;display:block}.woocommerce .woocommerce-product-rating:after,.woocommerce .woocommerce-product-rating:before{content:" ";display:table}.woocommerce .woocommerce-product-rating:after{clear:both}.woocommerce .woocommerce-product-rating .star-rating{margin:.5em 4px 0 0;float:left}.woocommerce .products .star-rating{display:block;margin:0 0 .5em;float:none}.woocommerce .hreview-aggregate .star-rating{margin:10px 0 0}.woocommerce #review_form #respond{position:static;margin:0;width:auto;padding:0;background:0 0;border:0}.woocommerce #review_form #respond:after,.woocommerce #review_form #respond:before{content:" ";display:table}.woocommerce #review_form #respond:after{clear:both}.woocommerce #review_form #respond p{margin:0 0 10px}.woocommerce #review_form #respond .form-submit input{left:auto}.woocommerce #review_form #respond textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.woocommerce p.stars{position:relative;font-size:1em}.woocommerce p.stars a{display:inline-block;font-weight:700;margin-right:1em;text-indent:-9999px;position:relative;border-bottom:0!important}.woocommerce p.stars a:last-child{border-right:0}.woocommerce p.stars a.star-1,.woocommerce p.stars a.star-2,.woocommerce p.stars a.star-3,.woocommerce p.stars a.star-4,.woocommerce p.stars a.star-5{border-right:1px solid #ccc}.woocommerce p.stars a.star-1:after,.woocommerce p.stars a.star-2:after,.woocommerce p.stars a.star-3:after,.woocommerce p.stars a.star-4:after,.woocommerce p.stars a.star-5:after{font-family:WooCommerce;text-indent:0;position:absolute;top:0;left:0}.woocommerce p.stars a.star-1{width:2em}.woocommerce p.stars a.star-1:after{content:"\e021"}.woocommerce p.stars a.star-1.active:after,.woocommerce p.stars a.star-1:hover:after{content:""}.woocommerce p.stars a.star-2{width:3em}.woocommerce p.stars a.star-2:after{content:"\e021\e021"}.woocommerce p.stars a.star-2.active:after,.woocommerce p.stars a.star-2:hover:after{content:""}.woocommerce p.stars a.star-3{width:4em}.woocommerce p.stars a.star-3:after{content:"\e021\e021\e021"}.woocommerce p.stars a.star-3.active:after,.woocommerce p.stars a.star-3:hover:after{content:""}.woocommerce p.stars a.star-4{width:5em}.woocommerce p.stars a.star-4:after{content:"\e021\e021\e021\e021"}.woocommerce p.stars a.star-4.active:after,.woocommerce p.stars a.star-4:hover:after{content:""}.woocommerce p.stars a.star-5{width:6em;border:0}.woocommerce p.stars a.star-5:after{content:"\e021\e021\e021\e021\e021"}.woocommerce p.stars a.star-5.active:after,.woocommerce p.stars a.star-5:hover:after{content:""}.woocommerce table.shop_attributes{border:0;border-top:1px dotted rgba(0,0,0,.1);margin-bottom:1.618em;width:100%}.woocommerce table.shop_attributes th{width:150px;font-weight:700;padding:8px;border-top:0;border-bottom:1px dotted rgba(0,0,0,.1);margin:0;line-height:1.5}.woocommerce table.shop_attributes td{font-style:italic;padding:0;border-top:0;border-bottom:1px dotted rgba(0,0,0,.1);margin:0;line-height:1.5}.woocommerce table.shop_attributes td p{margin:0;padding:8px 0}.woocommerce table.shop_attributes .alt td,.woocommerce table.shop_attributes .alt th{background:rgba(0,0,0,.025)}.woocommerce table.shop_table{border:1px solid rgba(0,0,0,.1);margin:0 -1px 24px 0;text-align:left;width:100%;border-collapse:separate;border-radius:5px}.woocommerce table.shop_table th{font-weight:700;padding:9px 12px}.woocommerce table.shop_table td{border-top:1px solid rgba(0,0,0,.1);padding:6px 12px;vertical-align:middle}.woocommerce table.shop_table td small{font-weight:400}.woocommerce table.shop_table tbody tr:first-child td,.woocommerce table.shop_table tbody tr:first-child th{border-top:0}.woocommerce table.shop_table tbody th,.woocommerce table.shop_table tfoot td,.woocommerce table.shop_table tfoot th{font-weight:700;border-top:1px solid rgba(0,0,0,.1)}.woocommerce table.my_account_orders{font-size:.85em}.woocommerce table.my_account_orders td,.woocommerce table.my_account_orders th{padding:4px 8px;vertical-align:middle}.woocommerce table.my_account_orders .button{white-space:nowrap}.woocommerce table.my_account_orders .order-actions{text-align:right}.woocommerce table.my_account_orders .order-actions .button{margin:.125em 0 .125em .25em}.woocommerce td.product-name dl.variation{margin:.25em 0}.woocommerce td.product-name dl.variation:after,.woocommerce td.product-name dl.variation:before{content:" ";display:table}.woocommerce td.product-name dl.variation:after{clear:both}.woocommerce td.product-name dl.variation dd,.woocommerce td.product-name dl.variation dt{display:inline-block;float:left;margin-bottom:1em}.woocommerce td.product-name dl.variation dt{font-weight:700;padding:0 0 .25em;margin:0 4px 0 0;clear:left}.woocommerce td.product-name dl.variation dd{padding:0 0 .25em}.woocommerce td.product-name dl.variation dd p:last-child{margin-bottom:0}.woocommerce td.product-name p.backorder_notification{font-size:.83em}.woocommerce td.product-quantity{min-width:80px}.woocommerce ul.cart_list,.woocommerce ul.product_list_widget{list-style:none;padding:0;margin:0}.woocommerce ul.cart_list li,.woocommerce ul.product_list_widget li{padding:4px 0;margin:0;list-style:none}.woocommerce ul.cart_list li:after,.woocommerce ul.cart_list li:before,.woocommerce ul.product_list_widget li:after,.woocommerce ul.product_list_widget li:before{content:" ";display:table}.woocommerce ul.cart_list li:after,.woocommerce ul.product_list_widget li:after{clear:both}.woocommerce ul.cart_list li a,.woocommerce ul.product_list_widget li a{display:block;font-weight:700}.woocommerce ul.cart_list li img,.woocommerce ul.product_list_widget li img{float:right;margin-left:4px;width:32px;height:auto;box-shadow:none}.woocommerce ul.cart_list li dl,.woocommerce ul.product_list_widget li dl{margin:0;padding-left:1em;border-left:2px solid rgba(0,0,0,.1)}.woocommerce ul.cart_list li dl:after,.woocommerce ul.cart_list li dl:before,.woocommerce ul.product_list_widget li dl:after,.woocommerce ul.product_list_widget li dl:before{content:" ";display:table}.woocommerce ul.cart_list li dl:after,.woocommerce ul.product_list_widget li dl:after{clear:both}.woocommerce ul.cart_list li dl dd,.woocommerce ul.cart_list li dl dt,.woocommerce ul.product_list_widget li dl dd,.woocommerce ul.product_list_widget li dl dt{display:inline-block;float:left;margin-bottom:1em}.woocommerce ul.cart_list li dl dt,.woocommerce ul.product_list_widget li dl dt{font-weight:700;padding:0 0 .25em;margin:0 4px 0 0;clear:left}.woocommerce ul.cart_list li dl dd,.woocommerce ul.product_list_widget li dl dd{padding:0 0 .25em}.woocommerce ul.cart_list li dl dd p:last-child,.woocommerce ul.product_list_widget li dl dd p:last-child{margin-bottom:0}.woocommerce ul.cart_list li .star-rating,.woocommerce ul.product_list_widget li .star-rating{float:none}.woocommerce .widget_shopping_cart .total,.woocommerce.widget_shopping_cart .total{border-top:3px double #ebe9eb;padding:4px 0 0}.woocommerce .widget_shopping_cart .total strong,.woocommerce.widget_shopping_cart .total strong{min-width:40px;display:inline-block}.woocommerce .widget_shopping_cart .cart_list li,.woocommerce.widget_shopping_cart .cart_list li{padding-left:2em;position:relative;padding-top:0}.woocommerce .widget_shopping_cart .cart_list li a.remove,.woocommerce.widget_shopping_cart .cart_list li a.remove{position:absolute;top:0;left:0}.woocommerce .widget_shopping_cart .buttons:after,.woocommerce .widget_shopping_cart .buttons:before,.woocommerce.widget_shopping_cart .buttons:after,.woocommerce.widget_shopping_cart .buttons:before{content:" ";display:table}.woocommerce .widget_shopping_cart .buttons:after,.woocommerce.widget_shopping_cart .buttons:after{clear:both}.woocommerce form .form-row{padding:3px;margin:0 0 6px}.woocommerce form .form-row [placeholder]:focus::-webkit-input-placeholder{-webkit-transition:opacity .5s .5s ease;-moz-transition:opacity .5s .5s ease;transition:opacity .5s .5s ease;opacity:0}.woocommerce form .form-row label{line-height:2}.woocommerce form .form-row label.hidden{visibility:hidden}.woocommerce form .form-row label.inline{display:inline}.woocommerce form .form-row select{cursor:pointer;margin:0}.woocommerce form .form-row .required{color:red;font-weight:700;border:0}.woocommerce form .form-row .input-checkbox{display:inline;margin:-2px 8px 0 0;text-align:center;vertical-align:middle}.woocommerce form .form-row input.input-text,.woocommerce form .form-row textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;margin:0;outline:0;line-height:1}.woocommerce form .form-row textarea{height:4em;line-height:1.5;display:block;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.woocommerce form .form-row.woocommerce-invalid .chosen-drop,.woocommerce form .form-row.woocommerce-invalid .chosen-single,.woocommerce form .form-row.woocommerce-invalid input.input-text,.woocommerce form .form-row.woocommerce-invalid select{border-color:#a00}.woocommerce form .form-row.woocommerce-validated .chosen-drop,.woocommerce form .form-row.woocommerce-validated .chosen-single,.woocommerce form .form-row.woocommerce-validated input.input-text,.woocommerce form .form-row.woocommerce-validated select{border-color:#69bf29}.woocommerce form .form-row ::-webkit-input-placeholder{line-height:normal}.woocommerce form .form-row :-moz-placeholder{line-height:normal}.woocommerce form .form-row :-ms-input-placeholder{line-height:normal}.woocommerce form.checkout_coupon,.woocommerce form.login,.woocommerce form.register{border:1px solid #d3ced2;padding:20px;margin:2em 0;text-align:left;border-radius:5px}.woocommerce ul#shipping_method{list-style:none;margin:0;padding:0}.woocommerce ul#shipping_method li{margin:0;padding:.25em 0 .25em 22px;text-indent:-22px;list-style:none}.woocommerce ul#shipping_method .amount{font-weight:700}.woocommerce p.woocommerce-shipping-contents{margin:0}.woocommerce .order_details{margin:0 0 1.5em;list-style:none}.woocommerce .order_details:after,.woocommerce .order_details:before{content:" ";display:table}.woocommerce .order_details:after{clear:both}.woocommerce .order_details li{float:left;margin-right:2em;text-transform:uppercase;font-size:.715em;line-height:1;border-right:1px dashed #d3ced2;padding-right:2em}.woocommerce .order_details li strong{display:block;font-size:1.4em;text-transform:none;line-height:1.5}.woocommerce .order_details li:last-of-type{border:none}.woocommerce .widget_layered_nav ul{margin:0;padding:0;border:0;list-style:none}.woocommerce .widget_layered_nav ul li{padding:0 0 1px;list-style:none}.woocommerce .widget_layered_nav ul li:after,.woocommerce .widget_layered_nav ul li:before{content:" ";display:table}.woocommerce .widget_layered_nav ul li:after{clear:both}.woocommerce .widget_layered_nav ul li a,.woocommerce .widget_layered_nav ul li span{padding:1px 0}.woocommerce .widget_layered_nav ul li.chosen a:before{font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";vertical-align:top;display:inline-block;color:#a00}.woocommerce .widget_layered_nav_filters ul{margin:0;padding:0;border:0;list-style:none;overflow:hidden;zoom:1}.woocommerce .widget_layered_nav_filters ul li{float:left;padding:0 1px 1px 0;list-style:none}.woocommerce .widget_layered_nav_filters ul li a:before{font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";vertical-align:top;display:inline-block;color:#a00}.woocommerce .widget_price_filter .price_slider{margin-bottom:1em}.woocommerce .widget_price_filter .price_slider_amount{text-align:right;line-height:2.4;font-size:.8751em}.woocommerce .widget_price_filter .price_slider_amount .button{font-size:1.15em;float:left}.woocommerce .widget_price_filter .ui-slider{position:relative;text-align:left}.woocommerce .widget_price_filter .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1em;height:1em;background-color:#a46497;border-radius:1em;cursor:ew-resize;outline:0;top:-.3em}.woocommerce .widget_price_filter .ui-slider .ui-slider-handle:last-child{margin-left:-.8em}.woocommerce .widget_price_filter .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;border-radius:1em;background-color:#a46497}.woocommerce .widget_price_filter .price_slider_wrapper .ui-widget-content{border-radius:1em;background-color:#602053;border:0}.woocommerce .widget_price_filter .ui-slider-horizontal{height:.5em}.woocommerce .widget_price_filter .ui-slider-horizontal .ui-slider-range{top:0;height:100%}.woocommerce .widget_price_filter .ui-slider-horizontal .ui-slider-range-min{left:-1px}.woocommerce .widget_price_filter .ui-slider-horizontal .ui-slider-range-max{right:-1px}.woocommerce-account .addresses .title:after,.woocommerce-account .addresses .title:before{content:" ";display:table}.woocommerce-account .addresses .title:after{clear:both}.woocommerce-account .addresses .title h3{float:left}.woocommerce-account .addresses .title .edit{float:right}.woocommerce-account ol.commentlist.notes li.note p.meta{font-weight:700;margin-bottom:0}.woocommerce-account ol.commentlist.notes li.note .description p:last-child{margin-bottom:0}.woocommerce-account ul.digital-downloads{margin-left:0;padding-left:0}.woocommerce-account ul.digital-downloads li{list-style:none;margin-left:0;padding-left:0}.woocommerce-account ul.digital-downloads li:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:""}.woocommerce-account ul.digital-downloads li .count{float:right}.woocommerce-cart table.cart .product-thumbnail{min-width:32px}.woocommerce-cart table.cart img{width:32px;box-shadow:none}.woocommerce-cart table.cart td,.woocommerce-cart table.cart th{vertical-align:middle}.woocommerce-cart table.cart td.actions .coupon .input-text{float:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #d3ced2;padding:6px 6px 5px;margin:0 4px 0 0;outline:0;line-height:1}.woocommerce-cart table.cart input{margin:0;vertical-align:middle;line-height:1}.woocommerce-cart .wc-proceed-to-checkout{padding:1em 0}.woocommerce-cart .wc-proceed-to-checkout:after,.woocommerce-cart .wc-proceed-to-checkout:before{content:" ";display:table}.woocommerce-cart .wc-proceed-to-checkout:after{clear:both}.woocommerce-cart .wc-proceed-to-checkout a.checkout-button{display:block;text-align:center;margin-bottom:1em}.woocommerce-cart .cart-collaterals .shipping_calculator .button{width:100%;float:none;display:block}.woocommerce-cart .cart-collaterals .shipping_calculator .shipping-calculator-button:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-left:.618em;content:""}.woocommerce-cart .cart-collaterals .cart_totals p{margin:0}.woocommerce-cart .cart-collaterals .cart_totals p small{color:#777;font-size:.83em}.woocommerce-cart .cart-collaterals .cart_totals table{border-collapse:separate;border-radius:5px;margin:0 0 6px;padding:0}.woocommerce-cart .cart-collaterals .cart_totals table tr:first-child td,.woocommerce-cart .cart-collaterals .cart_totals table tr:first-child th{border-top:0}.woocommerce-cart .cart-collaterals .cart_totals table th{padding:6px 12px 0 0;width:25%}.woocommerce-cart .cart-collaterals .cart_totals table td{padding:6px 0}.woocommerce-cart .cart-collaterals .cart_totals table td,.woocommerce-cart .cart-collaterals .cart_totals table th{vertical-align:top}.woocommerce-cart .cart-collaterals .cart_totals table small{display:block;color:#777}.woocommerce-cart .cart-collaterals .cart_totals table select{width:100%}.woocommerce-cart .cart-collaterals .cart_totals .discount td{color:#77a464}.woocommerce-cart .cart-collaterals .cart_totals tr td,.woocommerce-cart .cart-collaterals .cart_totals tr th{border-top:1px solid #ebe9eb}.woocommerce-cart .cart-collaterals .cross-sells ul.products li.product{margin-top:0}.woocommerce-checkout .checkout .col-2 h3#ship-to-different-address{float:left;clear:none}.woocommerce-checkout .checkout .col-2 .form-row-first,.woocommerce-checkout .checkout .col-2 .notes{clear:left}.woocommerce-checkout .checkout .create-account small{font-size:11px;color:#777;font-weight:400}.woocommerce-checkout .checkout div.shipping-address{padding:0;clear:left;width:100%}.woocommerce-checkout .checkout .shipping_address{clear:both}.woocommerce-checkout #payment{background:#ebe9eb;border-radius:5px}.woocommerce-checkout #payment ul.payment_methods{text-align:left;padding:1em;border-bottom:1px solid #d3ced2;margin:0;list-style:none}.woocommerce-checkout #payment ul.payment_methods:after,.woocommerce-checkout #payment ul.payment_methods:before{content:" ";display:table}.woocommerce-checkout #payment ul.payment_methods:after{clear:both}.woocommerce-checkout #payment ul.payment_methods li{line-height:2;text-align:left;margin:0;font-weight:400}.woocommerce-checkout #payment ul.payment_methods li input{margin:0 1em 0 0}.woocommerce-checkout #payment ul.payment_methods li img{vertical-align:middle;margin:-2px 0 0 .5em;padding:0;position:relative;box-shadow:none}.woocommerce-checkout #payment ul.payment_methods li img+img{margin-left:2px}.woocommerce-checkout #payment div.form-row{padding:1em}.woocommerce-checkout #payment div.payment_box{position:relative;width:96%;padding:1em 2%;margin:1em 0;font-size:.92em;border-radius:2px;line-height:1.5;background-color:#dfdcde;color:#515151}.woocommerce-checkout #payment div.payment_box input.input-text,.woocommerce-checkout #payment div.payment_box textarea{border-color:#bbb3b9 #c7c1c6 #c7c1c6}.woocommerce-checkout #payment div.payment_box ::-webkit-input-placeholder{color:#bbb3b9}.woocommerce-checkout #payment div.payment_box :-moz-placeholder{color:#bbb3b9}.woocommerce-checkout #payment div.payment_box :-ms-input-placeholder{color:#bbb3b9}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number{font-size:1.5em;padding:8px;background-repeat:no-repeat;background-position:right}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.visa,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.visa,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.visa{background-image:url(../images/icons/credit-cards/visa.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.mastercard,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.mastercard,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.mastercard{background-image:url(../images/icons/credit-cards/mastercard.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.laser,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.laser,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.laser{background-image:url(../images/icons/credit-cards/laser.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.dinersclub,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.dinersclub,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.dinersclub{background-image:url(../images/icons/credit-cards/diners.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.maestro,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.maestro,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.maestro{background-image:url(../images/icons/credit-cards/maestro.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.jcb,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.jcb,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.jcb{background-image:url(../images/icons/credit-cards/jcb.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.amex,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.amex,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.amex{background-image:url(../images/icons/credit-cards/amex.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.discover,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.discover,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.discover{background-image:url(../images/icons/credit-cards/discover.png)}.woocommerce-checkout #payment div.payment_box span.help{font-size:.857em;color:#777;font-weight:400}.woocommerce-checkout #payment div.payment_box .form-row{margin:0 0 1em}.woocommerce-checkout #payment div.payment_box p:last-child{margin-bottom:0}.woocommerce-checkout #payment div.payment_box:after{content:"";display:block;border:8px solid #dfdcde;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;position:absolute;top:-3px;left:0;margin:-1em 0 0 2em}.woocommerce-checkout #payment .payment_method_paypal .about_paypal{float:right;line-height:52px;font-size:.83em}.woocommerce-checkout #payment .payment_method_paypal img{max-height:52px;vertical-align:middle}#content.twentyeleven .woocommerce-pagination a{font-size:1em;line-height:1}.single-product .twentythirteen #reply-title,.single-product .twentythirteen #respond #commentform,.single-product .twentythirteen .entry-summary{padding:0}.single-product .twentythirteen p.stars{clear:both}.twentythirteen .woocommerce-breadcrumb{padding-top:40px}.twentyfourteen ul.products li.product{margin-top:0!important} \ No newline at end of file diff --git a/assets/css/woocommerce.scss b/assets/css/woocommerce.scss index e3c4d0e49d0..5f4666a90f9 100644 --- a/assets/css/woocommerce.scss +++ b/assets/css/woocommerce.scss @@ -912,6 +912,7 @@ p.demo_store { margin-right: 1em; text-indent: -9999px; position: relative; + border-bottom: 0 !important; &:last-child { border-right: 0; From 7d32875bf3e0fb28f1317ac2cc9998b1b93faaa3 Mon Sep 17 00:00:00 2001 From: James Koster Date: Fri, 21 Nov 2014 10:51:47 +0000 Subject: [PATCH 241/743] changelog --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index d488b1a42cc..0ad2ea7bd16 100644 --- a/readme.txt +++ b/readme.txt @@ -137,6 +137,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Feature - Bulk edit sales schedule on variations. * Feature - Fresh new frontend design. * Feature - Undo link in message when removing products from the cart. +* Feature - Compatibility with Twenty Fifteen default theme. * Refactor - Removed deprecated methods from WC_Frontend_Scripts and rewrote script registration and localization to run once. * Refactor - Routing all email functionality through one send() method. * Refactor - Replaced existing email css inliner with Emogrifier. From b440a6a165e4c1e2feea5c6410bab53e8afb32ef Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Fri, 21 Nov 2014 12:05:44 +0000 Subject: [PATCH 242/743] Split find_rates method --- includes/class-wc-tax.php | 120 ++++++++++++++++++++++---------------- 1 file changed, 69 insertions(+), 51 deletions(-) diff --git a/includes/class-wc-tax.php b/includes/class-wc-tax.php index 17b4adef266..2a585f86ca7 100644 --- a/includes/class-wc-tax.php +++ b/includes/class-wc-tax.php @@ -197,22 +197,17 @@ class WC_Tax { /** * Searches for all matching country/state/postcode tax rates. * - * @access public * @param array $args * @return array */ public static function find_rates( $args = array() ) { - global $wpdb; - - $defaults = array( - 'country' => '', - 'state' => '', - 'city' => '', - 'postcode' => '', - 'tax_class' => '' - ); - - $args = wp_parse_args( $args, $defaults ); + $args = wp_parse_args( $args, array( + 'country' => '', + 'state' => '', + 'city' => '', + 'postcode' => '', + 'tax_class' => '' + ) ); extract( $args, EXTR_SKIP ); @@ -220,28 +215,34 @@ class WC_Tax { return array(); } - // Handle postcodes - $valid_postcodes = array( '*', strtoupper( wc_clean( $postcode ) ) ); - - // Work out possible valid wildcard postcodes - $postcode_length = strlen( $postcode ); - $wildcard_postcode = strtoupper( wc_clean( $postcode ) ); - - for ( $i = 0; $i < $postcode_length; $i ++ ) { - - $wildcard_postcode = substr( $wildcard_postcode, 0, -1 ); - - $valid_postcodes[] = $wildcard_postcode . '*'; - } - - // Build transient key and try to retrieve them from cache + $valid_postcodes = self::_get_wildcard_postcodes( wc_clean( $postcode ) ); $rates_transient_key = 'wc_tax_rates_' . md5( sprintf( '%s+%s+%s+%s+%s', $country, $state, $city, implode( ',', $valid_postcodes), $tax_class ) ); - $matched_tax_rates = get_transient( $rates_transient_key ); + $matched_tax_rates = get_transient( $rates_transient_key ); if ( false === $matched_tax_rates ) { + $matched_tax_rates = self::get_matched_tax_rates( $country, $state, $postcode, $city, $tax_class, $valid_postcodes ); + set_transient( $rates_transient_key, $matched_tax_rates, WEEK_IN_SECONDS ); + } - // Run the query - $found_rates = $wpdb->get_results( $wpdb->prepare( " + return $matched_tax_rates; + } + + /** + * Loop through a set of tax rates and get the matching rates (1 per priority) + * + * @param string $country + * @param string $state + * @param string $postcode + * @param string $city + * @param string $tax_class + * @param array $valid_postcodes + * @return array + */ + private static function get_matched_tax_rates( $country, $state, $postcode, $city, $tax_class, $valid_postcodes ) { + global $wpdb; + + $found_rates = $wpdb->get_results( + $wpdb->prepare( " SELECT tax_rates.* FROM {$wpdb->prefix}woocommerce_tax_rates as tax_rates LEFT OUTER JOIN {$wpdb->prefix}woocommerce_tax_rate_locations as locations ON tax_rates.tax_rate_id = locations.tax_rate_id @@ -281,32 +282,28 @@ class WC_Tax { sanitize_title( $tax_class ), strtoupper( $city ), strtoupper( $city ) - ) ); + ) + ); - $matched_tax_rates = array(); - $found_priority = array(); + $matched_tax_rates = array(); + $found_priority = array(); - foreach ( $found_rates as $found_rate ) { - if ( in_array( $found_rate->tax_rate_priority, $found_priority ) ) { - continue; - } - - $matched_tax_rates[ $found_rate->tax_rate_id ] = array( - 'rate' => $found_rate->tax_rate, - 'label' => $found_rate->tax_rate_name, - 'shipping' => $found_rate->tax_rate_shipping ? 'yes' : 'no', - 'compound' => $found_rate->tax_rate_compound ? 'yes' : 'no' - ); - - $found_priority[] = $found_rate->tax_rate_priority; + foreach ( $found_rates as $found_rate ) { + if ( in_array( $found_rate->tax_rate_priority, $found_priority ) ) { + continue; } - $matched_tax_rates = apply_filters( 'woocommerce_matched_tax_rates', $matched_tax_rates, $country, $state, $postcode, $city, $tax_class ); + $matched_tax_rates[ $found_rate->tax_rate_id ] = array( + 'rate' => $found_rate->tax_rate, + 'label' => $found_rate->tax_rate_name, + 'shipping' => $found_rate->tax_rate_shipping ? 'yes' : 'no', + 'compound' => $found_rate->tax_rate_compound ? 'yes' : 'no' + ); - set_transient( $rates_transient_key, $matched_tax_rates, DAY_IN_SECONDS ); + $found_priority[] = $found_rate->tax_rate_priority; } - return $matched_tax_rates; + return apply_filters( 'woocommerce_matched_tax_rates', $matched_tax_rates, $country, $state, $postcode, $city, $tax_class ); } /** @@ -510,8 +507,6 @@ class WC_Tax { return $matched_tax_rates; } - - return array(); // return false } /** @@ -864,5 +859,28 @@ class WC_Tax { } return array_filter( $expanded ); } + + /** + * Get postcode wildcards in array format + * + * Internal use only. + * + * @since 2.3.0 + * @access private + * + * @param string $postcode array of values + * @return array Array of postcodes with wildcards + */ + private static function _get_wildcard_postcodes( $postcode ) { + $postcodes = array( '*', strtoupper( $postcode ) ); + $postcode_length = strlen( $postcode ); + $wildcard_postcode = strtoupper( $postcode ); + + for ( $i = 0; $i < $postcode_length; $i ++ ) { + $wildcard_postcode = substr( $wildcard_postcode, 0, -1 ); + $postcodes[] = $wildcard_postcode . '*'; + } + return $postcodes; + } } WC_Tax::init(); From 8b4332a037da56d0e66a75927c4863abbdb0ca00 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Fri, 21 Nov 2014 13:06:30 +0000 Subject: [PATCH 243/743] Refactors to shipping tax rate methods --- .../class-wc-meta-box-product-data.php | 6 +- .../meta-boxes/views/html-order-items.php | 2 +- .../admin/settings/class-wc-settings-tax.php | 16 +- .../admin/views/html-bulk-edit-product.php | 2 +- .../admin/views/html-quick-edit-product.php | 2 +- includes/class-wc-ajax.php | 2 +- includes/class-wc-cart.php | 14 ++ includes/class-wc-tax.php | 203 ++++++++---------- 8 files changed, 112 insertions(+), 135 deletions(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-product-data.php b/includes/admin/meta-boxes/class-wc-meta-box-product-data.php index f3bdb80286f..7c6173a2f9b 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-product-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-product-data.php @@ -257,8 +257,8 @@ class WC_Meta_Box_Product_Data { 'none' => _x( 'None', 'Tax status', 'woocommerce' ) ) ) ); - $tax_classes = array_filter( array_map( 'trim', explode( "\n", get_option( 'woocommerce_tax_classes' ) ) ) ); - $classes_options = array(); + $tax_classes = WC_Tax::get_tax_classes(); + $classes_options = array(); $classes_options[''] = __( 'Standard', 'woocommerce' ); if ( $tax_classes ) { @@ -778,7 +778,7 @@ class WC_Meta_Box_Product_Data { } // Get tax classes - $tax_classes = array_filter( array_map('trim', explode( "\n", get_option( 'woocommerce_tax_classes' ) ) ) ); + $tax_classes = WC_Tax::get_tax_classes(); $tax_class_options = array(); $tax_class_options[''] = __( 'Standard', 'woocommerce' ); diff --git a/includes/admin/meta-boxes/views/html-order-items.php b/includes/admin/meta-boxes/views/html-order-items.php index d222d5c5532..067507a4e4b 100644 --- a/includes/admin/meta-boxes/views/html-order-items.php +++ b/includes/admin/meta-boxes/views/html-order-items.php @@ -16,7 +16,7 @@ $line_items_shipping = $order->get_items( 'shipping' ); if ( wc_tax_enabled() ) { $order_taxes = $order->get_taxes(); - $tax_classes = array_filter( array_map( 'trim', explode( "\n", get_option( 'woocommerce_tax_classes' ) ) ) ); + $tax_classes = WC_Tax::get_tax_classes(); $classes_options = array(); $classes_options[''] = __( 'Standard', 'woocommerce' ); diff --git a/includes/admin/settings/class-wc-settings-tax.php b/includes/admin/settings/class-wc-settings-tax.php index 9e584c5bd54..371d6a0352c 100644 --- a/includes/admin/settings/class-wc-settings-tax.php +++ b/includes/admin/settings/class-wc-settings-tax.php @@ -41,7 +41,7 @@ class WC_Settings_Tax extends WC_Settings_Page { ); // Get tax classes and display as links - $tax_classes = $this->get_tax_classes(); + $tax_classes = WC_Tax::get_tax_classes(); foreach ( $tax_classes as $class ) { $sections[ sanitize_title( $class ) ] = sprintf( __( '%s Rates', 'woocommerce' ), $class ); @@ -56,7 +56,7 @@ class WC_Settings_Tax extends WC_Settings_Page { * @return array */ public function get_settings() { - $tax_classes = $this->get_tax_classes(); + $tax_classes = WC_Tax::get_tax_classes(); $classes_options = array(); foreach ( $tax_classes as $class ) { @@ -72,7 +72,7 @@ class WC_Settings_Tax extends WC_Settings_Page { public function output() { global $current_section; - $tax_classes = $this->get_tax_classes(); + $tax_classes = WC_Tax::get_tax_classes(); if ( $current_section == 'standard' || in_array( $current_section, array_map( 'sanitize_title', $tax_classes ) ) ) { $this->output_tax_rates(); @@ -113,14 +113,6 @@ class WC_Settings_Tax extends WC_Settings_Page { include( 'html-settings-tax.php' ); } - /** - * Get tax classes - * @return array - */ - private function get_tax_classes() { - return array_filter( array_map( 'trim', explode( "\n", get_option('woocommerce_tax_classes' ) ) ) ); - } - /** * Get tax class being edited * @return string @@ -128,7 +120,7 @@ class WC_Settings_Tax extends WC_Settings_Page { private function get_current_tax_class() { global $current_section; - $tax_classes = $this->get_tax_classes(); + $tax_classes = WC_Tax::get_tax_classes(); $current_class = ''; foreach( $tax_classes as $class ) { diff --git a/includes/admin/views/html-bulk-edit-product.php b/includes/admin/views/html-bulk-edit-product.php index 6d631785339..daf026d7f7f 100644 --- a/includes/admin/views/html-bulk-edit-product.php +++ b/includes/admin/views/html-bulk-edit-product.php @@ -94,7 +94,7 @@ if ( ! defined( 'ABSPATH' ) ) { 'standard' => __( 'Standard', 'woocommerce' ) ); - $tax_classes = array_filter( array_map( 'trim', explode( "\n", get_option( 'woocommerce_tax_classes' ) ) ) ); + $tax_classes = WC_Tax::get_tax_classes(); if ( $tax_classes ) foreach ( $tax_classes as $class ) { diff --git a/includes/admin/views/html-quick-edit-product.php b/includes/admin/views/html-quick-edit-product.php index eb6afcc2980..d9a4d06342e 100644 --- a/includes/admin/views/html-quick-edit-product.php +++ b/includes/admin/views/html-quick-edit-product.php @@ -72,7 +72,7 @@ if ( ! defined( 'ABSPATH' ) ) { '' => __( 'Standard', 'woocommerce' ) ); - $tax_classes = array_filter( array_map( 'trim', explode( "\n", get_option( 'woocommerce_tax_classes' ) ) ) ); + $tax_classes = WC_Tax::get_tax_classes(); if ( $tax_classes ) foreach ( $tax_classes as $class ) { diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 8cbb10445c9..1a6929861d4 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -585,7 +585,7 @@ class WC_AJAX { $attributes = (array) maybe_unserialize( get_post_meta( $post_id, '_product_attributes', true ) ); // Get tax classes - $tax_classes = array_filter(array_map('trim', explode("\n", get_option('woocommerce_tax_classes')))); + $tax_classes = WC_Tax::get_tax_classes(); $tax_class_options = array(); $tax_class_options['parent'] =__( 'Same as parent', 'woocommerce' ); $tax_class_options[''] = __( 'Standard', 'woocommerce' ); diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index 7f5bdea0a67..fa72e7518a3 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -768,6 +768,20 @@ class WC_Cart { return apply_filters( 'woocommerce_cart_tax_totals', $tax_totals, $this ); } + /** + * Get all tax classes for items in the cart + * @return array + */ + public function get_cart_item_tax_classes() { + $found_tax_classes = array(); + + foreach ( WC()->cart->get_cart() as $item ) { + $found_tax_classes[] = $item['data']->get_tax_class(); + } + + return array_unique( $found_tax_classes ); + } + /*-----------------------------------------------------------------------------------*/ /* Add to cart handling */ /*-----------------------------------------------------------------------------------*/ diff --git a/includes/class-wc-tax.php b/includes/class-wc-tax.php index 2a585f86ca7..0d876b605b8 100644 --- a/includes/class-wc-tax.php +++ b/includes/class-wc-tax.php @@ -227,6 +227,25 @@ class WC_Tax { return $matched_tax_rates; } + /** + * Searches for all matching country/state/postcode tax rates. + * + * @param array $args + * @return array + */ + public static function find_shipping_rates( $args = array() ) { + $rates = self::find_rates( $args ); + $shipping_rates = array(); + + foreach ( $rates as $key => $rate ) { + if ( 'yes' === $rate['shipping'] ) { + $shipping_rates[ $key ] = $rate; + } + } + + return $shipping_rates; + } + /** * Loop through a set of tax rates and get the matching rates (1 per priority) * @@ -306,19 +325,37 @@ class WC_Tax { return apply_filters( 'woocommerce_matched_tax_rates', $matched_tax_rates, $country, $state, $postcode, $city, $tax_class ); } + /** + * Get the customer tax location based on their status and the current page + * @return array + */ + public static function get_customer_location() { + if ( defined( 'WOOCOMMERCE_CHECKOUT' ) || ( ! empty( WC()->customer ) && WC()->customer->has_calculated_shipping() ) ) { + return WC()->customer->get_taxable_address(); + } elseif ( wc_prices_include_tax() || get_option( 'woocommerce_default_customer_address' ) == 'base' ) { + return array( + WC()->countries->get_base_country(), + WC()->countries->get_base_state(), + WC()->countries->get_base_postcode(), + WC()->countries->get_base_city() + ); + } else { + return array(); + } + } + /** * Get's an array of matching rates for a tax class. * @param string $tax_class * @return array */ public static function get_rates( $tax_class = '' ) { + $tax_class = sanitize_title( $tax_class ); + $location = self::get_customer_location(); + $matched_tax_rates = array(); - $tax_class = sanitize_title( $tax_class ); - - /* Checkout uses customer location for the tax rates. Also, if shipping has been calculated, use the customers address. */ - if ( ( defined('WOOCOMMERCE_CHECKOUT') && WOOCOMMERCE_CHECKOUT ) || ( ! empty( WC()->customer ) && WC()->customer->has_calculated_shipping() ) ) { - - list( $country, $state, $postcode, $city ) = WC()->customer->get_taxable_address(); + if ( sizeof( $location ) === 4 ) { + list( $country, $state, $postcode, $city ) = $location; $matched_tax_rates = self::find_rates( array( 'country' => $country, @@ -327,16 +364,6 @@ class WC_Tax { 'city' => $city, 'tax_class' => $tax_class ) ); - - } else { - - // Prices which include tax should always use the base rate if we don't know where the user is located - // Prices excluding tax however should just not add any taxes, as they will be added during checkout. - // The woocommerce_default_customer_address option (when set to base) is also used here. - $matched_tax_rates = wc_prices_include_tax() || get_option( 'woocommerce_default_customer_address' ) == 'base' - ? self::get_base_tax_rates( $tax_class ) - : array(); - } return apply_filters( 'woocommerce_matched_rates', $matched_tax_rates, $tax_class ); @@ -376,97 +403,39 @@ class WC_Tax { * @return mixed */ public static function get_shipping_tax_rates( $tax_class = null ) { - // See if we have an explicitly set shipping tax class if ( $shipping_tax_class = get_option( 'woocommerce_shipping_tax_class' ) ) { - $tax_class = $shipping_tax_class == 'standard' ? '' : $shipping_tax_class; + $tax_class = 'standard' === $shipping_tax_class ? '' : $shipping_tax_class; } - if ( ( defined('WOOCOMMERCE_CHECKOUT') && WOOCOMMERCE_CHECKOUT ) || ( ! empty( WC()->customer ) && WC()->customer->has_calculated_shipping() ) ) { + $location = self::get_customer_location(); + $matched_tax_rates = array(); - list( $country, $state, $postcode, $city ) = WC()->customer->get_taxable_address(); + if ( sizeof( $location ) === 4 ) { + list( $country, $state, $postcode, $city ) = $location; - } else { - - // Prices which include tax should always use the base rate if we don't know where the user is located - // Prices excluding tax however should just not add any taxes, as they will be added during checkout - if ( wc_prices_include_tax() || get_option( 'woocommerce_default_customer_address' ) == 'base' ) { - $country = WC()->countries->get_base_country(); - $state = WC()->countries->get_base_state(); - $postcode = ''; - $city = ''; - } else { - return array(); - } - - } - - // If we are here then shipping is taxable - work it out - if ( ! is_null( $tax_class ) ) { - - $matched_tax_rates = array(); - - // This will be per item shipping - $rates = self::find_rates( array( - 'country' => $country, - 'state' => $state, - 'postcode' => $postcode, - 'city' => $city, - 'tax_class' => $tax_class - ) ); - - if ( $rates ) - foreach ( $rates as $key => $rate ) - if ( isset( $rate['shipping'] ) && $rate['shipping'] == 'yes' ) - $matched_tax_rates[ $key ] = $rate; - - if ( sizeof( $matched_tax_rates ) == 0 ) { - // Get standard rate - $rates = self::find_rates( array( + if ( ! is_null( $tax_class ) ) { + // This will be per item shipping + $matched_tax_rates = self::find_shipping_rates( array( 'country' => $country, 'state' => $state, - 'city' => $city, 'postcode' => $postcode, + 'city' => $city, + 'tax_class' => $tax_class ) ); - if ( $rates ) - foreach ( $rates as $key => $rate ) - if ( isset( $rate['shipping'] ) && $rate['shipping'] == 'yes' ) - $matched_tax_rates[ $key ] = $rate; - } + } else { - return $matched_tax_rates; + // This will be per order shipping - loop through the order and find the highest tax class rate + $cart_tax_classes = WC()->cart->get_cart_item_tax_classes(); - } else { - - // This will be per order shipping - loop through the order and find the highest tax class rate - $found_tax_classes = array(); - $matched_tax_rates = array(); - $rates = false; - - // Loop cart and find the highest tax band - if ( sizeof( WC()->cart->get_cart() ) > 0 ) - foreach ( WC()->cart->get_cart() as $item ) - $found_tax_classes[] = $item['data']->get_tax_class(); - - $found_tax_classes = array_unique( $found_tax_classes ); - - // If multiple classes are found, use highest - if ( sizeof( $found_tax_classes ) > 1 ) { - - if ( in_array( '', $found_tax_classes ) ) { - $rates = self::find_rates( array( - 'country' => $country, - 'state' => $state, - 'city' => $city, - 'postcode' => $postcode, - ) ); - } else { - $tax_classes = array_filter( array_map( 'trim', explode( "\n", get_option( 'woocommerce_tax_classes' ) ) ) ); + // If multiple classes are found, use highest. Don't bother with standard rate, we can get that later. + if ( sizeof( $cart_tax_classes ) > 1 && ! in_array( '', $cart_tax_classes ) ) { + $tax_classes = self::get_tax_classes(); foreach ( $tax_classes as $tax_class ) { - if ( in_array( $tax_class, $found_tax_classes ) ) { - $rates = self::find_rates( array( + if ( in_array( $tax_class, $cart_tax_classes ) ) { + $matched_tax_rates = self::find_shipping_rates( array( 'country' => $country, 'state' => $state, 'postcode' => $postcode, @@ -476,37 +445,31 @@ class WC_Tax { break; } } + + // If a single tax class is found, use it + } elseif ( sizeof( $cart_tax_classes ) == 1 ) { + $matched_tax_rates = self::find_shipping_rates( array( + 'country' => $country, + 'state' => $state, + 'postcode' => $postcode, + 'city' => $city, + 'tax_class' => $cart_tax_classes[0] + ) ); } - - // If a single tax class is found, use it - } elseif ( sizeof( $found_tax_classes ) == 1 ) { - - $rates = self::find_rates( array( - 'country' => $country, - 'state' => $state, - 'postcode' => $postcode, - 'city' => $city, - 'tax_class' => $found_tax_classes[0] - ) ); - } - // If no class rate are found, use standard rates - if ( ! $rates ) - $rates = self::find_rates( array( + // Get standard rate if no taxes were found + if ( ! sizeof( $matched_tax_rates ) ) { + $matched_tax_rates = self::find_shipping_rates( array( 'country' => $country, 'state' => $state, 'postcode' => $postcode, - 'city' => $city, + 'city' => $city ) ); - - if ( $rates ) - foreach ( $rates as $key => $rate ) - if ( isset( $rate['shipping'] ) && $rate['shipping'] == 'yes' ) - $matched_tax_rates[ $key ] = $rate; - - return $matched_tax_rates; + } } + + return $matched_tax_rates; } /** @@ -606,6 +569,14 @@ class WC_Tax { return array_sum( array_map( array( __CLASS__, 'round' ), $taxes ) ); } + /** + * Get store tax classes + * @return array + */ + public static function get_tax_classes() { + return array_filter( array_map( 'trim', explode( "\n", get_option('woocommerce_tax_classes' ) ) ) ); + } + /** * format the postcodes * @param string $state @@ -821,7 +792,7 @@ class WC_Tax { ) ); - if ( sizeof( $values > 0 ) ) { + if ( sizeof( $values ) > 0 ) { $sql = "( '" . implode( "', $tax_rate_id, '" . esc_sql( $type ) . "' ),( '", array_map( 'esc_sql', $values ) ) . "', $tax_rate_id, '" . esc_sql( $type ) . "' )"; $wpdb->query( " From 33b53c30b55ade3bee706e22eb985080118aa2a7 Mon Sep 17 00:00:00 2001 From: Barry Kooij Date: Fri, 21 Nov 2014 22:09:46 +0100 Subject: [PATCH 244/743] Updated docblock and added return statement. --- includes/abstracts/abstract-wc-order.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/abstracts/abstract-wc-order.php b/includes/abstracts/abstract-wc-order.php index 8be8e652e53..2be84cfcca2 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -477,6 +477,8 @@ abstract class WC_Abstract_Order { * * @param float $amount * @param string $total_type + * + * @return bool */ public function set_total( $amount, $total_type = 'total' ) { @@ -501,6 +503,8 @@ abstract class WC_Abstract_Order { } update_post_meta( $this->id, $key, $amount ); + + return true; } /** From 64227fe9d8dce6e2a0235c812c4fd6eb0f382e53 Mon Sep 17 00:00:00 2001 From: Barry Kooij Date: Fri, 21 Nov 2014 22:12:03 +0100 Subject: [PATCH 245/743] Added missing docblock --- includes/abstracts/abstract-wc-order.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/abstracts/abstract-wc-order.php b/includes/abstracts/abstract-wc-order.php index 2be84cfcca2..56e2ecbe942 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -1086,6 +1086,8 @@ abstract class WC_Abstract_Order { /** * Gets order total - formatted for display. * + * @param string $type + * * @return string */ public function get_item_count( $type = '' ) { From b131f250b6cd5e62f41121dbaa29209054bca339 Mon Sep 17 00:00:00 2001 From: Barry Kooij Date: Fri, 21 Nov 2014 22:12:37 +0100 Subject: [PATCH 246/743] Added missing docblock return statement. --- includes/abstracts/abstract-wc-order.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/abstracts/abstract-wc-order.php b/includes/abstracts/abstract-wc-order.php index 56e2ecbe942..fca16293ba2 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -1147,6 +1147,8 @@ abstract class WC_Abstract_Order { * Check whether this order has a specific shipping method or not * * @param string $method_id + * + * @return bool */ public function has_shipping_method( $method_id ) { From ae1ed2b7f66e6bc8c0c2010ba9961cddba5527be Mon Sep 17 00:00:00 2001 From: Barry Kooij Date: Fri, 21 Nov 2014 22:14:13 +0100 Subject: [PATCH 247/743] Added missing param docblock. --- includes/abstracts/abstract-wc-order.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/abstracts/abstract-wc-order.php b/includes/abstracts/abstract-wc-order.php index fca16293ba2..4a8859001c6 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -1909,6 +1909,8 @@ abstract class WC_Abstract_Order { /** * Generates a URL so that a customer can cancel their (unpaid - pending) order. * + * @param string $redirect + * * @return string */ public function get_cancel_order_url( $redirect = '' ) { From f8a161c40673cb019eb96b04c04a774ca040a15a Mon Sep 17 00:00:00 2001 From: Barry Kooij Date: Fri, 21 Nov 2014 22:16:15 +0100 Subject: [PATCH 248/743] Documentation improvement. --- includes/abstracts/abstract-wc-order.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/abstracts/abstract-wc-order.php b/includes/abstracts/abstract-wc-order.php index 4a8859001c6..8aaeb0aaa76 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -2369,7 +2369,7 @@ abstract class WC_Abstract_Order { } /** - * send_stock_notifications function. + * Send the stock notifications * * @param WC_Product $product * @param int $new_stock From 70d5fc834a1d106dab8f8142bb14b7d4df46c459 Mon Sep 17 00:00:00 2001 From: Michael Tieso Date: Fri, 21 Nov 2014 13:26:32 -0800 Subject: [PATCH 249/743] Spelling correction - calculdate to calculate --- includes/abstracts/abstract-wc-product.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/abstracts/abstract-wc-product.php b/includes/abstracts/abstract-wc-product.php index 00646093287..5e33e15270c 100644 --- a/includes/abstracts/abstract-wc-product.php +++ b/includes/abstracts/abstract-wc-product.php @@ -745,7 +745,7 @@ class WC_Product { /** * Returns the price (including tax). Uses customer tax rates. Can work for a specific $qty for more accurate taxes. * - * @param string $price to calculdate, left blank to just use get_price() + * @param string $price to calculate, left blank to just use get_price() * @return string */ public function get_price_including_tax( $qty = 1, $price = '' ) { @@ -799,7 +799,7 @@ class WC_Product { * Returns the price (excluding tax) - ignores tax_class filters since the price may *include* tax and thus needs subtracting. * Uses store base tax rates. Can work for a specific $qty for more accurate taxes. * - * @param string $price to calculdate, left blank to just use get_price() + * @param string $price to calculate, left blank to just use get_price() * @return string */ public function get_price_excluding_tax( $qty = 1, $price = '' ) { From 6ebadd572a58a019a300ed1f2406d5256ed46cce Mon Sep 17 00:00:00 2001 From: Barry Kooij Date: Fri, 21 Nov 2014 22:31:09 +0100 Subject: [PATCH 250/743] Added correct docblock. --- includes/abstracts/abstract-wc-product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/abstracts/abstract-wc-product.php b/includes/abstracts/abstract-wc-product.php index 00646093287..e178093b829 100644 --- a/includes/abstracts/abstract-wc-product.php +++ b/includes/abstracts/abstract-wc-product.php @@ -525,7 +525,7 @@ class WC_Product { } /** - * is_on_backorder function. + * Check if a product is on backorder * * @param int $qty_in_cart (default: 0) * @return bool From 47cc44802864248aec360f3374a66efe4f873d72 Mon Sep 17 00:00:00 2001 From: Barry Kooij Date: Fri, 21 Nov 2014 22:34:30 +0100 Subject: [PATCH 251/743] Added correct docblock. --- includes/abstracts/abstract-wc-product.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/abstracts/abstract-wc-product.php b/includes/abstracts/abstract-wc-product.php index f0a3481725d..8846a32a0bd 100644 --- a/includes/abstracts/abstract-wc-product.php +++ b/includes/abstracts/abstract-wc-product.php @@ -943,7 +943,7 @@ class WC_Product { } /** - * get_average_rating function. + * Get the average rating of product. * * @return string */ @@ -977,7 +977,7 @@ class WC_Product { } /** - * get_rating_count function. + * Get the total amount (COUNT) of ratings. * * @param int $value Optional. Rating value to get the count for. By default * returns the count of all rating values. From 4dd60d42c73f9f26d13dd06c20972d2f0a62e919 Mon Sep 17 00:00:00 2001 From: Barry Kooij Date: Fri, 21 Nov 2014 22:40:42 +0100 Subject: [PATCH 252/743] Docblock fixes --- includes/class-wc-tax.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/class-wc-tax.php b/includes/class-wc-tax.php index 0d876b605b8..a1aa7be7eed 100644 --- a/includes/class-wc-tax.php +++ b/includes/class-wc-tax.php @@ -579,7 +579,7 @@ class WC_Tax { /** * format the postcodes - * @param string $state + * @param string $postcode * @return string */ private static function format_tax_rate_postcode( $postcode ) { @@ -588,7 +588,7 @@ class WC_Tax { /** * format the city - * @param string $state + * @param string $city * @return string */ private static function format_tax_rate_city( $city ) { @@ -607,7 +607,7 @@ class WC_Tax { /** * format the country - * @param string $state + * @param string $country * @return string */ private static function format_tax_rate_country( $country ) { @@ -617,7 +617,7 @@ class WC_Tax { /** * format the tax rate name - * @param string $state + * @param string $name * @return string */ private static function format_tax_rate_name( $name ) { @@ -626,7 +626,7 @@ class WC_Tax { /** * format the rate - * @param string $state + * @param double $rate * @return float */ private static function format_tax_rate( $rate ) { From cc5be422cccfed2f6d0aa63a940bea2b853054dd Mon Sep 17 00:00:00 2001 From: Ryan Ray Date: Fri, 21 Nov 2014 16:46:33 -0500 Subject: [PATCH 253/743] Spelling correction - insursion to insertion --- includes/class-wc-tax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-tax.php b/includes/class-wc-tax.php index 0d876b605b8..62d1a95b9d8 100644 --- a/includes/class-wc-tax.php +++ b/includes/class-wc-tax.php @@ -653,7 +653,7 @@ class WC_Tax { } /** - * Prepare and format tax rate for DB insursion + * Prepare and format tax rate for DB insertion * @param array $tax_rate * @return array */ From 975795119b2d0538c9ee916eaf7d8e56203aac86 Mon Sep 17 00:00:00 2001 From: Gregory Karpinsky Date: Sun, 23 Nov 2014 13:42:38 -0500 Subject: [PATCH 254/743] wc_get_endpoint_url instead of wp_logout_url --- templates/myaccount/my-account.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/myaccount/my-account.php b/templates/myaccount/my-account.php index 3c259c703f6..9c71c31a8f7 100644 --- a/templates/myaccount/my-account.php +++ b/templates/myaccount/my-account.php @@ -18,7 +18,7 @@ wc_print_notices(); ?> printf( __( 'Hello %1$s (not %1$s? Sign out).', 'woocommerce' ) . ' ', $current_user->display_name, - wp_logout_url( get_permalink( wc_get_page_id( 'myaccount' ) ) ) + wc_get_endpoint_url( 'logout', '', get_permalink( wc_get_page_id( 'myaccount' ) ) ) ); printf( __( 'From your account dashboard you can view your recent orders, manage your shipping and billing addresses and edit your password and account details.', 'woocommerce' ), From 2c48a870866e834bdb1ba9b4af1e13bf1f1ba1a1 Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Mon, 24 Nov 2014 10:37:38 -0200 Subject: [PATCH 255/743] Fixed WC API Coupons params, closes #6828 --- includes/api/class-wc-api-coupons.php | 44 +++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/includes/api/class-wc-api-coupons.php b/includes/api/class-wc-api-coupons.php index 067c327f3bd..4b5a3336e01 100644 --- a/includes/api/class-wc-api-coupons.php +++ b/includes/api/class-wc-api-coupons.php @@ -224,24 +224,24 @@ class WC_API_Coupons extends WC_API_Resource { } $defaults = array( - 'type' => 'fixed_cart', - 'amount' => 0, - 'individual_use' => 'no', - 'product_ids' => array(), - 'exclude_product_ids' => array(), - 'usage_limit' => '', - 'usage_limit_per_user' => '', - 'limit_usage_to_x_items' => '', - 'usage_count' => '', - 'expiry_date' => '', - 'apply_before_tax' => 'yes', - 'free_shipping' => 'no', - 'product_categories' => array(), - 'exclude_product_categories' => array(), - 'exclude_sale_items' => 'no', - 'minimum_amount' => '', - 'maximum_amount' => '', - 'customer_email' => array(), + 'type' => 'fixed_cart', + 'amount' => 0, + 'individual_use' => 'no', + 'product_ids' => array(), + 'exclude_product_ids' => array(), + 'usage_limit' => '', + 'usage_limit_per_user' => '', + 'limit_usage_to_x_items' => '', + 'usage_count' => '', + 'expiry_date' => '', + 'apply_before_tax' => 'yes', + 'enable_free_shipping' => 'no', + 'product_category_ids' => array(), + 'exclude_product_category_ids' => array(), + 'exclude_sale_items' => 'no', + 'minimum_amount' => '', + 'maximum_amount' => '', + 'customer_emails' => array(), ); $coupon_data = wp_parse_args( $data, $defaults ); @@ -278,13 +278,13 @@ class WC_API_Coupons extends WC_API_Resource { update_post_meta( $id, 'usage_count', absint( $coupon_data['usage_count'] ) ); update_post_meta( $id, 'expiry_date', wc_clean( $coupon_data['expiry_date'] ) ); update_post_meta( $id, 'apply_before_tax', wc_clean( $coupon_data['apply_before_tax'] ) ); - update_post_meta( $id, 'free_shipping', wc_clean( $coupon_data['free_shipping'] ) ); - update_post_meta( $id, 'product_categories', array_filter( array_map( 'intval', $coupon_data['product_categories'] ) ) ); - update_post_meta( $id, 'exclude_product_categories', array_filter( array_map( 'intval', $coupon_data['exclude_product_categories'] ) ) ); + update_post_meta( $id, 'free_shipping', wc_clean( $coupon_data['enable_free_shipping'] ) ); + update_post_meta( $id, 'product_categories', array_filter( array_map( 'intval', $coupon_data['product_category_ids'] ) ) ); + update_post_meta( $id, 'exclude_product_categories', array_filter( array_map( 'intval', $coupon_data['exclude_product_category_ids'] ) ) ); update_post_meta( $id, 'exclude_sale_items', wc_clean( $coupon_data['exclude_sale_items'] ) ); update_post_meta( $id, 'minimum_amount', wc_format_decimal( $coupon_data['minimum_amount'] ) ); update_post_meta( $id, 'maximum_amount', wc_format_decimal( $coupon_data['maximum_amount'] ) ); - update_post_meta( $id, 'customer_email', array_filter( array_map( 'sanitize_email', $coupon_data['customer_email'] ) ) ); + update_post_meta( $id, 'customer_email', array_filter( array_map( 'sanitize_email', $coupon_data['customer_emails'] ) ) ); do_action( 'woocommerce_api_create_coupon', $id, $data ); From 802e807319a65a13d7cdfe24b80f268ce6eb5432 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 24 Nov 2014 13:19:43 +0000 Subject: [PATCH 256/743] Limit length of password when creating web hook --- includes/api/class-wc-api-webhooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/class-wc-api-webhooks.php b/includes/api/class-wc-api-webhooks.php index 7f239203aee..aa8644a8095 100644 --- a/includes/api/class-wc-api-webhooks.php +++ b/includes/api/class-wc-api-webhooks.php @@ -187,7 +187,7 @@ class WC_API_Webhooks extends WC_API_Resource { 'post_status' => 'publish', 'ping_status' => 'closed', 'post_author' => get_current_user_id(), - 'post_password' => uniqid( 'webhook_' ), + 'post_password' => strlen( ( $password = uniqid( 'webhook_' ) ) ) > 20 ? substr( $password, 0, 20 ) : $password, 'post_title' => ! empty( $data['name'] ) ? $data['name'] : sprintf( __( 'Webhook created on %s', 'woocommerce' ), strftime( _x( '%b %d, %Y @ %I:%M %p', 'Webhook created on date parsed by strftime', 'woocommerce' ) ) ), ), $data, $this ); From 39d8ec7db52cac0d88dc23b2f203acb73188ce55 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 24 Nov 2014 13:52:09 +0000 Subject: [PATCH 257/743] My first Unit tests Part of #6357 --- tests/unit-tests/tax.php | 97 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 tests/unit-tests/tax.php diff --git a/tests/unit-tests/tax.php b/tests/unit-tests/tax.php new file mode 100644 index 00000000000..21ad0f67904 --- /dev/null +++ b/tests/unit-tests/tax.php @@ -0,0 +1,97 @@ + "gb", + 'tax_rate_state' => "", + 'tax_rate' => "20", + 'tax_rate_name' => "", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "0", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + // Run function + $result = WC_Tax::_insert_tax_rate( $tax_rate ); + + $this->assertGreaterThan( 0, $wpdb->insert_id ); + + $new_row = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}woocommerce_tax_rates WHERE tax_rate_id = %d", $wpdb->insert_id ) ); + + $this->assertEquals( $new_row->tax_rate_country, "GB" ); + $this->assertEquals( $new_row->tax_rate_state, "" ); + $this->assertEquals( $new_row->tax_rate, "20.0000" ); + $this->assertEquals( $new_row->tax_rate_name, "Tax" ); + $this->assertEquals( $new_row->tax_rate_priority, "1" ); + $this->assertEquals( $new_row->tax_rate_compound, "0" ); + $this->assertEquals( $new_row->tax_rate_shipping, "1" ); + $this->assertEquals( $new_row->tax_rate_order, "1" ); + $this->assertEquals( $new_row->tax_rate_class, "" ); + } + + /** + * Test updating a tax rate + */ + public function test__update_tax_rate() { + global $wpdb; + + // Define a rate + $tax_rate = array( + 'tax_rate_country' => "GB", + 'tax_rate_state' => "", + 'tax_rate' => "20.0000", + 'tax_rate_name' => "VAT", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "0", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + // Run function + $result = WC_Tax::_insert_tax_rate( $tax_rate ); + $tax_rate_id = $wpdb->insert_id; + + // Update a rate + $tax_rate = array( + 'tax_rate_country' => "US" + ); + + // Run function + WC_Tax::_update_tax_rate( $tax_rate_id, $tax_rate ); + + $this->assertNotFalse( $wpdb->last_result ); + } +} From 653f3d308ca36fe49d34e4648ae372065c946b13 Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Mon, 24 Nov 2014 12:25:19 -0200 Subject: [PATCH 258/743] Linked travis, coveralls and scrutinizer --- .scrutinizer.yml | 3 +++ .travis.yml | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index a1cbe163afc..a0cea515b7e 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -11,3 +11,6 @@ checks: php: code_rating: true duplication: true + +tools: + external_code_coverage: true \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 4030c3191a7..010aad3af0f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,9 @@ before_script: - bash tests/bin/install.sh woocommerce_test root '' localhost $WP_VERSION - bash tests/bin/travis.sh before -script: phpunit -c phpunit.xml.dist +script: phpunit -c phpunit.xml.dist --coverage-clover=coverage.clover after_script: - bash tests/bin/travis.sh after + - wget https://scrutinizer-ci.com/ocular.phar + - php ocular.phar code-coverage:upload --format=php-clover coverage.clover From 3fd799741317e5116c7a237b6128f22a9f24c4fb Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 24 Nov 2014 21:26:33 +0700 Subject: [PATCH 259/743] Move locale to new method in BACS gateway --- includes/class-wc-countries.php | 55 ++-------- .../gateways/bacs/class-wc-gateway-bacs.php | 103 ++++++++++++++++-- 2 files changed, 104 insertions(+), 54 deletions(-) diff --git a/includes/class-wc-countries.php b/includes/class-wc-countries.php index 99e62534e19..d9ec0da0053 100644 --- a/includes/class-wc-countries.php +++ b/includes/class-wc-countries.php @@ -606,10 +606,7 @@ class WC_Countries { ), 'state' => array( 'label' => __( 'State', 'woocommerce' ), - ), - 'sortcode' => array( - 'label' => __( 'BSB', 'woocommerce' ), - ), + ) ), 'BD' => array( 'postcode' => array( @@ -646,10 +643,7 @@ class WC_Countries { 'CA' => array( 'state' => array( 'label' => __( 'Province', 'woocommerce' ), - ), - 'sortcode' => array( - 'label' => __( 'Bank Transit Number', 'woocommerce' ), - ), + ) ), 'CH' => array( 'postcode_before_city' => true, @@ -732,16 +726,6 @@ class WC_Countries { 'label' => __( 'Province', 'woocommerce' ), ) ), - 'IE' => array( - 'sortcode' => array( - 'label' => __( 'Sort Code', 'woocommerce' ), - ), - ), - 'IN' => array( - 'sortcode' => array( - 'label' => __( 'IFSC', 'woocommerce' ), - ), - ), 'IS' => array( 'postcode_before_city' => true, 'state' => array( @@ -759,10 +743,7 @@ class WC_Countries { 'state' => array( 'required' => true, 'label' => __( 'Province', 'woocommerce' ), - ), - 'sortcode' => array( - 'label' => __( 'Branch Sort', 'woocommerce' ), - ), + ) ), 'JP' => array( 'state' => array( @@ -784,10 +765,7 @@ class WC_Countries { 'NZ' => array( 'state' => array( 'required' => false - ), - 'sortcode' => array( - 'label' => __( 'Bank Code', 'woocommerce' ), - ), + ) ), 'NO' => array( 'postcode_before_city' => true, @@ -850,10 +828,7 @@ class WC_Countries { 'postcode_before_city' => true, 'state' => array( 'required' => false - ), - 'sortcode' => array( - 'label' => __( 'Bank Code', 'woocommerce' ), - ), + ) ), 'TR' => array( 'postcode_before_city' => true, @@ -867,10 +842,7 @@ class WC_Countries { ), 'state' => array( 'label' => __( 'State', 'woocommerce' ), - ), - 'sortcode' => array( - 'label' => __( 'Routing Number', 'woocommerce' ), - ), + ) ), 'GB' => array( 'postcode' => array( @@ -879,10 +851,7 @@ class WC_Countries { 'state' => array( 'label' => __( 'County', 'woocommerce' ), 'required' => false - ), - 'sortcode' => array( - 'label' => __( 'Sort Code', 'woocommerce' ), - ), + ) ), 'VN' => array( 'state' => array( @@ -906,10 +875,7 @@ class WC_Countries { 'ZA' => array( 'state' => array( 'label' => __( 'Province', 'woocommerce' ), - ), - 'sortcode' => array( - 'label' => __( 'Branch Code', 'woocommerce' ), - ), + ) ), 'ZW' => array( 'postcode' => array( @@ -926,9 +892,8 @@ class WC_Countries { $this->locale['default'] = apply_filters('woocommerce_get_country_locale_default', $this->get_default_address_fields() ); // Filter default AND shop base locales to allow overides via a single function. These will be used when changing countries on the checkout - if ( ! isset( $this->locale[ $this->get_base_country() ] ) ) { + if ( ! isset( $this->locale[ $this->get_base_country() ] ) ) $this->locale[ $this->get_base_country() ] = $this->locale['default']; - } $this->locale['default'] = apply_filters( 'woocommerce_get_country_locale_base', $this->locale['default'] ); $this->locale[ $this->get_base_country() ] = apply_filters( 'woocommerce_get_country_locale_base', $this->locale[ $this->get_base_country() ] ); @@ -1010,4 +975,4 @@ class WC_Countries { // Return return $address_fields; } -} +} \ No newline at end of file diff --git a/includes/gateways/bacs/class-wc-gateway-bacs.php b/includes/gateways/bacs/class-wc-gateway-bacs.php index 74e1a39f944..bbfb4fd6240 100644 --- a/includes/gateways/bacs/class-wc-gateway-bacs.php +++ b/includes/gateways/bacs/class-wc-gateway-bacs.php @@ -17,10 +17,14 @@ if ( ! defined( 'ABSPATH' ) ) { */ class WC_Gateway_BACS extends WC_Payment_Gateway { + /** @var array Array of locales */ + public $locale; + /** * Constructor for the gateway. */ public function __construct() { + $this->id = 'bacs'; $this->icon = apply_filters('woocommerce_bacs_icon', ''); $this->has_fields = false; @@ -57,12 +61,14 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { // Customer Emails add_action( 'woocommerce_email_before_order_table', array( $this, 'email_instructions' ), 10, 3 ); + } /** * Initialise Gateway Settings Form Fields */ public function init_form_fields() { + $this->form_fields = array( 'enabled' => array( 'title' => __( 'Enable/Disable', 'woocommerce' ), @@ -95,19 +101,21 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { 'type' => 'account_details' ), ); + } /** * generate_account_details_html function. */ public function generate_account_details_html() { + ob_start(); $country = WC()->countries->get_base_country(); - $locale = WC()->countries->get_country_locale(); + $locale = $this->get_country_locale(); - $sortcode_label = $locale[$country]['sortcode']['label']; - $sortcode = $sortcode_label ? $sortcode_label : __( 'Sort Code', 'woocommerce' ); + // Get sortcode label in the $locale array and use appropriate one + $sortcode = isset( $locale[ $country ]['sortcode']['label'] ) ? $locale[ $country ]['sortcode']['label'] : __( 'Sort Code', 'woocommerce' ); ?> @@ -175,12 +183,14 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { instructions ) { echo wpautop( wptexturize( wp_kses_post( $this->instructions ) ) ); } $this->bank_details( $order_id ); + } /** @@ -231,18 +244,21 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { * @return void */ public function email_instructions( $order, $sent_to_admin, $plain_text = false ) { + if ( ! $sent_to_admin && 'bacs' === $order->payment_method && $order->has_status( 'on-hold' ) ) { if ( $this->instructions ) { echo wpautop( wptexturize( $this->instructions ) ) . PHP_EOL; } $this->bank_details( $order->id ); } + } /** * Get bank details and place into a list format */ private function bank_details( $order_id = '' ) { + if ( empty( $this->account_details ) ) { return; } @@ -252,13 +268,10 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { // Get the order country and country $locale $country = $order->billing_country; - $locale = WC()->countries->get_country_locale(); + $locale = $this->get_country_locale(); - // Get sortcode label in the $locale array - $sortcode_label = $locale[$country]['sortcode']['label']; - - // If a sortcode label exists uses it, if not use Sort Code - $sortcode = $sortcode_label ? $sortcode_label : __( 'Sort Code', 'woocommerce' ); + // Get sortcode label in the $locale array and use appropriate one + $sortcode = isset( $locale[ $country ]['sortcode']['label'] ) ? $locale[ $country ]['sortcode']['label'] : __( 'Sort Code', 'woocommerce' ); echo '

    ' . __( 'Our Bank Details', 'woocommerce' ) . '

    ' . PHP_EOL; @@ -304,6 +317,7 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { echo ''; } } + } /** @@ -330,5 +344,76 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { 'result' => 'success', 'redirect' => $this->get_return_url( $order ) ); + + } + + /** + * Get country locale if localized + * + * @return array + */ + + public function get_country_locale() { + + if ( ! $this->locale ) { + + // Locale information to be used + $this->locale = apply_filters( 'woocommerce_get_bacs_locale', array( + 'AU' => array( + 'sortcode' => array( + 'label' => __( 'BSB', 'woocommerce' ), + ), + ), + 'CA' => array( + 'sortcode' => array( + 'label' => __( 'Bank Transit Number', 'woocommerce' ), + ), + ), + 'GB' => array( + 'sortcode' => array( + 'label' => __( 'Sort Code', 'woocommerce' ), + ), + ), + 'IE' => array( + 'sortcode' => array( + 'label' => __( 'Sort Code', 'woocommerce' ), + ), + ), + 'IN' => array( + 'sortcode' => array( + 'label' => __( 'IFSC', 'woocommerce' ), + ), + ), + 'IT' => array( + 'sortcode' => array( + 'label' => __( 'Branch Sort', 'woocommerce' ), + ), + ), + 'NZ' => array( + 'sortcode' => array( + 'label' => __( 'Bank Code', 'woocommerce' ), + ), + ), + 'SE' => array( + 'sortcode' => array( + 'label' => __( 'Bank Code', 'woocommerce' ), + ), + ), + 'US' => array( + 'sortcode' => array( + 'label' => __( 'Routing Number', 'woocommerce' ), + ), + ), + 'ZA' => array( + 'sortcode' => array( + 'label' => __( 'Branch Code', 'woocommerce' ), + ), + ), + ) ); + + } + + return $this->locale; + } } \ No newline at end of file From a7d4b89c0d5e604d0b02e312c879602616d0e129 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 24 Nov 2014 13:56:10 +0000 Subject: [PATCH 260/743] test__delete_tax_rate #6357 --- tests/unit-tests/tax.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/unit-tests/tax.php b/tests/unit-tests/tax.php index 21ad0f67904..6896164633d 100644 --- a/tests/unit-tests/tax.php +++ b/tests/unit-tests/tax.php @@ -94,4 +94,35 @@ class WC_Tests_Tax extends WC_Unit_Test_Case { $this->assertNotFalse( $wpdb->last_result ); } + + /** + * Test deleting a tax rate + */ + public function test__delete_tax_rate() { + global $wpdb; + + // Define a rate + $tax_rate = array( + 'tax_rate_country' => "GB", + 'tax_rate_state' => "", + 'tax_rate' => "20.0000", + 'tax_rate_name' => "VAT", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "0", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + // Run function + $result = WC_Tax::_insert_tax_rate( $tax_rate ); + $tax_rate_id = $wpdb->insert_id; + + // Run function + WC_Tax::_delete_tax_rate( $tax_rate_id ); + + $this->assertNotFalse( $wpdb->last_result ); + } + + } From fe6d52b7052afc215a09630ac5e848139b4105a4 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 24 Nov 2014 14:57:08 +0000 Subject: [PATCH 261/743] Final tax class unit tests Closes #6357 --- includes/class-wc-tax.php | 2 +- tests/unit-tests/tax.php | 445 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 426 insertions(+), 21 deletions(-) diff --git a/includes/class-wc-tax.php b/includes/class-wc-tax.php index 2fb610556cd..66bccdf434f 100644 --- a/includes/class-wc-tax.php +++ b/includes/class-wc-tax.php @@ -574,7 +574,7 @@ class WC_Tax { * @return array */ public static function get_tax_classes() { - return array_filter( array_map( 'trim', explode( "\n", get_option('woocommerce_tax_classes' ) ) ) ); + return array_filter( array_map( 'trim', explode( "\n", get_option( 'woocommerce_tax_classes' ) ) ) ); } /** diff --git a/tests/unit-tests/tax.php b/tests/unit-tests/tax.php index 6896164633d..de181aca45f 100644 --- a/tests/unit-tests/tax.php +++ b/tests/unit-tests/tax.php @@ -2,27 +2,374 @@ class WC_Tests_Tax extends WC_Unit_Test_Case { - /** @todo - * calc_tax - * calc_shipping_tax - * round - * find_rates - * find_shipping_rates - * get_customer_location - * get_rates - * get_base_tax_rates - * get_shipping_tax_rates - * is_compound - * get_rate_label - * get_rate_percent - * get_rate_code - * get_tax_total - * get_tax_classes - * _delete_tax_rate - * _update_tax_rate_postcodes - * _update_tax_rate_cities - * _update_tax_rate_locations + /** + * Get rates */ + public function test_get_rates() { + global $wpdb; + + $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rates" ); + $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); + + $tax_rate = array( + 'tax_rate_country' => "GB", + 'tax_rate_state' => "", + 'tax_rate' => "20.0000", + 'tax_rate_name' => "VAT", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "0", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + WC_Tax::_insert_tax_rate( $tax_rate ); + + $tax_rate_id = $wpdb->insert_id; + + $tax_rates = WC_Tax::get_rates(); + + $this->assertEquals( $tax_rates, array( $tax_rate_id => array( 'rate' => '20.0000', 'label' => 'VAT', 'shipping' => 'yes', 'compound' => 'no' ) ) ); + } + + /** + * Get rates + */ + public function test_get_shipping_tax_rates() { + global $wpdb; + + $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rates" ); + $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); + + $tax_rate = array( + 'tax_rate_country' => "GB", + 'tax_rate_state' => "", + 'tax_rate' => "20.0000", + 'tax_rate_name' => "VAT", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "0", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + WC_Tax::_insert_tax_rate( $tax_rate ); + + $tax_rate_id = $wpdb->insert_id; + + $tax_rates = WC_Tax::get_shipping_tax_rates(); + + $this->assertEquals( $tax_rates, array( $tax_rate_id => array( 'rate' => '20.0000', 'label' => 'VAT', 'shipping' => 'yes', 'compound' => 'no' ) ) ); + } + + /** + * Get rates + */ + public function test_get_base_tax_rates() { + global $wpdb; + + $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rates" ); + $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); + + $tax_rate = array( + 'tax_rate_country' => "GB", + 'tax_rate_state' => "", + 'tax_rate' => "20.0000", + 'tax_rate_name' => "VAT", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "0", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + WC_Tax::_insert_tax_rate( $tax_rate ); + + $tax_rate_id = $wpdb->insert_id; + + $tax_rates = WC_Tax::get_base_tax_rates(); + + $this->assertEquals( $tax_rates, array( $tax_rate_id => array( 'rate' => '20.0000', 'label' => 'VAT', 'shipping' => 'yes', 'compound' => 'no' ) ) ); + } + + /** + * Find tax rates + */ + public function test_find_rates() { + global $wpdb; + + $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rates" ); + $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); + + $tax_rate = array( + 'tax_rate_country' => "GB", + 'tax_rate_state' => "", + 'tax_rate' => "20.0000", + 'tax_rate_name' => "VAT", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "0", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + WC_Tax::_insert_tax_rate( $tax_rate ); + + $tax_rate_id = $wpdb->insert_id; + + $tax_rates = WC_Tax::find_rates( array( + 'country' => 'GB', + 'state' => 'Cambs', + 'postcode' => 'PE14 1XX', + 'city' => 'Somewhere', + 'tax_class' => '' + ) ); + + $this->assertEquals( $tax_rates, array( $tax_rate_id => array( 'rate' => '20.0000', 'label' => 'VAT', 'shipping' => 'yes', 'compound' => 'no' ) ) ); + } + + /** + * Find tax rates + */ + public function test_find_shipping_rates() { + global $wpdb; + + $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rates" ); + $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); + + $tax_rate = array( + 'tax_rate_country' => "GB", + 'tax_rate_state' => "", + 'tax_rate' => "20.0000", + 'tax_rate_name' => "VAT", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "0", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + WC_Tax::_insert_tax_rate( $tax_rate ); + + $tax_rate_id = $wpdb->insert_id; + + $tax_rates = WC_Tax::find_shipping_rates( array( + 'country' => 'GB', + 'state' => 'Cambs', + 'postcode' => 'PE14 1XX', + 'city' => 'Somewhere', + 'tax_class' => '' + ) ); + + $this->assertEquals( $tax_rates, array( $tax_rate_id => array( 'rate' => '20.0000', 'label' => 'VAT', 'shipping' => 'yes', 'compound' => 'no' ) ) ); + } + + /** + * Test tax amounts + */ + public function test_calc_tax() { + global $wpdb; + + $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rates" ); + $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); + + $tax_rate = array( + 'tax_rate_country' => "GB", + 'tax_rate_state' => "", + 'tax_rate' => "20.0000", + 'tax_rate_name' => "VAT", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "0", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + WC_Tax::_insert_tax_rate( $tax_rate ); + + $tax_rate_id = $wpdb->insert_id; + + $tax_rates = WC_Tax::find_rates( array( + 'country' => 'GB', + 'state' => 'Cambs', + 'postcode' => 'PE14 1XX', + 'city' => 'Somewhere', + 'tax_class' => '' + ) ); + + $calced_tax = WC_Tax::calc_tax( '9.99', $tax_rates, true, false ); + + $this->assertEquals( $calced_tax, array( $tax_rate_id => '1.665' ) ); + + $calced_tax = WC_Tax::calc_tax( '9.99', $tax_rates, false, false ); + + $this->assertEquals( $calced_tax, array( $tax_rate_id => '1.998' ) ); + } + + /** + * Shipping tax amounts + */ + public function test_calc_shipping_tax() { + global $wpdb; + + $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rates" ); + $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); + + $tax_rate = array( + 'tax_rate_country' => "GB", + 'tax_rate_state' => "", + 'tax_rate' => "20.0000", + 'tax_rate_name' => "VAT", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "0", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + WC_Tax::_insert_tax_rate( $tax_rate ); + + $tax_rate_id = $wpdb->insert_id; + + $tax_rates = WC_Tax::find_rates( array( + 'country' => 'GB', + 'state' => 'Cambs', + 'postcode' => 'PE14 1XX', + 'city' => 'Somewhere', + 'tax_class' => '' + ) ); + + $calced_tax = WC_Tax::calc_shipping_tax( '10', $tax_rates ); + + $this->assertEquals( $calced_tax, array( $tax_rate_id => '2' ) ); + } + + /** + * Customer Location + */ + public function test_get_customer_location() { + $this->assertEquals( WC_Tax::get_customer_location(), array( 'GB', '', '', '' ) ); + } + + /** + * Test rate labels + */ + public function test_get_rate_label() { + global $wpdb; + + $tax_rate = array( + 'tax_rate_country' => "GB", + 'tax_rate_state' => "", + 'tax_rate' => "20.0000", + 'tax_rate_name' => "VAT", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "1", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + WC_Tax::_insert_tax_rate( $tax_rate ); + + $this->assertEquals( WC_Tax::get_rate_label( $wpdb->insert_id ), 'VAT' ); + } + + /** + * Test rate percent + */ + public function test_get_rate_percent() { + global $wpdb; + + $tax_rate = array( + 'tax_rate_country' => "GB", + 'tax_rate_state' => "", + 'tax_rate' => "20.0000", + 'tax_rate_name' => "VAT", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "1", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + WC_Tax::_insert_tax_rate( $tax_rate ); + + $this->assertEquals( WC_Tax::get_rate_percent( $wpdb->insert_id ), '20%' ); + } + + /** + * Test rate code + */ + public function test_get_rate_code() { + global $wpdb; + + $tax_rate = array( + 'tax_rate_country' => "GB", + 'tax_rate_state' => "", + 'tax_rate' => "20.0000", + 'tax_rate_name' => "VAT", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "1", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + WC_Tax::_insert_tax_rate( $tax_rate ); + + $this->assertEquals( WC_Tax::get_rate_code( $wpdb->insert_id ), 'GB-VAT-1' ); + } + + /** + * Test is compound + */ + public function test_is_compound() { + global $wpdb; + + $tax_rate = array( + 'tax_rate_country' => "GB", + 'tax_rate_state' => "", + 'tax_rate' => "20.0000", + 'tax_rate_name' => "VAT", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "1", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + WC_Tax::_insert_tax_rate( $tax_rate ); + + $this->assertTrue( WC_Tax::is_compound( $wpdb->insert_id ) ); + } + + /** + * Test the rounding method + */ + public function test_round() { + $this->assertEquals( WC_Tax::round( '2.1234567' ), '2.1235' ); + } + + /** + * Get tax totals + */ + public function test_get_tax_total() { + $to_total = array( + '1' => '1.665', + '2' => '2', + ); + + $this->assertEquals( WC_Tax::get_tax_total( $to_total ), '3.665' ); + } + + /** + * Test getting the tax classes + */ + public function test_get_tax_classes() { + $tax_classes = WC_Tax::get_tax_classes(); + + $this->assertEquals( $tax_classes, array( 'Reduced Rate', 'Zero Rate' ) ); + } /** * Test Inserting a tax rate @@ -124,5 +471,63 @@ class WC_Tests_Tax extends WC_Unit_Test_Case { $this->assertNotFalse( $wpdb->last_result ); } + /** + * Postcode saving + */ + public function test__update_tax_rate_postcodes() { + global $wpdb; + $to_save = '12345;90210-90215'; + $tax_rate = array( + 'tax_rate_country' => "GB", + 'tax_rate_state' => "", + 'tax_rate' => "20.0000", + 'tax_rate_name' => "VAT", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "0", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + // Run function + $result = WC_Tax::_insert_tax_rate( $tax_rate ); + $tax_rate_id = $wpdb->insert_id; + + WC_Tax::_update_tax_rate_postcodes( $tax_rate_id, $to_save ); + + $results = $wpdb->get_col( $wpdb->prepare( "SELECT location_code FROM {$wpdb->prefix}woocommerce_tax_rate_locations WHERE tax_rate_id = %d ORDER BY location_code ASC", $tax_rate_id ) ); + + $this->assertEquals( array( '12345', '90210', '90211', '90212', '90213', '90214', '90215' ), $results ); + } + + /** + * City saving + */ + public function test__update_tax_rate_cities() { + global $wpdb; + + $to_save = 'SOMEWHERE;SOMEWHERE_ELSE'; + $tax_rate = array( + 'tax_rate_country' => "GB", + 'tax_rate_state' => "", + 'tax_rate' => "20.0000", + 'tax_rate_name' => "VAT", + 'tax_rate_priority' => "1", + 'tax_rate_compound' => "0", + 'tax_rate_shipping' => "1", + 'tax_rate_order' => "1", + 'tax_rate_class' => "" + ); + + // Run function + $result = WC_Tax::_insert_tax_rate( $tax_rate ); + $tax_rate_id = $wpdb->insert_id; + + WC_Tax::_update_tax_rate_cities( $tax_rate_id, $to_save ); + + $results = $wpdb->get_col( $wpdb->prepare( "SELECT location_code FROM {$wpdb->prefix}woocommerce_tax_rate_locations WHERE tax_rate_id = %d ORDER BY location_code ASC", $tax_rate_id ) ); + + $this->assertEquals( array( 'SOMEWHERE', 'SOMEWHERE_ELSE' ), $results ); + } } From 3a927d62dd57c73d6049b884f4b8e67611e8066a Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 24 Nov 2014 15:18:41 +0000 Subject: [PATCH 262/743] Add tip to reports Closes #5729 --- includes/admin/reports/class-wc-report-sales-by-date.php | 5 +++-- includes/admin/views/html-report-by-date.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/admin/reports/class-wc-report-sales-by-date.php b/includes/admin/reports/class-wc-report-sales-by-date.php index dba5493e96b..dbfbbd420a1 100644 --- a/includes/admin/reports/class-wc-report-sales-by-date.php +++ b/includes/admin/reports/class-wc-report-sales-by-date.php @@ -132,8 +132,9 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report { } $legend[] = array( - 'title' => sprintf( __( '%s sales in this period', 'woocommerce' ), '' . wc_price( $total_sales ) . '' ), - 'color' => $this->chart_colours['sales_amount'], + 'title' => sprintf( __( '%s sales in this period', 'woocommerce' ), '' . wc_price( $total_sales ) . '' ), + 'placeholder' => __( 'Sales are the sum of the order totals - this includes shipping and discounts.', 'woocommerce' ), + 'color' => $this->chart_colours['sales_amount'], 'highlight_series' => 6 ); diff --git a/includes/admin/views/html-report-by-date.php b/includes/admin/views/html-report-by-date.php index 705c0033b3b..cc1c9beb507 100644 --- a/includes/admin/views/html-report-by-date.php +++ b/includes/admin/views/html-report-by-date.php @@ -46,7 +46,7 @@ if ( ! defined( 'ABSPATH' ) ) { get_chart_legend() ) : ?>
      -
    • > +
    • data-tip="">
    • @@ -71,4 +71,4 @@ if ( ! defined( 'ABSPATH' ) ) {
    -
    \ No newline at end of file +
    From f90c146d015055566d9406a3ee468d51623a743b Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 24 Nov 2014 15:29:37 +0000 Subject: [PATCH 263/743] Give product gallery low priority Closes #5976 --- includes/admin/class-wc-admin-meta-boxes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/class-wc-admin-meta-boxes.php b/includes/admin/class-wc-admin-meta-boxes.php index e0c7c6a09e7..1f92ec6ae93 100644 --- a/includes/admin/class-wc-admin-meta-boxes.php +++ b/includes/admin/class-wc-admin-meta-boxes.php @@ -101,7 +101,7 @@ class WC_Admin_Meta_Boxes { // Products add_meta_box( 'postexcerpt', __( 'Product Short Description', 'woocommerce' ), 'WC_Meta_Box_Product_Short_Description::output', 'product', 'normal' ); add_meta_box( 'woocommerce-product-data', __( 'Product Data', 'woocommerce' ), 'WC_Meta_Box_Product_Data::output', 'product', 'normal', 'high' ); - add_meta_box( 'woocommerce-product-images', __( 'Product Gallery', 'woocommerce' ), 'WC_Meta_Box_Product_Images::output', 'product', 'side' ); + add_meta_box( 'woocommerce-product-images', __( 'Product Gallery', 'woocommerce' ), 'WC_Meta_Box_Product_Images::output', 'product', 'side', 'low' ); // Orders foreach ( wc_get_order_types( 'order-meta-boxes' ) as $type ) { From 549d7ab2c032e459815b6da13612dee7883715a8 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 24 Nov 2014 17:24:25 +0000 Subject: [PATCH 264/743] Removed 'apply before tax' options for coupons - this should be the default core behaviour --- .../class-wc-meta-box-coupon-data.php | 5 - includes/api/class-wc-api-coupons.php | 7 - includes/api/v1/class-wc-api-coupons.php | 1 - includes/class-wc-cart.php | 162 +++++------------- includes/class-wc-coupon.php | 3 +- templates/cart/cart-totals.php | 9 +- templates/checkout/review-order.php | 9 +- .../helpers/class-wc-helper-coupon.php | 1 - 8 files changed, 43 insertions(+), 154 deletions(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php b/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php index 908a7315aa0..3e3f46fcb2e 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php @@ -70,9 +70,6 @@ class WC_Meta_Box_Coupon_Data { // Free Shipping woocommerce_wp_checkbox( array( 'id' => 'free_shipping', 'label' => __( 'Allow free shipping', 'woocommerce' ), 'description' => sprintf( __( 'Check this box if the coupon grants free shipping. The free shipping method must be enabled and be set to require "a valid free shipping coupon" (see the "Free Shipping Requires" setting).', 'woocommerce' ), admin_url('admin.php?page=wc-settings&tab=shipping§ion=WC_Shipping_Free_Shipping')) ) ); - // Apply before tax - woocommerce_wp_checkbox( array( 'id' => 'apply_before_tax', 'label' => __( 'Apply before tax', 'woocommerce' ), 'description' => __( 'Check this box if the coupon should be applied before calculating cart tax.', 'woocommerce' ) ) ); - // Expiry date woocommerce_wp_text_input( array( 'id' => 'expiry_date', 'label' => __( 'Coupon expiry date', 'woocommerce' ), 'placeholder' => _x( 'YYYY-MM-DD', 'placeholder', 'woocommerce' ), 'description' => '', 'class' => 'date-picker', 'custom_attributes' => array( 'pattern' => "[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])" ) ) ); @@ -251,7 +248,6 @@ class WC_Meta_Box_Coupon_Data { $limit_usage_to_x_items = empty( $_POST['limit_usage_to_x_items'] ) ? '' : absint( $_POST['limit_usage_to_x_items'] ); $individual_use = isset( $_POST['individual_use'] ) ? 'yes' : 'no'; $expiry_date = wc_clean( $_POST['expiry_date'] ); - $apply_before_tax = isset( $_POST['apply_before_tax'] ) ? 'yes' : 'no'; $free_shipping = isset( $_POST['free_shipping'] ) ? 'yes' : 'no'; $exclude_sale_items = isset( $_POST['exclude_sale_items'] ) ? 'yes' : 'no'; $minimum_amount = wc_format_decimal( $_POST['minimum_amount'] ); @@ -283,7 +279,6 @@ class WC_Meta_Box_Coupon_Data { update_post_meta( $post_id, 'usage_limit_per_user', $usage_limit_per_user ); update_post_meta( $post_id, 'limit_usage_to_x_items', $limit_usage_to_x_items ); update_post_meta( $post_id, 'expiry_date', $expiry_date ); - update_post_meta( $post_id, 'apply_before_tax', $apply_before_tax ); update_post_meta( $post_id, 'free_shipping', $free_shipping ); update_post_meta( $post_id, 'exclude_sale_items', $exclude_sale_items ); update_post_meta( $post_id, 'product_categories', $product_categories ); diff --git a/includes/api/class-wc-api-coupons.php b/includes/api/class-wc-api-coupons.php index 4b5a3336e01..1adff283b7b 100644 --- a/includes/api/class-wc-api-coupons.php +++ b/includes/api/class-wc-api-coupons.php @@ -132,7 +132,6 @@ class WC_API_Coupons extends WC_API_Resource { 'limit_usage_to_x_items' => (int) $coupon->limit_usage_to_x_items, 'usage_count' => (int) $coupon->usage_count, 'expiry_date' => ( ! empty( $coupon->expiry_date ) ) ? $this->server->format_datetime( $coupon->expiry_date ) : null, - 'apply_before_tax' => $coupon->apply_before_tax(), 'enable_free_shipping' => $coupon->enable_free_shipping(), 'product_category_ids' => array_map( 'absint', (array) $coupon->product_categories ), 'exclude_product_category_ids' => array_map( 'absint', (array) $coupon->exclude_product_categories ), @@ -234,7 +233,6 @@ class WC_API_Coupons extends WC_API_Resource { 'limit_usage_to_x_items' => '', 'usage_count' => '', 'expiry_date' => '', - 'apply_before_tax' => 'yes', 'enable_free_shipping' => 'no', 'product_category_ids' => array(), 'exclude_product_category_ids' => array(), @@ -277,7 +275,6 @@ class WC_API_Coupons extends WC_API_Resource { update_post_meta( $id, 'limit_usage_to_x_items', absint( $coupon_data['limit_usage_to_x_items'] ) ); update_post_meta( $id, 'usage_count', absint( $coupon_data['usage_count'] ) ); update_post_meta( $id, 'expiry_date', wc_clean( $coupon_data['expiry_date'] ) ); - update_post_meta( $id, 'apply_before_tax', wc_clean( $coupon_data['apply_before_tax'] ) ); update_post_meta( $id, 'free_shipping', wc_clean( $coupon_data['enable_free_shipping'] ) ); update_post_meta( $id, 'product_categories', array_filter( array_map( 'intval', $coupon_data['product_category_ids'] ) ) ); update_post_meta( $id, 'exclude_product_categories', array_filter( array_map( 'intval', $coupon_data['exclude_product_category_ids'] ) ) ); @@ -382,10 +379,6 @@ class WC_API_Coupons extends WC_API_Resource { update_post_meta( $id, 'expiry_date', wc_clean( $data['expiry_date'] ) ); } - if ( isset( $data['apply_before_tax'] ) ) { - update_post_meta( $id, 'apply_before_tax', wc_clean( $data['apply_before_tax'] ) ); - } - if ( isset( $data['enable_free_shipping'] ) ) { update_post_meta( $id, 'free_shipping', ( true === $data['enable_free_shipping'] ) ? 'yes' : 'no' ); } diff --git a/includes/api/v1/class-wc-api-coupons.php b/includes/api/v1/class-wc-api-coupons.php index 8d181e15b6f..1056206c492 100644 --- a/includes/api/v1/class-wc-api-coupons.php +++ b/includes/api/v1/class-wc-api-coupons.php @@ -127,7 +127,6 @@ class WC_API_Coupons extends WC_API_Resource { 'limit_usage_to_x_items' => (int) $coupon->limit_usage_to_x_items, 'usage_count' => (int) $coupon->usage_count, 'expiry_date' => $this->server->format_datetime( $coupon->expiry_date ), - 'apply_before_tax' => $coupon->apply_before_tax(), 'enable_free_shipping' => $coupon->enable_free_shipping(), 'product_category_ids' => array_map( 'absint', (array) $coupon->product_categories ), 'exclude_product_category_ids' => array_map( 'absint', (array) $coupon->exclude_product_categories ), diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index fa72e7518a3..f144d25e71a 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -1216,7 +1216,7 @@ class WC_Cart { */ } else { - // Work out a new base price without the shop's base tax + // Work out a new base price without the item tax $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates, true ); // Now we have a new item price (excluding TAX) @@ -1262,9 +1262,6 @@ class WC_Cart { } } - // Add any product discounts (after tax) - $this->apply_product_discounts_after_tax( $values, $line_total + $line_tax ); - // Cart contents total is based on discounted prices and is used for the final total calculation $this->cart_contents_total += $line_total; @@ -1303,9 +1300,6 @@ class WC_Cart { $this->remove_taxes(); } - // Cart Discounts (after tax) - $this->apply_cart_discounts_after_tax(); - // Allow plugins to hook and alter totals before final total is calculated do_action( 'woocommerce_calculate_totals', $this ); @@ -1321,9 +1315,6 @@ class WC_Cart { if ( WC()->customer->is_vat_exempt() ) { $this->remove_taxes(); } - - // Cart Discounts (after tax) - $this->apply_cart_discounts_after_tax(); } do_action( 'woocommerce_after_calculate_totals', $this ); @@ -1703,34 +1694,14 @@ class WC_Cart { /** * Get array of applied coupon objects and codes. - * @param string Type of coupons to get. Can be 'cart' or 'order' which are before and after tax respectively. * @return array of applied coupons */ - public function get_coupons( $type = null ) { + public function get_coupons( $deprecated = null ) { $coupons = array(); - if ( 'cart' == $type || is_null( $type ) ) { - if ( $this->applied_coupons ) { - foreach ( $this->applied_coupons as $code ) { - $coupon = new WC_Coupon( $code ); - - if ( $coupon->apply_before_tax() ) { - $coupons[ $code ] = $coupon; - } - } - } - } - - if ( 'order' == $type || is_null( $type ) ) { - if ( $this->applied_coupons ) { - foreach ( $this->applied_coupons as $code ) { - $coupon = new WC_Coupon( $code ); - - if ( ! $coupon->apply_before_tax() ) { - $coupons[ $code ] = $coupon; - } - } - } + foreach ( $this->get_applied_coupons() as $code ) { + $coupon = new WC_Coupon( $code ); + $coupons[ $code ] = $coupon; } return $coupons; @@ -1756,34 +1727,11 @@ class WC_Cart { /** * Remove coupons from the cart of a defined type. Type 1 is before tax, type 2 is after tax. - * - * @params string type - cart for before tax, order for after tax */ - public function remove_coupons( $type = null ) { - - if ( 'cart' == $type || 1 == $type ) { - if ( $this->applied_coupons ) { - foreach ( $this->applied_coupons as $code ) { - $coupon = new WC_Coupon( $code ); - - if ( $coupon->apply_before_tax() ) - $this->remove_coupon( $code ); - } - } - } elseif ( 'order' == $type || 2 == $type ) { - if ( $this->applied_coupons ) { - foreach ( $this->applied_coupons as $code ) { - $coupon = new WC_Coupon( $code ); - - if ( ! $coupon->apply_before_tax() ) - $this->remove_coupon( $code ); - } - } - } else { - $this->applied_coupons = $this->coupon_discount_amounts = $this->coupon_applied_count = array(); - WC()->session->set( 'applied_coupons', array() ); - WC()->session->set( 'coupon_discount_amounts', array() ); - } + public function remove_coupons( $deprecated = null ) { + $this->applied_coupons = $this->coupon_discount_amounts = $this->coupon_applied_count = array(); + WC()->session->set( 'applied_coupons', array() ); + WC()->session->set( 'coupon_discount_amounts', array() ); } /** @@ -1811,7 +1759,6 @@ class WC_Cart { /** * Function to apply discounts to a product and get the discounted price (before tax is applied). * - * @access public * @param mixed $values * @param mixed $price * @param bool $add_totals (default: false) @@ -1824,7 +1771,7 @@ class WC_Cart { if ( ! empty( $this->coupons ) ) { foreach ( $this->coupons as $code => $coupon ) { - if ( $coupon->apply_before_tax() && $coupon->is_valid() ) { + if ( $coupon->is_valid() ) { if ( $coupon->is_valid_for_product( $values['data'], $values ) || $coupon->is_valid_for_cart() ) { $discount_amount = $coupon->get_discount_amount( $price, $values, $single = true ); @@ -1832,7 +1779,12 @@ class WC_Cart { if ( $add_totals ) { $this->discount_cart += $discount_amount * $values['quantity']; + + $this->increase_coupon_discount_amount( $code, $discount_amount * $values['quantity'] ); + + + $this->increase_coupon_applied_count( $code, $values['quantity'] ); } } @@ -1843,51 +1795,6 @@ class WC_Cart { return apply_filters( 'woocommerce_get_discounted_price', $price, $values, $this ); } - /** - * Function to apply cart discounts after tax. - * - * @access public - */ - public function apply_cart_discounts_after_tax() { - $pre_discount_total = round( $this->cart_contents_total + $this->tax_total + $this->shipping_tax_total + $this->shipping_total + $this->fee_total, $this->dp ); - - if ( $this->coupons ) { - foreach ( $this->coupons as $code => $coupon ) { - do_action( 'woocommerce_cart_discount_after_tax_' . $coupon->type, $coupon ); - - if ( $coupon->is_valid() && ! $coupon->apply_before_tax() && $coupon->is_valid_for_cart() ) { - $discount_amount = $coupon->get_discount_amount( $pre_discount_total ); - $pre_discount_total = $pre_discount_total - $discount_amount; - $this->discount_total += $discount_amount; - $this->increase_coupon_discount_amount( $code, $discount_amount ); - $this->increase_coupon_applied_count( $code ); - } - } - } - } - - /** - * Function to apply product discounts after tax. - * - * @access public - * @param mixed $values - * @param double $price - */ - public function apply_product_discounts_after_tax( $values, $price ) { - if ( ! empty( $this->coupons ) ) { - foreach ( $this->coupons as $code => $coupon ) { - do_action( 'woocommerce_product_discount_after_tax_' . $coupon->type, $coupon, $values, $price ); - - if ( $coupon->is_valid() && ! $coupon->apply_before_tax() && $coupon->is_valid_for_product( $values['data'] ) ) { - $discount_amount = $coupon->get_discount_amount( $price, $values ); - $this->discount_total += $discount_amount; - $this->increase_coupon_discount_amount( $code, $discount_amount ); - $this->increase_coupon_applied_count( $code, $values['quantity'] ); - } - } - } - } - /** * Store how much discount each coupon grants. * @@ -2229,20 +2136,6 @@ class WC_Cart { return apply_filters( 'woocommerce_cart_discounts_before_tax', $discounts_before_tax, $this ); } - /** - * Gets the order discount amount - these are applied after tax. - * - * @return mixed formatted price or false if there are none - */ - public function get_discounts_after_tax() { - if ( $this->discount_total ) { - $discounts_after_tax = wc_price( $this->discount_total ); - } else { - $discounts_after_tax = false; - } - return apply_filters( 'woocommerce_cart_discounts_after_tax', $discounts_after_tax, $this ); - } - /** * Gets the total discount amount - both kinds. * @@ -2256,4 +2149,29 @@ class WC_Cart { } return apply_filters( 'woocommerce_cart_total_discount', $total_discount, $this ); } + + + /** + * Function to apply cart discounts after tax. + * @deprecated Coupons can not be applied after tax + */ + public function apply_cart_discounts_after_tax( $values, $price ) { + _deprecated_function( 'apply_cart_discounts_after_tax', '2.3' ); + } + + /** + * Function to apply product discounts after tax. + * @deprecated Coupons can not be applied after tax + */ + public function apply_product_discounts_after_tax( $values, $price ) { + _deprecated_function( 'apply_product_discounts_after_tax', '2.3' ); + } + + /** + * Gets the order discount amount - these are applied after tax. + * @deprecated Coupons can not be applied after tax + */ + public function get_discounts_after_tax() { + _deprecated_function( 'get_discounts_after_tax', '2.3' ); + } } diff --git a/includes/class-wc-coupon.php b/includes/class-wc-coupon.php index 231d8b06110..1bc62acc3a7 100644 --- a/includes/class-wc-coupon.php +++ b/includes/class-wc-coupon.php @@ -140,7 +140,6 @@ class WC_Coupon { 'limit_usage_to_x_items' => '', 'usage_count' => '', 'expiry_date' => '', - 'apply_before_tax' => 'yes', 'free_shipping' => 'no', 'product_categories' => array(), 'exclude_product_categories' => array(), @@ -201,7 +200,7 @@ class WC_Coupon { * @return bool */ public function apply_before_tax() { - return 'yes' === $this->apply_before_tax; + return true; } /** diff --git a/templates/cart/cart-totals.php b/templates/cart/cart-totals.php index bb22ff2c2b8..921d89cc27b 100644 --- a/templates/cart/cart-totals.php +++ b/templates/cart/cart-totals.php @@ -25,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) { - cart->get_coupons( 'cart' ) as $code => $coupon ) : ?> + cart->get_coupons() as $code => $coupon ) : ?> @@ -65,13 +65,6 @@ if ( ! defined( 'ABSPATH' ) ) { - cart->get_coupons( 'order' ) as $code => $coupon ) : ?> - - - - - - diff --git a/templates/checkout/review-order.php b/templates/checkout/review-order.php index 35d66fc7fb2..325b35317e6 100644 --- a/templates/checkout/review-order.php +++ b/templates/checkout/review-order.php @@ -55,7 +55,7 @@ if ( ! defined( 'ABSPATH' ) ) { - cart->get_coupons( 'cart' ) as $code => $coupon ) : ?> + cart->get_coupons() as $code => $coupon ) : ?> @@ -95,13 +95,6 @@ if ( ! defined( 'ABSPATH' ) ) { - cart->get_coupons( 'order' ) as $code => $coupon ) : ?> - - - - - - diff --git a/tests/framework/helpers/class-wc-helper-coupon.php b/tests/framework/helpers/class-wc-helper-coupon.php index 78362759940..96b3f9d8c3c 100644 --- a/tests/framework/helpers/class-wc-helper-coupon.php +++ b/tests/framework/helpers/class-wc-helper-coupon.php @@ -35,7 +35,6 @@ class WC_Helper_Coupon { update_post_meta( $coupon_id, 'usage_limit_per_user', '' ); update_post_meta( $coupon_id, 'limit_usage_to_x_items', '' ); update_post_meta( $coupon_id, 'expiry_date', '' ); - update_post_meta( $coupon_id, 'apply_before_tax', 'no' ); update_post_meta( $coupon_id, 'free_shipping', 'no' ); update_post_meta( $coupon_id, 'exclude_sale_items', 'no' ); update_post_meta( $coupon_id, 'product_categories', array() ); From 1f3adbd0c232ec25b9aaf92774a72ba196acda5a Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 25 Nov 2014 10:38:54 +0000 Subject: [PATCH 265/743] esc_html for the term name --- includes/widgets/class-wc-widget-layered-nav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/widgets/class-wc-widget-layered-nav.php b/includes/widgets/class-wc-widget-layered-nav.php index 3efa7189234..b952ceb9fd8 100644 --- a/includes/widgets/class-wc-widget-layered-nav.php +++ b/includes/widgets/class-wc-widget-layered-nav.php @@ -229,7 +229,7 @@ class WC_Widget_Layered_Nav extends WC_Widget { } - echo ''; + echo ''; } echo ''; From 4a8c541fbf76333ad3fc0b5c668201fbd148b053 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 25 Nov 2014 11:05:14 +0000 Subject: [PATCH 266/743] Remove 'order' discounts from classes --- assets/js/admin/meta-boxes-order.js | 5 +--- assets/js/admin/meta-boxes-order.min.js | 2 +- includes/abstracts/abstract-wc-order.php | 18 ++++++-------- .../meta-boxes/views/html-order-items.php | 24 ++++++++----------- includes/admin/wc-admin-functions.php | 1 - includes/api/class-wc-api-orders.php | 1 - includes/class-wc-checkout.php | 1 - .../class-wc-gateway-paypal-request.php | 8 ++----- 8 files changed, 21 insertions(+), 39 deletions(-) diff --git a/assets/js/admin/meta-boxes-order.js b/assets/js/admin/meta-boxes-order.js index c269cbe48f2..0772e2d1bb3 100644 --- a/assets/js/admin/meta-boxes-order.js +++ b/assets/js/admin/meta-boxes-order.js @@ -573,9 +573,6 @@ jQuery( function ( $ ) { var line_totals = 0; var tax = 0; var shipping = 0; - var order_discount = $( '#_order_discount' ).val() || '0'; - - order_discount = accounting.unformat( order_discount.replace( ',', '.' ) ); $( '.woocommerce_order_items tr.shipping input.line_total' ).each(function() { var cost = $( this ).val() || '0'; @@ -601,7 +598,7 @@ jQuery( function ( $ ) { // Set Total $( '#_order_total' ) - .val( accounting.formatNumber( line_totals + tax + shipping - order_discount, woocommerce_admin_meta_boxes.currency_format_num_decimals, '', woocommerce_admin.mon_decimal_point ) ) + .val( accounting.formatNumber( line_totals + tax + shipping, woocommerce_admin_meta_boxes.currency_format_num_decimals, '', woocommerce_admin.mon_decimal_point ) ) .change(); $( 'button.save-action' ).click(); diff --git a/assets/js/admin/meta-boxes-order.min.js b/assets/js/admin/meta-boxes-order.min.js index b64e0a776ee..ddd838da110 100644 --- a/assets/js/admin/meta-boxes-order.min.js +++ b/assets/js/admin/meta-boxes-order.min.js @@ -1 +1 @@ -jQuery(function(a){function b(){a("#woocommerce-order-items").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}function c(){a("#woocommerce-order-items").unblock()}function d(){a("#tiptip_holder").removeAttr("style"),a("#tiptip_arrow").removeAttr("style"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}function e(){var e={order_id:woocommerce_admin_meta_boxes.post_id,action:"woocommerce_load_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}a("#woocommerce-order-actions input, #woocommerce-order-actions a").click(function(){window.onbeforeunload=""}),a("a.edit_address").click(function(b){b.preventDefault(),a(this).hide(),a(this).closest(".order_data_column").find("div.address").hide(),a(this).closest(".order_data_column").find("div.edit_address").show()});var f=null,g={};"undefined"!=typeof woocommerce_admin_meta_boxes_order&&"undefined"!=typeof woocommerce_admin_meta_boxes_order.countries&&(f=a.parseJSON(woocommerce_admin_meta_boxes_order.countries.replace(/"/g,'"'))),a(".js_field-country").chosen(g).change(function(b,c){if("undefined"==typeof c&&(c=!1),null!==f){var d=a(this),e=d.val(),h=d.parents(".edit_address").find(".js_field-state"),i=h.parent(),j=h.attr("name"),k=h.attr("id"),l=d.data("woocommerce.stickState-"+e)?d.data("woocommerce.stickState-"+e):h.val(),m=h.attr("placeholder");if(c&&d.data("woocommerce.stickState-"+e,l),i.show().find(".chosen-container").remove(),f[e]){var n=a(''),o=f[e];n.append(a('")),a.each(o,function(b){n.append(a('"))}),n.val(l),h.replaceWith(n),n.show().chosen(g).hide().trigger("chosen:updated")}else h.replaceWith('');a("body").trigger("contry-change.woocommerce",[e,a(this).closest("div")])}}).trigger("change",[!0]),a("body").on("change","select.js_field-state",function(){var b=a(this),c=b.val(),d=b.parents(".edit_address").find(".js_field-country"),e=d.val();d.data("woocommerce.stickState-"+e,c)}).on("click","a.edit-order-item",function(){return a(this).closest("tr").find(".view").hide(),a(this).closest("tr").find(".edit").show(),a(this).hide(),a("button.add-line-item").click(),a("button.cancel-action").attr("data-reload",!0),!1}).on("click",".woocommerce_order_items a.delete-order-item",function(){var d=window.confirm(woocommerce_admin_meta_boxes.remove_item_notice);if(d){var e=a(this).closest("tr.item, tr.fee, tr.shipping"),f=e.attr("data-order_item_id");b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){e.remove(),c()}})}return!1}).on("click","#order_refunds .delete_refund",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_refund)){var c=a(this).closest("tr.refund"),d=c.attr("data-order_refund_id");b();var f={action:"woocommerce_delete_refund",refund_id:d,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(){e()}})}return!1}).on("change",".woocommerce_order_items input.quantity",function(){var b=a(this).closest("tr.item"),c=a(this).val(),d=a(this).attr("data-qty"),e=a("input.line_total",b),f=a("input.line_subtotal",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/d;e.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var h=accounting.unformat(f.attr("data-subtotal"),woocommerce_admin.mon_decimal_point)/d;f.val(parseFloat(accounting.formatNumber(h*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/d;e>0&&b.val(parseFloat(accounting.formatNumber(e*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var f=a("input.line_subtotal_tax",a(this)),g=accounting.unformat(f.attr("data-subtotal_tax"),woocommerce_admin.mon_decimal_point)/d;g>0&&f.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("quantity_changed")}).on("change",".woocommerce_order_items input.refund_order_item_qty",function(){var b=a(this).closest("tr.item"),c=b.find("input.quantity").val(),d=a(this).val(),e=a("input.line_total",b),f=a("input.refund_line_total",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/c;f.val(parseFloat(accounting.formatNumber(g*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=a("input.refund_line_tax",a(this)),f=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/c;f>0&&e.val(parseFloat(accounting.formatNumber(f*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("refund_quantity_changed")}).on("change",".woocommerce_order_items .refund input",function(){var b=0,c=a(".woocommerce_order_items").find("tr.item, tr.fee, tr.shipping");c.each(function(){var c=a(this),d=c.find(".refund input:not(.refund_order_item_qty)");d.each(function(c,d){b+=parseFloat(accounting.unformat(a(d).val()||0,woocommerce_admin.mon_decimal_point))})}),a("#refund_amount").val(accounting.formatNumber(b,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change()}).on("click",".woocommerce_order_items button.add_order_item_meta",function(){var d=a(this),e=d.closest("tr.item"),f={order_item_id:e.attr("data-order_item_id"),action:"woocommerce_add_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(a){e.find("tbody.meta_items").append(a),c()}}),!1}).on("click",".woocommerce_order_items button.remove_order_item_meta",function(){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_meta)){var d=a(this).closest("tr"),e={meta_id:d.attr("data-meta_id"),action:"woocommerce_remove_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(){d.hide(),c()}})}return!1}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){var b=a(this).next();(""===b.val()||b.is(".match-total"))&&b.val(a(this).val()).addClass("match-total")}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){a(this).removeClass("match-total")}),a("#woocommerce-order-items").on("click","button.add-line-item",function(){return a("div.wc-order-add-item").slideDown(),a("div.wc-order-bulk-actions").slideUp(),!1}).on("click","button.refund-items",function(){return a("div.wc-order-refund-items").slideDown(),a("div.wc-order-bulk-actions").slideUp(),a("div.wc-order-totals-items").slideUp(),a("#woocommerce-order-items div.refund").show(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").hide(),!1}).on("click",".cancel-action",function(){return a(this).closest("div.wc-order-data-row").slideUp(),a("div.wc-order-bulk-actions").slideDown(),a("div.wc-order-totals-items").slideDown(),a("#woocommerce-order-items div.refund").hide(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").show(),"true"===a(this).attr("data-reload")&&e(),!1}).on("click","button.add-order-item",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-products"}),!1}).on("click","button.add-order-fee",function(){b();var d={action:"woocommerce_add_order_fee",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_fee_line_items").append(b),c()}),!1}).on("click","button.add-order-shipping",function(){b();var d={action:"woocommerce_add_order_shipping",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_shipping_line_items").append(b),c()}),!1}).on("click","button.add-order-tax",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-tax"}),!1}).on("click","input.check-column",function(){a(this).is(":checked")?a("#woocommerce-order-items").find(".check-column input").attr("checked","checked"):a("#woocommerce-order-items").find(".check-column input").removeAttr("checked")}).on("click",".do_bulk_action",function(){var d=a(this).closest(".bulk-actions").find("select").val(),e=a("#woocommerce-order-items").find(".check-column input:checked"),f=[];if(a(e).each(function(){var b=a(this).closest("tr");b.attr("data-order_item_id")&&f.push(b.attr("data-order_item_id"))}),0===f.length)return void window.alert(woocommerce_admin_meta_boxes.i18n_select_items);if("delete"===d){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_notice)){b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){a(e).each(function(){a(this).closest("tr").remove()}),c()}})}}else if("reduce_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_reduce_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}else if("increase_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_increase_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}return!1}).on("click","button.calculate-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_totals)){b();var c=0,d=0,e=0,f=a("#_order_discount").val()||"0";f=accounting.unformat(f.replace(",",".")),a(".woocommerce_order_items tr.shipping input.line_total").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),e+=parseFloat(b)}),a(".woocommerce_order_items input.line_tax").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),d+=parseFloat(b)}),a(".woocommerce_order_items tr.item, .woocommerce_order_items tr.fee").each(function(){var b=a(this).find("input.line_total").val()||"0";c+=accounting.unformat(b.replace(",","."))}),"yes"===woocommerce_admin_meta_boxes.round_at_subtotal&&(d=parseFloat(accounting.toFixed(d,woocommerce_admin_meta_boxes.rounding_precision))),a("#_order_total").val(accounting.formatNumber(c+d+e-f,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change(),a("button.save-action").click()}return!1}).on("click","button.save-action",function(){var e={order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),action:"woocommerce_save_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}}),a(this).trigger("items_saved"),!1}).on("click","a.delete-order-tax",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_tax)){b();var e={action:"woocommerce_remove_order_tax",rate_id:a(this).attr("data-rate_id"),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}).on("click","button.calculate-tax-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_line_taxes)){b();var e=a("#_shipping_country").val(),f=a("#_billing_country").val(),g=woocommerce_admin_meta_boxes.base_country,h="",i="",j="";e?(g=e,h=a("#_shipping_state").val(),i=a("#_shipping_postcode").val(),j=a("#_shipping_city").val()):f&&(g=f,h=a("#_billing_state").val(),i=a("#_billing_postcode").val(),j=a("#_billing_city").val());var k={action:"woocommerce_calc_line_taxes",order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),country:g,state:h,postcode:i,city:j,security:woocommerce_admin_meta_boxes.calc_totals_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:k,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}),a("body").on("change keyup",".wc-order-refund-items #refund_amount",function(){var b=accounting.unformat(a(this).val(),woocommerce_admin.mon_decimal_point);a("button .wc-order-refund-amount .amount").text(accounting.formatMoney(b,{symbol:woocommerce_admin_meta_boxes.currency_format_symbol,decimal:woocommerce_admin_meta_boxes.currency_format_decimal_sep,thousand:woocommerce_admin_meta_boxes.currency_format_thousand_sep,precision:woocommerce_admin_meta_boxes.currency_format_num_decimals,format:woocommerce_admin_meta_boxes.currency_format}))}).on("click",".wc-order-refund-items button.do-api-refund, .wc-order-refund-items button.do-manual-refund",function(){if(b(),window.confirm(woocommerce_admin_meta_boxes.i18n_do_refund)){var d=a("input#refund_amount").val(),f=a("input#refund_reason").val(),g={},h={},i={};a(".refund input.refund_order_item_qty").each(function(b,c){a(c).closest("tr").data("order_item_id")&&c.value&&(g[a(c).closest("tr").data("order_item_id")]=c.value)}),a(".refund input.refund_line_total").each(function(b,c){a(c).closest("tr").data("order_item_id")&&(h[a(c).closest("tr").data("order_item_id")]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point))}),a(".refund input.refund_line_tax").each(function(b,c){if(a(c).closest("tr").data("order_item_id")){var d=a(c).data("tax_id");i[a(c).closest("tr").data("order_item_id")]||(i[a(c).closest("tr").data("order_item_id")]={}),i[a(c).closest("tr").data("order_item_id")][d]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point)}});var j={action:"woocommerce_refund_line_items",order_id:woocommerce_admin_meta_boxes.post_id,refund_amount:d,refund_reason:f,line_item_qtys:JSON.stringify(g,null,""),line_item_totals:JSON.stringify(h,null,""),line_item_tax_totals:JSON.stringify(i,null,""),api_refund:a(this).is(".do-api-refund"),restock_refunded_items:a("#restock_refunded_items:checked").size()?"true":"false",security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,j,function(a){a===!0?e():a.error?(window.alert(a.error),c()):console.log(a)})}else c()}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-products"===f){var g=a("select#add_item_id").val();if(g){var h=g.length;b(),a.each(g,function(b,e){var f={action:"woocommerce_add_order_item",item_to_add:e,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,f,function(b){a("table.woocommerce_order_items tbody#order_line_items").append(b),--h||(a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","").val(""),d(),a("select#add_item_id").trigger("chosen:updated"),c())})})}else a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","red")}}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-tax"===f){var g=a("#manual_tax_rate_id").val(),h=a("input[name=add_order_tax]:checked").val();if(g&&(h=g),!h)return!1;var i=a(".order-tax-id").map(function(){return a(this).val()}).get();if(-1===a.inArray(h,i)){b();var j={action:"woocommerce_add_order_tax",rate_id:h,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:j,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}else window.alert(woocommerce_admin_meta_boxes.i18n_tax_rate_already_exists)}}),a("span.inline_total").closest(".totals_group").find("input").change(),a(".order_download_permissions").on("click","button.grant_access",function(){var b=a("select#grant_access_id").val();if(b){a(".order_download_permissions").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_grant_access_to_download",product_ids:b,loop:a(".order_download_permissions .wc-metabox").size(),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.grant_access_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(b){b?a(".order_download_permissions .wc-metaboxes").append(b):window.alert(woocommerce_admin_meta_boxes.i18n_download_permission_fail),a(".date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,showOn:"button",buttonImage:woocommerce_admin_meta_boxes.calendar_image,buttonImageOnly:!0}),a("#grant_access_id").val("").trigger("chosen:updated"),a(".order_download_permissions").unblock()}),!1}}).on("click","button.revoke_access",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_permission_revoke)){var b=a(this).parent().parent(),c=a(this).attr("rel").split(",")[0],d=a(this).attr("rel").split(",")[1];if(c>0){a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var e={action:"woocommerce_revoke_access_to_download",product_id:c,download_id:d,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.revoke_access_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,e,function(){a(b).fadeOut("300",function(){a(b).remove()})})}else a(b).fadeOut("300",function(){a(b).remove()})}return!1}),a("button.load_customer_billing").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_billing)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"billing",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_billing_first_name").val(c.billing_first_name).change(),a("input#_billing_last_name").val(c.billing_last_name).change(),a("input#_billing_company").val(c.billing_company).change(),a("input#_billing_address_1").val(c.billing_address_1).change(),a("input#_billing_address_2").val(c.billing_address_2).change(),a("input#_billing_city").val(c.billing_city).change(),a("input#_billing_postcode").val(c.billing_postcode).change(),a("#_billing_country").val(c.billing_country).change().trigger("chosen:updated"),a("#_billing_state").val(c.billing_state).change().trigger("chosen:updated"),a("input#_billing_email").val(c.billing_email).change(),a("input#_billing_phone").val(c.billing_phone).change()),a(".edit_address").unblock()}})}return!1}),a("button.load_customer_shipping").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_shipping)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"shipping",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_shipping_first_name").val(c.shipping_first_name).change(),a("input#_shipping_last_name").val(c.shipping_last_name).change(),a("input#_shipping_company").val(c.shipping_company).change(),a("input#_shipping_address_1").val(c.shipping_address_1).change(),a("input#_shipping_address_2").val(c.shipping_address_2).change(),a("input#_shipping_city").val(c.shipping_city).change(),a("input#_shipping_postcode").val(c.shipping_postcode).change(),a("#_shipping_country").val(c.shipping_country).change().trigger("chosen:updated"),a("#_shipping_state").val(c.shipping_state).change().trigger("chosen:updated")),a(".edit_address").unblock()}})}return!1}),a("button.billing-same-as-shipping").on("click",function(){return window.confirm(woocommerce_admin_meta_boxes.copy_billing)&&(a("input#_shipping_first_name").val(a("input#_billing_first_name").val()).change(),a("input#_shipping_last_name").val(a("input#_billing_last_name").val()).change(),a("input#_shipping_company").val(a("input#_billing_company").val()).change(),a("input#_shipping_address_1").val(a("input#_billing_address_1").val()).change(),a("input#_shipping_address_2").val(a("input#_billing_address_2").val()).change(),a("input#_shipping_city").val(a("input#_billing_city").val()).change(),a("input#_shipping_postcode").val(a("input#_billing_postcode").val()).change(),a("#_shipping_country").val(a("#_billing_country").val()).change().trigger("chosen:updated"),a("#_shipping_state").val(a("#_billing_state").val()).change().trigger("chosen:updated")),!1}),a(".totals_group").on("click","a.add_total_row",function(){return a(this).closest(".totals_group").find(".total_rows").append(a(this).data("row")),!1}),a(".total_rows").on("click","a.delete_total_row",function(){var b=a(this).closest(".total_row"),c=b.attr("data-order_item_id");return c?b.append('').hide():b.remove(),!1}),a("#woocommerce-order-notes").on("click","a.add_note",function(){if(a("textarea#add_order_note").val()){a("#woocommerce-order-notes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b={action:"woocommerce_add_order_note",post_id:woocommerce_admin_meta_boxes.post_id,note:a("textarea#add_order_note").val(),note_type:a("select#order_note_type").val(),security:woocommerce_admin_meta_boxes.add_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,b,function(b){a("ul.order_notes").prepend(b),a("#woocommerce-order-notes").unblock(),a("#add_order_note").val("")}),!1}}).on("click","a.delete_note",function(){var b=a(this).closest("li.note");a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_delete_order_note",note_id:a(b).attr("rel"),security:woocommerce_admin_meta_boxes.delete_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(){a(b).remove()}),!1})}); \ No newline at end of file +jQuery(function(a){function b(){a("#woocommerce-order-items").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}function c(){a("#woocommerce-order-items").unblock()}function d(){a("#tiptip_holder").removeAttr("style"),a("#tiptip_arrow").removeAttr("style"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}function e(){var e={order_id:woocommerce_admin_meta_boxes.post_id,action:"woocommerce_load_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}a("#woocommerce-order-actions input, #woocommerce-order-actions a").click(function(){window.onbeforeunload=""}),a("a.edit_address").click(function(b){b.preventDefault(),a(this).hide(),a(this).closest(".order_data_column").find("div.address").hide(),a(this).closest(".order_data_column").find("div.edit_address").show()});var f=null,g={};"undefined"!=typeof woocommerce_admin_meta_boxes_order&&"undefined"!=typeof woocommerce_admin_meta_boxes_order.countries&&(f=a.parseJSON(woocommerce_admin_meta_boxes_order.countries.replace(/"/g,'"'))),a(".js_field-country").chosen(g).change(function(b,c){if("undefined"==typeof c&&(c=!1),null!==f){var d=a(this),e=d.val(),h=d.parents(".edit_address").find(".js_field-state"),i=h.parent(),j=h.attr("name"),k=h.attr("id"),l=d.data("woocommerce.stickState-"+e)?d.data("woocommerce.stickState-"+e):h.val(),m=h.attr("placeholder");if(c&&d.data("woocommerce.stickState-"+e,l),i.show().find(".chosen-container").remove(),f[e]){var n=a(''),o=f[e];n.append(a('")),a.each(o,function(b){n.append(a('"))}),n.val(l),h.replaceWith(n),n.show().chosen(g).hide().trigger("chosen:updated")}else h.replaceWith('');a("body").trigger("contry-change.woocommerce",[e,a(this).closest("div")])}}).trigger("change",[!0]),a("body").on("change","select.js_field-state",function(){var b=a(this),c=b.val(),d=b.parents(".edit_address").find(".js_field-country"),e=d.val();d.data("woocommerce.stickState-"+e,c)}).on("click","a.edit-order-item",function(){return a(this).closest("tr").find(".view").hide(),a(this).closest("tr").find(".edit").show(),a(this).hide(),a("button.add-line-item").click(),a("button.cancel-action").attr("data-reload",!0),!1}).on("click",".woocommerce_order_items a.delete-order-item",function(){var d=window.confirm(woocommerce_admin_meta_boxes.remove_item_notice);if(d){var e=a(this).closest("tr.item, tr.fee, tr.shipping"),f=e.attr("data-order_item_id");b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){e.remove(),c()}})}return!1}).on("click","#order_refunds .delete_refund",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_refund)){var c=a(this).closest("tr.refund"),d=c.attr("data-order_refund_id");b();var f={action:"woocommerce_delete_refund",refund_id:d,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(){e()}})}return!1}).on("change",".woocommerce_order_items input.quantity",function(){var b=a(this).closest("tr.item"),c=a(this).val(),d=a(this).attr("data-qty"),e=a("input.line_total",b),f=a("input.line_subtotal",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/d;e.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var h=accounting.unformat(f.attr("data-subtotal"),woocommerce_admin.mon_decimal_point)/d;f.val(parseFloat(accounting.formatNumber(h*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/d;e>0&&b.val(parseFloat(accounting.formatNumber(e*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var f=a("input.line_subtotal_tax",a(this)),g=accounting.unformat(f.attr("data-subtotal_tax"),woocommerce_admin.mon_decimal_point)/d;g>0&&f.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("quantity_changed")}).on("change",".woocommerce_order_items input.refund_order_item_qty",function(){var b=a(this).closest("tr.item"),c=b.find("input.quantity").val(),d=a(this).val(),e=a("input.line_total",b),f=a("input.refund_line_total",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/c;f.val(parseFloat(accounting.formatNumber(g*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=a("input.refund_line_tax",a(this)),f=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/c;f>0&&e.val(parseFloat(accounting.formatNumber(f*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("refund_quantity_changed")}).on("change",".woocommerce_order_items .refund input",function(){var b=0,c=a(".woocommerce_order_items").find("tr.item, tr.fee, tr.shipping");c.each(function(){var c=a(this),d=c.find(".refund input:not(.refund_order_item_qty)");d.each(function(c,d){b+=parseFloat(accounting.unformat(a(d).val()||0,woocommerce_admin.mon_decimal_point))})}),a("#refund_amount").val(accounting.formatNumber(b,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change()}).on("click",".woocommerce_order_items button.add_order_item_meta",function(){var d=a(this),e=d.closest("tr.item"),f={order_item_id:e.attr("data-order_item_id"),action:"woocommerce_add_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(a){e.find("tbody.meta_items").append(a),c()}}),!1}).on("click",".woocommerce_order_items button.remove_order_item_meta",function(){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_meta)){var d=a(this).closest("tr"),e={meta_id:d.attr("data-meta_id"),action:"woocommerce_remove_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(){d.hide(),c()}})}return!1}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){var b=a(this).next();(""===b.val()||b.is(".match-total"))&&b.val(a(this).val()).addClass("match-total")}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){a(this).removeClass("match-total")}),a("#woocommerce-order-items").on("click","button.add-line-item",function(){return a("div.wc-order-add-item").slideDown(),a("div.wc-order-bulk-actions").slideUp(),!1}).on("click","button.refund-items",function(){return a("div.wc-order-refund-items").slideDown(),a("div.wc-order-bulk-actions").slideUp(),a("div.wc-order-totals-items").slideUp(),a("#woocommerce-order-items div.refund").show(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").hide(),!1}).on("click",".cancel-action",function(){return a(this).closest("div.wc-order-data-row").slideUp(),a("div.wc-order-bulk-actions").slideDown(),a("div.wc-order-totals-items").slideDown(),a("#woocommerce-order-items div.refund").hide(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").show(),"true"===a(this).attr("data-reload")&&e(),!1}).on("click","button.add-order-item",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-products"}),!1}).on("click","button.add-order-fee",function(){b();var d={action:"woocommerce_add_order_fee",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_fee_line_items").append(b),c()}),!1}).on("click","button.add-order-shipping",function(){b();var d={action:"woocommerce_add_order_shipping",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_shipping_line_items").append(b),c()}),!1}).on("click","button.add-order-tax",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-tax"}),!1}).on("click","input.check-column",function(){a(this).is(":checked")?a("#woocommerce-order-items").find(".check-column input").attr("checked","checked"):a("#woocommerce-order-items").find(".check-column input").removeAttr("checked")}).on("click",".do_bulk_action",function(){var d=a(this).closest(".bulk-actions").find("select").val(),e=a("#woocommerce-order-items").find(".check-column input:checked"),f=[];if(a(e).each(function(){var b=a(this).closest("tr");b.attr("data-order_item_id")&&f.push(b.attr("data-order_item_id"))}),0===f.length)return void window.alert(woocommerce_admin_meta_boxes.i18n_select_items);if("delete"===d){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_notice)){b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){a(e).each(function(){a(this).closest("tr").remove()}),c()}})}}else if("reduce_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_reduce_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}else if("increase_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_increase_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}return!1}).on("click","button.calculate-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_totals)){b();var c=0,d=0,e=0;a(".woocommerce_order_items tr.shipping input.line_total").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),e+=parseFloat(b)}),a(".woocommerce_order_items input.line_tax").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),d+=parseFloat(b)}),a(".woocommerce_order_items tr.item, .woocommerce_order_items tr.fee").each(function(){var b=a(this).find("input.line_total").val()||"0";c+=accounting.unformat(b.replace(",","."))}),"yes"===woocommerce_admin_meta_boxes.round_at_subtotal&&(d=parseFloat(accounting.toFixed(d,woocommerce_admin_meta_boxes.rounding_precision))),a("#_order_total").val(accounting.formatNumber(c+d+e,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change(),a("button.save-action").click()}return!1}).on("click","button.save-action",function(){var e={order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),action:"woocommerce_save_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}}),a(this).trigger("items_saved"),!1}).on("click","a.delete-order-tax",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_tax)){b();var e={action:"woocommerce_remove_order_tax",rate_id:a(this).attr("data-rate_id"),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}).on("click","button.calculate-tax-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_line_taxes)){b();var e=a("#_shipping_country").val(),f=a("#_billing_country").val(),g=woocommerce_admin_meta_boxes.base_country,h="",i="",j="";e?(g=e,h=a("#_shipping_state").val(),i=a("#_shipping_postcode").val(),j=a("#_shipping_city").val()):f&&(g=f,h=a("#_billing_state").val(),i=a("#_billing_postcode").val(),j=a("#_billing_city").val());var k={action:"woocommerce_calc_line_taxes",order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),country:g,state:h,postcode:i,city:j,security:woocommerce_admin_meta_boxes.calc_totals_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:k,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}),a("body").on("change keyup",".wc-order-refund-items #refund_amount",function(){var b=accounting.unformat(a(this).val(),woocommerce_admin.mon_decimal_point);a("button .wc-order-refund-amount .amount").text(accounting.formatMoney(b,{symbol:woocommerce_admin_meta_boxes.currency_format_symbol,decimal:woocommerce_admin_meta_boxes.currency_format_decimal_sep,thousand:woocommerce_admin_meta_boxes.currency_format_thousand_sep,precision:woocommerce_admin_meta_boxes.currency_format_num_decimals,format:woocommerce_admin_meta_boxes.currency_format}))}).on("click",".wc-order-refund-items button.do-api-refund, .wc-order-refund-items button.do-manual-refund",function(){if(b(),window.confirm(woocommerce_admin_meta_boxes.i18n_do_refund)){var d=a("input#refund_amount").val(),f=a("input#refund_reason").val(),g={},h={},i={};a(".refund input.refund_order_item_qty").each(function(b,c){a(c).closest("tr").data("order_item_id")&&c.value&&(g[a(c).closest("tr").data("order_item_id")]=c.value)}),a(".refund input.refund_line_total").each(function(b,c){a(c).closest("tr").data("order_item_id")&&(h[a(c).closest("tr").data("order_item_id")]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point))}),a(".refund input.refund_line_tax").each(function(b,c){if(a(c).closest("tr").data("order_item_id")){var d=a(c).data("tax_id");i[a(c).closest("tr").data("order_item_id")]||(i[a(c).closest("tr").data("order_item_id")]={}),i[a(c).closest("tr").data("order_item_id")][d]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point)}});var j={action:"woocommerce_refund_line_items",order_id:woocommerce_admin_meta_boxes.post_id,refund_amount:d,refund_reason:f,line_item_qtys:JSON.stringify(g,null,""),line_item_totals:JSON.stringify(h,null,""),line_item_tax_totals:JSON.stringify(i,null,""),api_refund:a(this).is(".do-api-refund"),restock_refunded_items:a("#restock_refunded_items:checked").size()?"true":"false",security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,j,function(a){a===!0?e():a.error?(window.alert(a.error),c()):console.log(a)})}else c()}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-products"===f){var g=a("select#add_item_id").val();if(g){var h=g.length;b(),a.each(g,function(b,e){var f={action:"woocommerce_add_order_item",item_to_add:e,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,f,function(b){a("table.woocommerce_order_items tbody#order_line_items").append(b),--h||(a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","").val(""),d(),a("select#add_item_id").trigger("chosen:updated"),c())})})}else a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","red")}}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-tax"===f){var g=a("#manual_tax_rate_id").val(),h=a("input[name=add_order_tax]:checked").val();if(g&&(h=g),!h)return!1;var i=a(".order-tax-id").map(function(){return a(this).val()}).get();if(-1===a.inArray(h,i)){b();var j={action:"woocommerce_add_order_tax",rate_id:h,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:j,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}else window.alert(woocommerce_admin_meta_boxes.i18n_tax_rate_already_exists)}}),a("span.inline_total").closest(".totals_group").find("input").change(),a(".order_download_permissions").on("click","button.grant_access",function(){var b=a("select#grant_access_id").val();if(b){a(".order_download_permissions").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_grant_access_to_download",product_ids:b,loop:a(".order_download_permissions .wc-metabox").size(),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.grant_access_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(b){b?a(".order_download_permissions .wc-metaboxes").append(b):window.alert(woocommerce_admin_meta_boxes.i18n_download_permission_fail),a(".date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,showOn:"button",buttonImage:woocommerce_admin_meta_boxes.calendar_image,buttonImageOnly:!0}),a("#grant_access_id").val("").trigger("chosen:updated"),a(".order_download_permissions").unblock()}),!1}}).on("click","button.revoke_access",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_permission_revoke)){var b=a(this).parent().parent(),c=a(this).attr("rel").split(",")[0],d=a(this).attr("rel").split(",")[1];if(c>0){a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var e={action:"woocommerce_revoke_access_to_download",product_id:c,download_id:d,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.revoke_access_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,e,function(){a(b).fadeOut("300",function(){a(b).remove()})})}else a(b).fadeOut("300",function(){a(b).remove()})}return!1}),a("button.load_customer_billing").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_billing)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"billing",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_billing_first_name").val(c.billing_first_name).change(),a("input#_billing_last_name").val(c.billing_last_name).change(),a("input#_billing_company").val(c.billing_company).change(),a("input#_billing_address_1").val(c.billing_address_1).change(),a("input#_billing_address_2").val(c.billing_address_2).change(),a("input#_billing_city").val(c.billing_city).change(),a("input#_billing_postcode").val(c.billing_postcode).change(),a("#_billing_country").val(c.billing_country).change().trigger("chosen:updated"),a("#_billing_state").val(c.billing_state).change().trigger("chosen:updated"),a("input#_billing_email").val(c.billing_email).change(),a("input#_billing_phone").val(c.billing_phone).change()),a(".edit_address").unblock()}})}return!1}),a("button.load_customer_shipping").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_shipping)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"shipping",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_shipping_first_name").val(c.shipping_first_name).change(),a("input#_shipping_last_name").val(c.shipping_last_name).change(),a("input#_shipping_company").val(c.shipping_company).change(),a("input#_shipping_address_1").val(c.shipping_address_1).change(),a("input#_shipping_address_2").val(c.shipping_address_2).change(),a("input#_shipping_city").val(c.shipping_city).change(),a("input#_shipping_postcode").val(c.shipping_postcode).change(),a("#_shipping_country").val(c.shipping_country).change().trigger("chosen:updated"),a("#_shipping_state").val(c.shipping_state).change().trigger("chosen:updated")),a(".edit_address").unblock()}})}return!1}),a("button.billing-same-as-shipping").on("click",function(){return window.confirm(woocommerce_admin_meta_boxes.copy_billing)&&(a("input#_shipping_first_name").val(a("input#_billing_first_name").val()).change(),a("input#_shipping_last_name").val(a("input#_billing_last_name").val()).change(),a("input#_shipping_company").val(a("input#_billing_company").val()).change(),a("input#_shipping_address_1").val(a("input#_billing_address_1").val()).change(),a("input#_shipping_address_2").val(a("input#_billing_address_2").val()).change(),a("input#_shipping_city").val(a("input#_billing_city").val()).change(),a("input#_shipping_postcode").val(a("input#_billing_postcode").val()).change(),a("#_shipping_country").val(a("#_billing_country").val()).change().trigger("chosen:updated"),a("#_shipping_state").val(a("#_billing_state").val()).change().trigger("chosen:updated")),!1}),a(".totals_group").on("click","a.add_total_row",function(){return a(this).closest(".totals_group").find(".total_rows").append(a(this).data("row")),!1}),a(".total_rows").on("click","a.delete_total_row",function(){var b=a(this).closest(".total_row"),c=b.attr("data-order_item_id");return c?b.append('').hide():b.remove(),!1}),a("#woocommerce-order-notes").on("click","a.add_note",function(){if(a("textarea#add_order_note").val()){a("#woocommerce-order-notes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b={action:"woocommerce_add_order_note",post_id:woocommerce_admin_meta_boxes.post_id,note:a("textarea#add_order_note").val(),note_type:a("select#order_note_type").val(),security:woocommerce_admin_meta_boxes.add_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,b,function(b){a("ul.order_notes").prepend(b),a("#woocommerce-order-notes").unblock(),a("#add_order_note").val("")}),!1}}).on("click","a.delete_note",function(){var b=a(this).closest("li.note");a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_delete_order_note",note_id:a(b).attr("rel"),security:woocommerce_admin_meta_boxes.delete_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(){a(b).remove()}),!1})}); \ No newline at end of file diff --git a/includes/abstracts/abstract-wc-order.php b/includes/abstracts/abstract-wc-order.php index 8aaeb0aaa76..58a10a12e45 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -482,7 +482,7 @@ abstract class WC_Abstract_Order { */ public function set_total( $amount, $total_type = 'total' ) { - if ( ! in_array( $total_type, array( 'shipping', 'order_discount', 'tax', 'shipping_tax', 'total', 'cart_discount' ) ) ) { + if ( ! in_array( $total_type, array( 'shipping', 'tax', 'shipping_tax', 'total', 'cart_discount' ) ) ) { return false; } @@ -491,7 +491,6 @@ abstract class WC_Abstract_Order { $key = '_order_total'; $amount = wc_format_decimal( $amount, get_option( 'woocommerce_price_num_decimals' ) ); break; - case 'order_discount' : case 'cart_discount' : $key = '_' . $total_type; $amount = wc_format_decimal( $amount ); @@ -722,7 +721,7 @@ abstract class WC_Abstract_Order { $this->set_total( $cart_subtotal - $cart_total, 'cart_discount' ); - $grand_total = round( $cart_total + $fee_total + $this->get_total_shipping() - $this->get_order_discount() + $this->get_cart_tax() + $this->get_shipping_tax(), absint( get_option( 'woocommerce_price_num_decimals' ) ) ); + $grand_total = round( $cart_total + $fee_total + $this->get_total_shipping() + $this->get_cart_tax() + $this->get_shipping_tax(), absint( get_option( 'woocommerce_price_num_decimals' ) ) ); $this->set_total( $grand_total, 'total' ); @@ -1239,9 +1238,11 @@ abstract class WC_Abstract_Order { /** * Gets the total (order) discount amount - these are applied after tax. * + * @deprecated order (after tax) discounts removed in 2.3.0 * @return float */ public function get_order_discount() { + _deprecated_function( 'get_order_discount', '2.3' ); return apply_filters( 'woocommerce_order_amount_order_discount', (double) $this->order_discount, $this ); } @@ -1251,7 +1252,7 @@ abstract class WC_Abstract_Order { * @return float */ public function get_total_discount() { - return apply_filters( 'woocommerce_order_amount_total_discount', $this->get_cart_discount() + $this->get_order_discount(), $this ); + return apply_filters( 'woocommerce_order_amount_total_discount', $this->get_cart_discount(), $this ); } /** @@ -1649,9 +1650,11 @@ abstract class WC_Abstract_Order { /** * Get cart discount (formatted). * + * @deprecated order (after tax) discounts removed in 2.3.0 * @return string */ public function get_order_discount_to_display() { + _deprecated_function( 'get_order_discount_to_display', '2.3' ); return apply_filters( 'woocommerce_order_discount_to_display', wc_price( $this->get_order_discount(), array( 'currency' => $this->get_order_currency() ) ), $this ); } @@ -1756,13 +1759,6 @@ abstract class WC_Abstract_Order { } } - if ( $this->get_order_discount() > 0 ) { - $total_rows['order_discount'] = array( - 'label' => __( 'Order Discount:', 'woocommerce' ), - 'value' => '-' . $this->get_order_discount_to_display() - ); - } - if ( $this->get_total() > 0 ) { $total_rows['payment_method'] = array( 'label' => __( 'Payment Method:', 'woocommerce' ), diff --git a/includes/admin/meta-boxes/views/html-order-items.php b/includes/admin/meta-boxes/views/html-order-items.php index 067507a4e4b..cc1cc26d7f3 100644 --- a/includes/admin/meta-boxes/views/html-order-items.php +++ b/includes/admin/meta-boxes/views/html-order-items.php @@ -136,6 +136,16 @@ if ( wc_tax_enabled() ) { } ?> + + + + + + + id ); ?> + @@ -156,20 +166,6 @@ if ( wc_tax_enabled() ) { id ); ?> - - - - - - - id ); ?> - + + + + + + + + cart->get_coupons( 'cart' ) as $code => $coupon ) : ?> + + + + + + + cart->needs_shipping() && WC()->cart->show_shipping() ) : ?> + + + + + + + -
    + cart->get_fees() as $fee ) : ?> +
    + + + + - + cart->tax_display_cart === 'excl' ) : ?> + + cart->get_tax_totals() as $code => $tax ) : ?> + + + + + + + + + + + + - + cart->get_coupons( 'order' ) as $code => $coupon ) : ?> + + + + + - + - + + + - echo apply_filters( 'woocommerce_order_button_html', '' ); - ?> + - 0 && apply_filters( 'woocommerce_checkout_show_terms', true ) ) { - $terms_is_checked = apply_filters( 'woocommerce_terms_is_checked_default', isset( $_POST['terms'] ) ); - ?> -

    - - id="terms" /> -

    - - - - - - -
    - - - - - - + +
    [?]: + get_total_discount(), array( 'currency' => $order->get_order_currency() ) ); ?> +
    [?]: get_total_shipping(), array( 'currency' => $order->get_order_currency() ) ); ?>
    [?]: -
    get_total_discount(), array( 'currency' => $order->get_order_currency() ) ); ?>
    - -
    is_editable() ) : ?>
    : diff --git a/includes/admin/wc-admin-functions.php b/includes/admin/wc-admin-functions.php index 5158890a4c1..770091d8f38 100644 --- a/includes/admin/wc-admin-functions.php +++ b/includes/admin/wc-admin-functions.php @@ -325,7 +325,6 @@ function wc_save_order_items( $order_id, $items ) { update_post_meta( $order_id, '_cart_discount', $subtotal - $total ); // Update totals - update_post_meta( $order_id, '_order_discount', wc_format_decimal( $items['_order_discount'] ) ); update_post_meta( $order_id, '_order_total', wc_format_decimal( $items['_order_total'] ) ); // Update tax diff --git a/includes/api/class-wc-api-orders.php b/includes/api/class-wc-api-orders.php index f4660eaeec3..1e48d15b06b 100644 --- a/includes/api/class-wc-api-orders.php +++ b/includes/api/class-wc-api-orders.php @@ -158,7 +158,6 @@ class WC_API_Orders extends WC_API_Resource { 'shipping_tax' => wc_format_decimal( $order->get_shipping_tax(), 2 ), 'total_discount' => wc_format_decimal( $order->get_total_discount(), 2 ), 'cart_discount' => wc_format_decimal( $order->get_cart_discount(), 2 ), - 'order_discount' => wc_format_decimal( $order->get_order_discount(), 2 ), 'shipping_methods' => $order->get_shipping_method(), 'payment_details' => array( 'method_id' => $order->payment_method, diff --git a/includes/class-wc-checkout.php b/includes/class-wc-checkout.php index 702d186d4fe..6b10d676337 100644 --- a/includes/class-wc-checkout.php +++ b/includes/class-wc-checkout.php @@ -289,7 +289,6 @@ class WC_Checkout { $order->set_address( $shipping_address, 'shipping' ); $order->set_payment_method( $this->payment_method ); $order->set_total( WC()->cart->shipping_total, 'shipping' ); - $order->set_total( WC()->cart->get_order_discount_total(), 'order_discount' ); $order->set_total( WC()->cart->get_cart_discount_total(), 'cart_discount' ); $order->set_total( WC()->cart->tax_total, 'tax' ); $order->set_total( WC()->cart->shipping_tax_total, 'shipping_tax' ); diff --git a/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php b/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php index 669dc87f5d7..d8617ff8163 100644 --- a/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php +++ b/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php @@ -157,7 +157,7 @@ class WC_Gateway_Paypal_Request { /** * Try passing a line item per product if supported */ - if ( ( ! wc_tax_enabled() || ! wc_prices_include_tax() ) && ! $order->get_order_discount() && $this->prepare_line_items( $order ) ) { + if ( ( ! wc_tax_enabled() || ! wc_prices_include_tax() ) && $this->prepare_line_items( $order ) ) { $line_item_args = $this->get_line_items(); $line_item_args['tax_cart'] = $order->get_total_tax(); @@ -175,14 +175,10 @@ class WC_Gateway_Paypal_Request { $this->delete_line_items(); - $this->add_line_item( $this->get_order_item_names( $order ), 1, number_format( $order->get_total() - round( $order->get_total_shipping() + $order->get_shipping_tax(), 2 ) + $order->get_order_discount(), 2, '.', '' ), $order->get_order_number() ); + $this->add_line_item( $this->get_order_item_names( $order ), 1, number_format( $order->get_total() - round( $order->get_total_shipping() + $order->get_shipping_tax(), 2 ), 2, '.', '' ), $order->get_order_number() ); $this->add_line_item( sprintf( __( 'Shipping via %s', 'woocommerce' ), ucwords( $order->get_shipping_method() ) ), 1, number_format( $order->get_total_shipping() + $order->get_shipping_tax(), 2, '.', '' ) ); $line_item_args = $this->get_line_items(); - - if ( $order->get_order_discount() ) { - $line_item_args['discount_amount_cart'] = $order->get_order_discount(); - } } return $line_item_args; From 3c82331a8b9dfc709b9d834bd4f225fce6028e43 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 25 Nov 2014 13:05:03 +0000 Subject: [PATCH 267/743] Store discount 'tax' to show discounts on prices including tax more accuratly Also deprecated some functions named after having 2 levels of discounts. --- includes/abstracts/abstract-wc-order.php | 169 ++++------- includes/admin/wc-admin-functions.php | 15 +- includes/api/class-wc-api-orders.php | 2 +- includes/class-wc-cart.php | 275 ++++++++++-------- includes/class-wc-checkout.php | 3 +- .../class-wc-gateway-paypal-request.php | 6 +- includes/wc-cart-functions.php | 4 +- 7 files changed, 240 insertions(+), 234 deletions(-) diff --git a/includes/abstracts/abstract-wc-order.php b/includes/abstracts/abstract-wc-order.php index 58a10a12e45..2552c52453f 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -242,10 +242,10 @@ abstract class WC_Abstract_Order { * * @param string $code * @param integer $discount_amount + * @param integer $discount_amount_tax "Discounted" tax - used for tax inclusive prices * @return int|bool Item ID or false */ - public function add_coupon( $code, $discount_amount = 0 ) { - + public function add_coupon( $code, $discount_amount = 0, $discount_amount_tax = 0 ) { $item_id = wc_add_order_item( $this->id, array( 'order_item_name' => $code, 'order_item_type' => 'coupon' @@ -256,8 +256,9 @@ abstract class WC_Abstract_Order { } wc_add_order_item_meta( $item_id, 'discount_amount', $discount_amount ); + wc_add_order_item_meta( $item_id, 'discount_amount_tax', $discount_amount_tax ); - do_action( 'woocommerce_order_add_coupon', $this->id, $item_id, $code, $discount_amount ); + do_action( 'woocommerce_order_add_coupon', $this->id, $item_id, $code, $discount_amount, $discount_amount_tax ); return $item_id; } @@ -273,7 +274,6 @@ abstract class WC_Abstract_Order { * @return bool */ public function update_coupon( $item_id, $args ) { - if ( ! $item_id ) { return false; } @@ -287,6 +287,9 @@ abstract class WC_Abstract_Order { if ( isset( $args['discount_amount'] ) ) { wc_update_order_item_meta( $item_id, 'discount_amount', wc_format_decimal( $args['discount_amount'] ) ); } + if ( isset( $args['discount_amount_tax'] ) ) { + wc_add_order_item_meta( $item_id, 'discount_amount_tax', wc_format_decimal( $args['discount_amount_tax'] ) ); + } do_action( 'woocommerce_order_update_coupon', $this->id, $item_id, $args ); @@ -482,7 +485,7 @@ abstract class WC_Abstract_Order { */ public function set_total( $amount, $total_type = 'total' ) { - if ( ! in_array( $total_type, array( 'shipping', 'tax', 'shipping_tax', 'total', 'cart_discount' ) ) ) { + if ( ! in_array( $total_type, array( 'shipping', 'tax', 'shipping_tax', 'total', 'cart_discount', 'cart_discount_tax' ) ) ) { return false; } @@ -492,6 +495,7 @@ abstract class WC_Abstract_Order { $amount = wc_format_decimal( $amount, get_option( 'woocommerce_price_num_decimals' ) ); break; case 'cart_discount' : + case 'cart_discount_tax' : $key = '_' . $total_type; $amount = wc_format_decimal( $amount ); break; @@ -698,10 +702,11 @@ abstract class WC_Abstract_Order { * @return float calculated grand total */ public function calculate_totals( $and_taxes = true ) { - - $cart_subtotal = 0; - $cart_total = 0; - $fee_total = 0; + $cart_subtotal = 0; + $cart_total = 0; + $fee_total = 0; + $cart_subtotal_tax = 0; + $cart_total_tax = 0; if ( $and_taxes ) { $this->calculate_taxes(); @@ -709,8 +714,10 @@ abstract class WC_Abstract_Order { // line items foreach ( $this->get_items() as $item ) { - $cart_subtotal += wc_format_decimal( isset( $item['line_subtotal'] ) ? $item['line_subtotal'] : 0 ); - $cart_total += wc_format_decimal( isset( $item['line_total'] ) ? $item['line_total'] : 0 ); + $cart_subtotal += wc_format_decimal( isset( $item['line_subtotal'] ) ? $item['line_subtotal'] : 0 ); + $cart_total += wc_format_decimal( isset( $item['line_total'] ) ? $item['line_total'] : 0 ); + $cart_subtotal_tax += wc_format_decimal( isset( $item['line_subtotal_tax'] ) ? $item['line_subtotal_tax'] : 0 ); + $cart_total_tax += wc_format_decimal( isset( $item['line_total_tax'] ) ? $item['line_total_tax'] : 0 ); } $this->calculate_shipping(); @@ -719,7 +726,8 @@ abstract class WC_Abstract_Order { $fee_total += $item['line_total']; } - $this->set_total( $cart_subtotal - $cart_total, 'cart_discount' ); + $this->set_total( $cart_subtotal + $cart_subtotal_tax - $cart_total - $cart_total_tax, 'cart_discount' ); + $this->set_total( $cart_subtotal_tax - $cart_total_tax, 'cart_discount_tax' ); $grand_total = round( $cart_total + $fee_total + $this->get_total_shipping() + $this->get_cart_tax() + $this->get_shipping_tax(), absint( get_option( 'woocommerce_price_num_decimals' ) ) ); @@ -1227,12 +1235,36 @@ abstract class WC_Abstract_Order { /** Total Getters *******************************************************/ /** - * Gets the total (product) discount amount - these are applied before tax. - * + * Gets the total discount amount + * @param $ex_tax Show discount excl any tax. + * @return float + */ + public function get_total_discount( $ex_tax = true ) { + if ( $ex_tax ) { + return apply_filters( 'woocommerce_order_amount_total_discount', (double) $this->cart_discount - (double) $this->cart_discount_tax, $this ); + } else { + return apply_filters( 'woocommerce_order_amount_total_discount', (double) $this->cart_discount, $this ); + } + } + + /** + * Gets the discount amount + * @deprecated in favour of get_total_discount() since we now only have one discount type. * @return float */ public function get_cart_discount() { - return apply_filters( 'woocommerce_order_amount_cart_discount', (double) $this->cart_discount, $this ); + _deprecated_function( 'get_cart_discount', '2.3', 'get_total_discount' ); + return apply_filters( 'woocommerce_order_amount_cart_discount', $this->get_total_discount(), $this ); + } + + /** + * Get cart discount (formatted). + * + * @deprecated order (after tax) discounts removed in 2.3.0 + * @return string + */ + public function get_order_discount_to_display() { + _deprecated_function( 'get_order_discount_to_display', '2.3' ); } /** @@ -1246,15 +1278,6 @@ abstract class WC_Abstract_Order { return apply_filters( 'woocommerce_order_amount_order_discount', (double) $this->order_discount, $this ); } - /** - * Gets the total discount amount - both kinds - * - * @return float - */ - public function get_total_discount() { - return apply_filters( 'woocommerce_order_amount_total_discount', $this->get_cart_discount(), $this ); - } - /** * Gets cart tax amount. * @@ -1306,7 +1329,6 @@ abstract class WC_Abstract_Order { * @return mixed|void */ public function get_subtotal() { - $subtotal = 0; foreach ( $this->get_items() as $item ) { @@ -1420,28 +1442,6 @@ abstract class WC_Abstract_Order { return apply_filters( 'woocommerce_order_amount_line_tax', wc_round_tax_total( $item['line_tax'] ), $item, $this ); } - /** - * Gets shipping total. - * - * @deprecated As of 2.1, use of get_total_shipping() is preferred - * @return float - */ - public function get_shipping() { - _deprecated_function( 'get_shipping', '2.1', 'get_total_shipping' ); - return $this->get_total_shipping(); - } - - /** - * get_order_total function. Alias for get_total() - * - * @deprecated As of 2.1, use of get_total() is preferred - * @return float - */ - public function get_order_total() { - _deprecated_function( 'get_order_total', '2.1', 'get_total' ); - return $this->get_total(); - } - /** End Total Getters *******************************************************/ /** @@ -1581,7 +1581,7 @@ abstract class WC_Abstract_Order { } // Remove discounts - $subtotal = $subtotal - $this->get_cart_discount(); + $subtotal = $subtotal - $this->get_total_discount(); $subtotal = wc_price( $subtotal, array('currency' => $this->get_order_currency()) ); } @@ -1596,7 +1596,6 @@ abstract class WC_Abstract_Order { * @return string */ public function get_shipping_to_display( $tax_display = '' ) { - if ( ! $tax_display ) { $tax_display = $this->tax_display_cart; } @@ -1636,29 +1635,28 @@ abstract class WC_Abstract_Order { return apply_filters( 'woocommerce_order_shipping_to_display', $shipping, $this ); } - /** - * Get cart discount (formatted). - * + * Get the discount amount (formatted). + * @since 2.3.0 * @return string. */ - public function get_cart_discount_to_display() { - return apply_filters( 'woocommerce_order_cart_discount_to_display', wc_price( $this->get_cart_discount(), array( 'currency' => $this->get_order_currency() ) ), $this ); + public function get_discount_to_display( $tax_display = '' ) { + if ( ! $tax_display ) { + $tax_display = $this->tax_display_cart; + } + return apply_filters( 'woocommerce_order_discount_to_display', wc_price( $this->get_total_discount( $tax_display === 'excl' ), array( 'currency' => $this->get_order_currency() ) ), $this ); } - /** * Get cart discount (formatted). - * - * @deprecated order (after tax) discounts removed in 2.3.0 - * @return string + * @deprecated + * @return string. */ - public function get_order_discount_to_display() { - _deprecated_function( 'get_order_discount_to_display', '2.3' ); - return apply_filters( 'woocommerce_order_discount_to_display', wc_price( $this->get_order_discount(), array( 'currency' => $this->get_order_currency() ) ), $this ); + public function get_cart_discount_to_display( $tax_display = '' ) { + _deprecated_function( 'get_cart_discount_to_display', '2.3', 'get_discount_to_display' ); + return apply_filters( 'woocommerce_order_cart_discount_to_display', $this->get_discount_to_display(), $this ); } - /** * Get a product (either product or variation). * @@ -1699,10 +1697,10 @@ abstract class WC_Abstract_Order { ); } - if ( $this->get_cart_discount() > 0 ) { - $total_rows['cart_discount'] = array( - 'label' => __( 'Cart Discount:', 'woocommerce' ), - 'value' => '-' . $this->get_cart_discount_to_display() + if ( $this->get_total_discount() > 0 ) { + $total_rows['discount'] = array( + 'label' => __( 'Discount:', 'woocommerce' ), + 'value' => '-' . $this->get_discount_to_display() ); } @@ -1934,45 +1932,6 @@ abstract class WC_Abstract_Order { return apply_filters( 'woocommerce_get_view_order_url', $view_order_url, $this ); } - /** - * Gets any downloadable product file urls. - * - * @deprecated as of 2.1 get_item_downloads is preferred as downloads are more than just file urls - * @param int $product_id product identifier - * @param int $variation_id variation identifier, or null - * @param array $item the item - * @return array available downloadable file urls - */ - public function get_downloadable_file_urls( $product_id, $variation_id, $item ) { - global $wpdb; - - _deprecated_function( 'get_downloadable_file_urls', '2.1', 'get_item_downloads' ); - - $download_file = $variation_id > 0 ? $variation_id : $product_id; - $_product = wc_get_product( $download_file ); - - $user_email = $this->billing_email; - - $results = $wpdb->get_results( $wpdb->prepare(" - SELECT download_id - FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions - WHERE user_email = %s - AND order_key = %s - AND product_id = %s - ", $user_email, $this->order_key, $download_file ) ); - - $file_urls = array(); - - foreach ( $results as $result ) { - - if ( $_product->has_file( $result->download_id ) ) { - $file_urls[ $_product->get_file_download_path( $result->download_id ) ] = $this->get_download_url( $download_file, $result->download_id ); - } - } - - return apply_filters( 'woocommerce_get_downloadable_file_urls', $file_urls, $product_id, $variation_id, $item ); - } - /** * Get the downloadable files for an item in this order * diff --git a/includes/admin/wc-admin-functions.php b/includes/admin/wc-admin-functions.php index 770091d8f38..456e7856cd2 100644 --- a/includes/admin/wc-admin-functions.php +++ b/includes/admin/wc-admin-functions.php @@ -155,9 +155,11 @@ function wc_save_order_items( $order_id, $items ) { global $wpdb; // Order items + fees - $subtotal = 0; - $total = 0; - $taxes = array( 'items' => array(), 'shipping' => array() ); + $subtotal = 0; + $total = 0; + $subtotal_tax = 0; + $total_tax = 0; + $taxes = array( 'items' => array(), 'shipping' => array() ); if ( isset( $items['order_item_id'] ) ) { @@ -210,8 +212,10 @@ function wc_save_order_items( $order_id, $items ) { $taxes['items'][] = $line_taxes; // Total up - $subtotal += wc_format_decimal( $line_subtotal[ $item_id ] ) + array_sum( $line_subtotal_taxes ); - $total += wc_format_decimal( $line_total[ $item_id ] ) + array_sum( $line_taxes ); + $subtotal += wc_format_decimal( $line_subtotal[ $item_id ] ) + array_sum( $line_subtotal_taxes ); + $total += wc_format_decimal( $line_total[ $item_id ] ) + array_sum( $line_taxes ); + $subtotal_tax += array_sum( $line_subtotal_taxes ); + $total_tax += array_sum( $line_taxes ); // Clear meta cache wp_cache_delete( $item_id, 'order_item_meta' ); @@ -323,6 +327,7 @@ function wc_save_order_items( $order_id, $items ) { // Update cart discount from item totals update_post_meta( $order_id, '_cart_discount', $subtotal - $total ); + update_post_meta( $order_id, '_cart_discount_tax', $subtotal_tax - $total_tax ); // Update totals update_post_meta( $order_id, '_order_total', wc_format_decimal( $items['_order_total'] ) ); diff --git a/includes/api/class-wc-api-orders.php b/includes/api/class-wc-api-orders.php index 1e48d15b06b..95163f7bf2e 100644 --- a/includes/api/class-wc-api-orders.php +++ b/includes/api/class-wc-api-orders.php @@ -157,7 +157,7 @@ class WC_API_Orders extends WC_API_Resource { 'cart_tax' => wc_format_decimal( $order->get_cart_tax(), 2 ), 'shipping_tax' => wc_format_decimal( $order->get_shipping_tax(), 2 ), 'total_discount' => wc_format_decimal( $order->get_total_discount(), 2 ), - 'cart_discount' => wc_format_decimal( $order->get_cart_discount(), 2 ), + 'cart_discount' => wc_format_decimal( $order->get_total_discount(), 2 ), 'shipping_methods' => $order->get_shipping_method(), 'payment_details' => array( 'method_id' => $order->payment_method, diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index f144d25e71a..e02cce5cc8c 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -22,6 +22,9 @@ class WC_Cart { /** @var array Contains an array of coupon code discounts after they have been applied. */ public $coupon_discount_amounts = array(); + /** @var array Contains an array of coupon code discount taxes. Used for tax incl pricing. */ + public $coupon_discount_tax_amounts = array(); + /** @var array Contains an array of coupon usage counts after they have been applied. */ public $coupon_applied_count = array(); @@ -34,9 +37,6 @@ class WC_Cart { /** @var float The total count of the cart items. */ public $cart_contents_count; - /** @var float The total tax for the cart items. */ - public $cart_contents_tax; - /** @var float Cart grand total. */ public $total; @@ -55,11 +55,11 @@ class WC_Cart { /** @var array An array of taxes/tax rates for the shipping. */ public $shipping_taxes; - /** @var float Discounts before tax. */ + /** @var float Discounts (before tax) */ public $discount_cart; - /** @var float Discounts after tax. */ - public $discount_total; + /** @var float Discounts (before tax) excluding tax. Used predominantly for tax inclusive prices */ + public $discount_cart_tax; /** @var float Total for additional fees. */ public $fee_total; @@ -70,23 +70,33 @@ class WC_Cart { /** @var float Shipping tax. */ public $shipping_tax_total; - /** @var WC_Tax */ - public $tax; - - /** @var array cart_session_data */ - public $cart_session_data = array(); + /** @var array cart_session_data. Array of data the cart calculates and stores in the session with defaults */ + public $cart_session_data = array( + 'cart_contents_total' => 0, + 'cart_contents_weight' => 0, + 'cart_contents_count' => 0, + 'total' => 0, + 'subtotal' => 0, + 'subtotal_ex_tax' => 0, + 'tax_total' => 0, + 'taxes' => array(), + 'shipping_taxes' => array(), + 'discount_cart' => 0, + 'shipping_total' => 0, + 'shipping_tax_total' => 0, + 'coupon_discount_amounts' => array(), + 'coupon_discount_tax_amounts' => array(), + 'fee_total' => 0, + 'fees' => array() + ); /** @var array An array of fees. */ public $fees = array(); /** * Constructor for the cart class. Loads options and hooks in the init method. - * - * @access public - * @return void */ public function __construct() { - $this->tax = new WC_Tax(); $this->prices_include_tax = wc_prices_include_tax(); $this->round_at_subtotal = get_option( 'woocommerce_tax_round_at_subtotal' ) == 'yes'; $this->tax_display_cart = get_option( 'woocommerce_tax_display_cart' ); @@ -94,32 +104,26 @@ class WC_Cart { $this->display_totals_ex_tax = $this->tax_display_cart == 'excl'; $this->display_cart_ex_tax = $this->tax_display_cart == 'excl'; - // Array of data the cart calculates and stores in the session with defaults - $this->cart_session_data = array( - 'cart_contents_total' => 0, - 'cart_contents_weight' => 0, - 'cart_contents_count' => 0, - 'cart_contents_tax' => 0, - 'total' => 0, - 'subtotal' => 0, - 'subtotal_ex_tax' => 0, - 'tax_total' => 0, - 'taxes' => array(), - 'shipping_taxes' => array(), - 'discount_cart' => 0, - 'discount_total' => 0, - 'shipping_total' => 0, - 'shipping_tax_total' => 0, - 'coupon_discount_amounts' => array(), - 'fee_total' => 0, - 'fees' => array() - ); - add_action( 'init', array( $this, 'init' ), 5 ); // Get cart on init add_action( 'wp', array( $this, 'maybe_set_cart_cookies' ), 99 ); // Set cookies add_action( 'shutdown', array( $this, 'maybe_set_cart_cookies' ), 0 ); // Set cookies before shutdown and ob flushing } + /** + * Auto-load in-accessible properties on demand. + * + * @param mixed $key + * @return mixed + */ + public function __get( $key ) { + switch( $key ) { + case 'tax': + _deprecated_argument( 'WC_Cart->tax', '2.3', 'Use WC_Tax:: directly' ); + $this->tax = new WC_Tax(); + return $this->tax; + } + } + /** * Loads the cart data from the PHP session during WordPress init and hooks in other methods. * @@ -247,6 +251,7 @@ class WC_Cart { WC()->session->set( 'cart', $cart_session ); WC()->session->set( 'applied_coupons', $this->applied_coupons ); WC()->session->set( 'coupon_discount_amounts', $this->coupon_discount_amounts ); + WC()->session->set( 'coupon_discount_tax_amounts', $this->coupon_discount_tax_amounts ); foreach ( $this->cart_session_data as $key => $default ) { WC()->session->set( $key, $this->$key ); @@ -270,7 +275,7 @@ class WC_Cart { $this->cart_contents = array(); $this->reset(); - unset( WC()->session->order_awaiting_payment, WC()->session->applied_coupons, WC()->session->coupon_discount_amounts, WC()->session->cart ); + unset( WC()->session->order_awaiting_payment, WC()->session->applied_coupons, WC()->session->coupon_discount_amounts, WC()->session->coupon_discount_tax_amounts, WC()->session->cart ); if ( $clear_persistent_cart && get_current_user_id() ) { $this->persistent_cart_destroy(); @@ -749,7 +754,7 @@ class WC_Cart { foreach ( $taxes as $key => $tax ) { - $code = $this->tax->get_rate_code( $key ); + $code = WC_Tax::get_rate_code( $key ); if ( $code ) { if ( ! isset( $tax_totals[ $code ] ) ) { @@ -758,8 +763,8 @@ class WC_Cart { } $tax_totals[ $code ]->tax_rate_id = $key; - $tax_totals[ $code ]->is_compound = $this->tax->is_compound( $key ); - $tax_totals[ $code ]->label = $this->tax->get_rate_label( $key ); + $tax_totals[ $code ]->is_compound = WC_Tax::is_compound( $key ); + $tax_totals[ $code ]->label = WC_Tax::get_rate_label( $key ); $tax_totals[ $code ]->amount += wc_round_tax_total( $tax ); $tax_totals[ $code ]->formatted_amount = wc_price( wc_round_tax_total( $tax_totals[ $code ]->amount ) ); } @@ -1091,11 +1096,11 @@ class WC_Cart { // Get base tax rates if ( empty( $shop_tax_rates[ $_product->tax_class ] ) ) - $shop_tax_rates[ $_product->tax_class ] = $this->tax->get_base_tax_rates( $_product->tax_class ); + $shop_tax_rates[ $_product->tax_class ] = WC_Tax::get_base_tax_rates( $_product->tax_class ); // Get item tax rates if ( empty( $tax_rates[ $_product->get_tax_class() ] ) ) - $tax_rates[ $_product->get_tax_class() ] = $this->tax->get_rates( $_product->get_tax_class() ); + $tax_rates[ $_product->get_tax_class() ] = WC_Tax::get_rates( $_product->get_tax_class() ); $base_tax_rates = $shop_tax_rates[ $_product->tax_class ]; $item_tax_rates = $tax_rates[ $_product->get_tax_class() ]; @@ -1106,13 +1111,13 @@ class WC_Cart { if ( $item_tax_rates !== $base_tax_rates ) { // Work out a new base price without the shop's base tax - $taxes = $this->tax->calc_tax( $line_price, $base_tax_rates, true, true ); + $taxes = WC_Tax::calc_tax( $line_price, $base_tax_rates, true, true ); // Now we have a new item price (excluding TAX) $line_subtotal = $line_price - array_sum( $taxes ); // Now add modifed taxes - $tax_result = $this->tax->calc_tax( $line_subtotal, $item_tax_rates ); + $tax_result = WC_Tax::calc_tax( $line_subtotal, $item_tax_rates ); $line_subtotal_tax = array_sum( $tax_result ); /** @@ -1121,7 +1126,7 @@ class WC_Cart { } else { // Calc tax normally - $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates, true ); + $taxes = WC_Tax::calc_tax( $line_price, $item_tax_rates, true ); $line_subtotal_tax = array_sum( $taxes ); $line_subtotal = $line_price - array_sum( $taxes ); } @@ -1135,12 +1140,12 @@ class WC_Cart { // Get item tax rates if ( empty( $tax_rates[ $_product->get_tax_class() ] ) ) - $tax_rates[ $_product->get_tax_class() ] = $this->tax->get_rates( $_product->get_tax_class() ); + $tax_rates[ $_product->get_tax_class() ] = WC_Tax::get_rates( $_product->get_tax_class() ); $item_tax_rates = $tax_rates[ $_product->get_tax_class() ]; // Base tax for line before discount - we will store this in the order data - $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates ); + $taxes = WC_Tax::calc_tax( $line_price, $item_tax_rates ); $line_subtotal_tax = array_sum( $taxes ); $line_subtotal = $line_price; } @@ -1177,7 +1182,7 @@ class WC_Cart { $line_subtotal_tax = 0; $line_subtotal = $line_price; $line_tax = 0; - $line_total = $this->tax->round( $discounted_price * $values['quantity'] ); + $line_total = WC_Tax::round( $discounted_price * $values['quantity'] ); /** * Prices include tax @@ -1193,13 +1198,13 @@ class WC_Cart { if ( $item_tax_rates !== $base_tax_rates ) { // Work out a new base price without the shop's base tax - $taxes = $this->tax->calc_tax( $line_price, $base_tax_rates, true, true ); + $taxes = WC_Tax::calc_tax( $line_price, $base_tax_rates, true, true ); // Now we have a new item price (excluding TAX) $line_subtotal = round( $line_price - array_sum( $taxes ), WC_ROUNDING_PRECISION ); // Now add modifed taxes - $taxes = $this->tax->calc_tax( $line_subtotal, $item_tax_rates ); + $taxes = WC_Tax::calc_tax( $line_subtotal, $item_tax_rates ); $line_subtotal_tax = array_sum( $taxes ); // Adjusted price (this is the price including the new tax rate) @@ -1207,7 +1212,7 @@ class WC_Cart { // Apply discounts $discounted_price = $this->get_discounted_price( $values, $adjusted_price, true ); - $discounted_taxes = $this->tax->calc_tax( $discounted_price * $values['quantity'], $item_tax_rates, true ); + $discounted_taxes = WC_Tax::calc_tax( $discounted_price * $values['quantity'], $item_tax_rates, true ); $line_tax = array_sum( $discounted_taxes ); $line_total = ( $discounted_price * $values['quantity'] ) - $line_tax; @@ -1217,7 +1222,7 @@ class WC_Cart { } else { // Work out a new base price without the item tax - $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates, true ); + $taxes = WC_Tax::calc_tax( $line_price, $item_tax_rates, true ); // Now we have a new item price (excluding TAX) $line_subtotal = $line_price - array_sum( $taxes ); @@ -1225,7 +1230,7 @@ class WC_Cart { // Calc prices and tax (discounted) $discounted_price = $this->get_discounted_price( $values, $base_price, true ); - $discounted_taxes = $this->tax->calc_tax( $discounted_price * $values['quantity'], $item_tax_rates, true ); + $discounted_taxes = WC_Tax::calc_tax( $discounted_price * $values['quantity'], $item_tax_rates, true ); $line_tax = array_sum( $discounted_taxes ); $line_total = ( $discounted_price * $values['quantity'] ) - $line_tax; } @@ -1243,7 +1248,7 @@ class WC_Cart { $item_tax_rates = $tax_rates[ $_product->get_tax_class() ]; // Work out a new base price without the shop's base tax - $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates ); + $taxes = WC_Tax::calc_tax( $line_price, $item_tax_rates ); // Now we have the item price (excluding TAX) $line_subtotal = $line_price; @@ -1251,7 +1256,7 @@ class WC_Cart { // Now calc product rates $discounted_price = $this->get_discounted_price( $values, $base_price, true ); - $discounted_taxes = $this->tax->calc_tax( $discounted_price * $values['quantity'], $item_tax_rates ); + $discounted_taxes = WC_Tax::calc_tax( $discounted_price * $values['quantity'], $item_tax_rates ); $discounted_tax_amount = array_sum( $discounted_taxes ); $line_tax = $discounted_tax_amount; $line_total = $discounted_price * $values['quantity']; @@ -1286,8 +1291,8 @@ class WC_Cart { // Total up/round taxes and shipping taxes if ( $this->round_at_subtotal ) { - $this->tax_total = $this->tax->get_tax_total( $this->taxes ); - $this->shipping_tax_total = $this->tax->get_tax_total( $this->shipping_taxes ); + $this->tax_total = WC_Tax::get_tax_total( $this->taxes ); + $this->shipping_tax_total = WC_Tax::get_tax_total( $this->shipping_taxes ); $this->taxes = array_map( array( $this->tax, 'round' ), $this->taxes ); $this->shipping_taxes = array_map( array( $this->tax, 'round' ), $this->shipping_taxes ); } else { @@ -1304,12 +1309,12 @@ class WC_Cart { do_action( 'woocommerce_calculate_totals', $this ); // Grand Total - Discounted product prices, discounted tax, shipping cost + tax, and any discounts to be added after tax (e.g. store credit) - $this->total = max( 0, apply_filters( 'woocommerce_calculated_total', round( $this->cart_contents_total + $this->tax_total + $this->shipping_tax_total + $this->shipping_total - $this->discount_total + $this->fee_total, $this->dp ), $this ) ); + $this->total = max( 0, apply_filters( 'woocommerce_calculated_total', round( $this->cart_contents_total + $this->tax_total + $this->shipping_tax_total + $this->shipping_total + $this->fee_total, $this->dp ), $this ) ); } else { // Set tax total to sum of all tax rows - $this->tax_total = $this->tax->get_tax_total( $this->taxes ); + $this->tax_total = WC_Tax::get_tax_total( $this->taxes ); // VAT exemption done at this point - so all totals are correct before exemption if ( WC()->customer->is_vat_exempt() ) { @@ -1699,6 +1704,10 @@ class WC_Cart { public function get_coupons( $deprecated = null ) { $coupons = array(); + if ( 'order' === $deprecated ) { + return $coupons; + } + foreach ( $this->get_applied_coupons() as $code ) { $coupon = new WC_Coupon( $code ); $coupons[ $code ] = $coupon; @@ -1719,19 +1728,35 @@ class WC_Cart { /** * Get the discount amount for a used coupon * @param string $code coupon code + * @param bool inc or ex tax * @return float discount amount */ - public function get_coupon_discount_amount( $code ) { - return isset( $this->coupon_discount_amounts[ $code ] ) ? $this->coupon_discount_amounts[ $code ] : 0; + public function get_coupon_discount_amount( $code, $ex_tax = true ) { + if ( $ex_tax ) { + return isset( $this->coupon_discount_amounts[ $code ] ) ? $this->coupon_discount_amounts[ $code ] - $this->get_coupon_discount_tax_amount( $code ) : 0; + } else { + return isset( $this->coupon_discount_amounts[ $code ] ) ? $this->coupon_discount_amounts[ $code ] : 0; + } + } + + /** + * Get the discount tax amount for a used coupon (for tax inclusive prices) + * @param string $code coupon code + * @param bool inc or ex tax + * @return float discount amount + */ + public function get_coupon_discount_tax_amount( $code ) { + return isset( $this->coupon_discount_tax_amounts[ $code ] ) ? $this->coupon_discount_tax_amounts[ $code ] : 0; } /** * Remove coupons from the cart of a defined type. Type 1 is before tax, type 2 is after tax. */ public function remove_coupons( $deprecated = null ) { - $this->applied_coupons = $this->coupon_discount_amounts = $this->coupon_applied_count = array(); + $this->applied_coupons = $this->coupon_discount_amounts = $this->coupon_discount_tax_amounts = $this->coupon_applied_count = array(); WC()->session->set( 'applied_coupons', array() ); WC()->session->set( 'coupon_discount_amounts', array() ); + WC()->session->set( 'coupon_discount_tax_amounts', array() ); } /** @@ -1770,23 +1795,29 @@ class WC_Cart { } if ( ! empty( $this->coupons ) ) { + + $product = $values['data']; + foreach ( $this->coupons as $code => $coupon ) { - if ( $coupon->is_valid() ) { - if ( $coupon->is_valid_for_product( $values['data'], $values ) || $coupon->is_valid_for_cart() ) { + if ( $coupon->is_valid() && ( $coupon->is_valid_for_product( $product, $values ) || $coupon->is_valid_for_cart() ) ) { + $discount_amount = $coupon->get_discount_amount( $price, $values, $single = true ); + $price = max( $price - $discount_amount, 0 ); - $discount_amount = $coupon->get_discount_amount( $price, $values, $single = true ); - $price = max( $price - $discount_amount, 0 ); + // Store the totals for DISPLAY in the cart + if ( $add_totals ) { + $total_discount = $discount_amount * $values['quantity']; + $total_discount_tax = 0; - if ( $add_totals ) { - $this->discount_cart += $discount_amount * $values['quantity']; - - - $this->increase_coupon_discount_amount( $code, $discount_amount * $values['quantity'] ); - - - - $this->increase_coupon_applied_count( $code, $values['quantity'] ); + if ( $this->prices_include_tax ) { + $tax_rates = WC_Tax::get_rates( $product->get_tax_class() ); + $taxes = WC_Tax::calc_tax( $discount_amount, $tax_rates, true ); + $total_discount_tax = WC_Tax::get_tax_total( $taxes ) * $values['quantity']; } + + $this->discount_cart += $total_discount; + $this->discount_cart_tax += $total_discount_tax; + $this->increase_coupon_discount_amount( $code, $total_discount, $total_discount_tax ); + $this->increase_coupon_applied_count( $code, $values['quantity'] ); } } } @@ -1799,29 +1830,26 @@ class WC_Cart { * Store how much discount each coupon grants. * * @access private - * @param mixed $code + * @param string $code * @param double $amount + * @param double $tax */ - private function increase_coupon_discount_amount( $code, $amount ) { - if ( empty( $this->coupon_discount_amounts[ $code ] ) ) { - $this->coupon_discount_amounts[ $code ] = 0; - } - - $this->coupon_discount_amounts[ $code ] += $amount; + private function increase_coupon_discount_amount( $code, $amount, $tax ) { + $this->coupon_discount_amounts[ $code ] = isset( $this->coupon_discount_amounts[ $code ] ) ? $this->coupon_discount_amounts[ $code ] + $amount : $amount; + $this->coupon_discount_tax_amounts[ $code ] = isset( $this->coupon_discount_tax_amounts[ $code ] ) ? $this->coupon_discount_tax_amounts[ $code ] + $tax : $tax; } /** * Store how many times each coupon is applied to cart/items * * @access private - * @param mixed $code + * @param string $code * @param integer $count */ private function increase_coupon_applied_count( $code, $count = 1 ) { if ( empty( $this->coupon_applied_count[ $code ] ) ) { $this->coupon_applied_count[ $code ] = 0; } - $this->coupon_applied_count[ $code ] += $count; } @@ -1887,8 +1915,8 @@ class WC_Cart { if ( $fee->taxable ) { // Get tax rates - $tax_rates = $this->tax->get_rates( $fee->tax_class ); - $fee_taxes = $this->tax->calc_tax( $fee->amount, $tax_rates, false ); + $tax_rates = WC_Tax::get_rates( $fee->tax_class ); + $fee_taxes = WC_Tax::calc_tax( $fee->amount, $tax_rates, false ); if ( ! empty( $fee_taxes ) ) { // Set the tax total for this fee @@ -1911,24 +1939,6 @@ class WC_Cart { /* Get Formatted Totals */ /*-----------------------------------------------------------------------------------*/ - /** - * Get the total of all order discounts (after tax discounts). - * - * @return float - */ - public function get_order_discount_total() { - return $this->discount_total; - } - - /** - * Get the total of all cart discounts (before tax discounts). - * - * @return float - */ - public function get_cart_discount_total() { - return $this->discount_cart; - } - /** * Gets the order total (after calculation). * @@ -2109,11 +2119,11 @@ class WC_Cart { public function get_taxes_total( $compound = true, $display = true ) { $total = 0; foreach ( $this->taxes as $key => $tax ) { - if ( ! $compound && $this->tax->is_compound( $key ) ) continue; + if ( ! $compound && WC_Tax::is_compound( $key ) ) continue; $total += $tax; } foreach ( $this->shipping_taxes as $key => $tax ) { - if ( ! $compound && $this->tax->is_compound( $key ) ) continue; + if ( ! $compound && WC_Tax::is_compound( $key ) ) continue; $total += $tax; } if ( $display ) { @@ -2123,11 +2133,46 @@ class WC_Cart { } /** - * Gets the total (product) discount amount - these are applied before tax. + * Get the total of all cart discounts + * + * @return float + */ + public function get_cart_discount_total() { + return $this->discount_cart; + } + + /** + * Get the total of all cart tax discounts (used for discounts on tax inclusive prices) + * + * @return float + */ + public function get_cart_discount_tax_total() { + return $this->discount_cart_tax; + } + + /** + * Gets the total discount amount - both kinds. * * @return mixed formatted price or false if there are none */ + public function get_total_discount() { + if ( $this->discount_cart ) { + $total_discount = wc_price( $this->discount_cart ); + } else { + $total_discount = false; + } + return apply_filters( 'woocommerce_cart_total_discount', $total_discount, $this ); + } + + + /** + * Gets the total (product) discount amount - these are applied before tax. + * + * @deprecated Order discounts (after tax) removed in 2.3 so multiple methods for discounts are no longer required. + * @return mixed formatted price or false if there are none + */ public function get_discounts_before_tax() { + _deprecated_function( 'get_discounts_before_tax', '2.3', 'get_total_discount' ); if ( $this->discount_cart ) { $discounts_before_tax = wc_price( $this->discount_cart ); } else { @@ -2137,20 +2182,16 @@ class WC_Cart { } /** - * Gets the total discount amount - both kinds. + * Get the total of all order discounts (after tax discounts). * - * @return mixed formatted price or false if there are none + * @deprecated Order discounts (after tax) removed in 2.3 + * @return float */ - public function get_total_discount() { - if ( $this->discount_total || $this->discount_cart ) { - $total_discount = wc_price( $this->discount_total + $this->discount_cart ); - } else { - $total_discount = false; - } - return apply_filters( 'woocommerce_cart_total_discount', $total_discount, $this ); + public function get_order_discount_total() { + _deprecated_function( 'get_order_discount_total', '2.3' ); + return 0; } - /** * Function to apply cart discounts after tax. * @deprecated Coupons can not be applied after tax diff --git a/includes/class-wc-checkout.php b/includes/class-wc-checkout.php index 6b10d676337..36d3b3250e8 100644 --- a/includes/class-wc-checkout.php +++ b/includes/class-wc-checkout.php @@ -262,7 +262,7 @@ class WC_Checkout { // Store coupons foreach ( WC()->cart->get_coupons() as $code => $coupon ) { - if ( ! $order->add_coupon( $code, WC()->cart->get_coupon_discount_amount( $code ) ) ) { + if ( ! $order->add_coupon( $code, WC()->cart->get_coupon_discount_amount( $code ), WC()->cart->get_coupon_discount_tax_amount( $code ) ) ) { throw new Exception( __( 'Error: Unable to create order. Please try again.', 'woocommerce' ) ); } } @@ -290,6 +290,7 @@ class WC_Checkout { $order->set_payment_method( $this->payment_method ); $order->set_total( WC()->cart->shipping_total, 'shipping' ); $order->set_total( WC()->cart->get_cart_discount_total(), 'cart_discount' ); + $order->set_total( WC()->cart->get_cart_discount_tax_total(), 'cart_discount_tax' ); $order->set_total( WC()->cart->tax_total, 'tax' ); $order->set_total( WC()->cart->shipping_tax_total, 'shipping_tax' ); $order->set_total( WC()->cart->total ); diff --git a/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php b/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php index d8617ff8163..513cf928182 100644 --- a/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php +++ b/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php @@ -162,8 +162,8 @@ class WC_Gateway_Paypal_Request { $line_item_args = $this->get_line_items(); $line_item_args['tax_cart'] = $order->get_total_tax(); - if ( $order->get_cart_discount() > 0 ) { - $line_item_args['discount_amount_cart'] = round( $order->get_cart_discount(), 2 ); + if ( $order->get_total_discount() > 0 ) { + $line_item_args['discount_amount_cart'] = round( $order->get_total_discount(), 2 ); } /** @@ -262,7 +262,7 @@ class WC_Gateway_Paypal_Request { } // Check for mismatched totals - if ( ( $calculated_total + $order->get_total_tax() + round( $order->get_total_shipping(), 2 ) - round( $order->get_cart_discount(), 2 ) ) != $order->get_total() ) { + if ( ( $calculated_total + $order->get_total_tax() + round( $order->get_total_shipping(), 2 ) - round( $order->get_total_discount(), 2 ) ) != $order->get_total() ) { return false; } diff --git a/includes/wc-cart-functions.php b/includes/wc-cart-functions.php index 308ca8ee987..bdf3a055dfb 100644 --- a/includes/wc-cart-functions.php +++ b/includes/wc-cart-functions.php @@ -204,8 +204,8 @@ function wc_cart_totals_coupon_html( $coupon ) { $value = array(); - if ( ! empty( WC()->cart->coupon_discount_amounts[ $coupon->code ] ) ) { - $discount_html = '-' . wc_price( WC()->cart->coupon_discount_amounts[ $coupon->code ] ); + if ( $amount = WC()->cart->get_coupon_discount_amount( $coupon->code, WC()->cart->display_cart_ex_tax ) ) { + $discount_html = '-' . wc_price( $amount ); } else { $discount_html = ''; } From c73bcb614e924233e3bb26f189bf545a6d876d4e Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Tue, 25 Nov 2014 12:10:12 -0200 Subject: [PATCH 268/743] API - deletes the product when fails to create, closes #6801 --- includes/api/class-wc-api-products.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/api/class-wc-api-products.php b/includes/api/class-wc-api-products.php index 3bdda2d85f3..4a1472ab010 100644 --- a/includes/api/class-wc-api-products.php +++ b/includes/api/class-wc-api-products.php @@ -219,6 +219,8 @@ class WC_API_Products extends WC_API_Resource { $images = $this->save_product_images( $id, $data['images'] ); if ( is_wp_error( $images ) ) { + wp_delete_post( $id, true ); + return $images; } } @@ -226,6 +228,9 @@ class WC_API_Products extends WC_API_Resource { // Save product meta fields $meta = $this->save_product_meta( $id, $data ); if ( is_wp_error( $meta ) ) { + // Remove the product + wp_delete_post( $id, true ); + return $meta; } From ce721fc86f96952193124c0e91ed4979280fef92 Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Tue, 25 Nov 2014 12:44:33 -0200 Subject: [PATCH 269/743] [API] Fixed the coupons expiry_date format with POST and PUT, closes #6829 --- includes/api/class-wc-api-coupons.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/includes/api/class-wc-api-coupons.php b/includes/api/class-wc-api-coupons.php index 4b5a3336e01..04c1fe385a4 100644 --- a/includes/api/class-wc-api-coupons.php +++ b/includes/api/class-wc-api-coupons.php @@ -276,7 +276,7 @@ class WC_API_Coupons extends WC_API_Resource { update_post_meta( $id, 'usage_limit_per_user', absint( $coupon_data['usage_limit_per_user'] ) ); update_post_meta( $id, 'limit_usage_to_x_items', absint( $coupon_data['limit_usage_to_x_items'] ) ); update_post_meta( $id, 'usage_count', absint( $coupon_data['usage_count'] ) ); - update_post_meta( $id, 'expiry_date', wc_clean( $coupon_data['expiry_date'] ) ); + update_post_meta( $id, 'expiry_date', $this->get_coupon_expiry_date( wc_clean( $coupon_data['expiry_date'] ) ) ); update_post_meta( $id, 'apply_before_tax', wc_clean( $coupon_data['apply_before_tax'] ) ); update_post_meta( $id, 'free_shipping', wc_clean( $coupon_data['enable_free_shipping'] ) ); update_post_meta( $id, 'product_categories', array_filter( array_map( 'intval', $coupon_data['product_category_ids'] ) ) ); @@ -379,7 +379,7 @@ class WC_API_Coupons extends WC_API_Resource { } if ( isset( $data['expiry_date'] ) ) { - update_post_meta( $id, 'expiry_date', wc_clean( $data['expiry_date'] ) ); + update_post_meta( $id, 'expiry_date', $this->get_coupon_expiry_date( wc_clean( $data['expiry_date'] ) ) ); } if ( isset( $data['apply_before_tax'] ) ) { @@ -440,6 +440,21 @@ class WC_API_Coupons extends WC_API_Resource { return $this->delete( $id, 'shop_coupon', ( 'true' === $force ) ); } + /** + * expiry_date format + * + * @since 2.3.0 + * @param string expiry_date + * @return string + */ + protected function get_coupon_expiry_date( $expiry_date ) { + if ( '' != $expiry_date ) { + return date( 'Y-m-d', strtotime( $expiry_date ) ); + } + + return ''; + } + /** * Helper method to get coupon post objects * From 88c4c2394f966145aeaec539624f136f57cb2ea2 Mon Sep 17 00:00:00 2001 From: Illimar Tambek Date: Tue, 25 Nov 2014 16:59:29 +0200 Subject: [PATCH 270/743] Introduce email settings action hooks --- includes/emails/class-wc-email.php | 40 ++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/includes/emails/class-wc-email.php b/includes/emails/class-wc-email.php index 8d3efa83358..b7f51170c6e 100644 --- a/includes/emails/class-wc-email.php +++ b/includes/emails/class-wc-email.php @@ -511,11 +511,20 @@ class WC_Email extends WC_Settings_API { if ( wp_mkdir_p( dirname( get_stylesheet_directory() . '/woocommerce/' . $this->$template ) ) && ! file_exists( get_stylesheet_directory() . '/woocommerce/' . $this->$template ) ) { // Locate template file - $core_file = $this->template_base . $this->$template; - $template_file = apply_filters( 'woocommerce_locate_core_template', $core_file, $this->$template, $this->template_base ); + $core_file = $this->template_base . $this->$template; + $template_file = apply_filters( 'woocommerce_locate_core_template', $core_file, $this->$template, $this->template_base ); // Copy template file copy( $template_file, get_stylesheet_directory() . '/woocommerce/' . $this->$template ); + + /** + * woocommerce_copy_email_template action hook + * + * @param string $template The copied template type + * @param string $email The email object + */ + do_action( 'woocommerce_copy_email_template', $template, $this ); + echo '

    ' . __( 'Template file copied to theme.', 'woocommerce' ) . '

    '; } } @@ -527,6 +536,15 @@ class WC_Email extends WC_Settings_API { if ( file_exists( get_stylesheet_directory() . '/woocommerce/' . $this->$template ) ) { unlink( get_stylesheet_directory() . '/woocommerce/' . $this->$template ); + + /** + * woocommerce_delete_email_template action hook + * + * @param string $template The deleted template type + * @param string $email The email object + */ + do_action( 'woocommerce_delete_email_template', $template, $this->$template ); + echo '

    ' . __( 'Template file deleted from theme.', 'woocommerce' ) . '

    '; } } @@ -539,10 +557,28 @@ class WC_Email extends WC_Settings_API { description ) ) ? wpautop( $this->description ) : ''; ?> + + generate_settings_html(); ?>
    + + template_html ) || ! empty( $this->template_plain ) ) { ?>
    Date: Tue, 25 Nov 2014 11:15:53 -0500 Subject: [PATCH 271/743] Corrected the docblock description This is an email sent to the customer, not the admin. --- includes/emails/class-wc-email-customer-processing-order.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/emails/class-wc-email-customer-processing-order.php b/includes/emails/class-wc-email-customer-processing-order.php index 91aa83a203f..b8f3eb4e124 100644 --- a/includes/emails/class-wc-email-customer-processing-order.php +++ b/includes/emails/class-wc-email-customer-processing-order.php @@ -9,7 +9,7 @@ if ( ! class_exists( 'WC_Email_Customer_Processing_Order' ) ) : /** * Customer Processing Order Email * - * An email sent to the admin when a new order is received/paid for. + * An email sent to the customer when a new order is received/paid for. * * @class WC_Email_Customer_Processing_Order * @version 2.0.0 From bf15b5e3511aa7b7c8f1a8e57b4c7a508e5c9fdc Mon Sep 17 00:00:00 2001 From: khag7 Date: Tue, 25 Nov 2014 11:23:00 -0500 Subject: [PATCH 272/743] Corrected the docblock description for the order cancellation email class This email is sent when an order is cancelled, not when a new order is paid for. --- includes/emails/class-wc-email-cancelled-order.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/emails/class-wc-email-cancelled-order.php b/includes/emails/class-wc-email-cancelled-order.php index fadc20caedc..de07c5b3b25 100644 --- a/includes/emails/class-wc-email-cancelled-order.php +++ b/includes/emails/class-wc-email-cancelled-order.php @@ -9,7 +9,7 @@ if ( ! class_exists( 'WC_Email_Cancelled_Order' ) ) : /** * Cancelled Order Email * - * An email sent to the admin when a new order is received/paid for. + * An email sent to the admin when an order is cancelled. * * @class WC_Email_Cancelled_Order * @version 2.2.7 From dbcc8430e9e857ec6c73940fd204ac54cfbc9341 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 25 Nov 2014 17:09:19 +0000 Subject: [PATCH 273/743] Installer tweaks + unit tests closes #6356 --- includes/admin/class-wc-admin-status.php | 5 +- includes/class-wc-install.php | 602 +++++++++++------------ tests/bootstrap.php | 3 +- tests/unit-tests/install.php | 110 +++++ tests/unit-tests/tax.php | 28 +- uninstall.php | 7 +- 6 files changed, 412 insertions(+), 343 deletions(-) create mode 100644 tests/unit-tests/install.php diff --git a/includes/admin/class-wc-admin-status.php b/includes/admin/class-wc-admin-status.php index f29a85bd856..13429548423 100644 --- a/includes/admin/class-wc-admin-status.php +++ b/includes/admin/class-wc-admin-status.php @@ -93,9 +93,8 @@ class WC_Admin_Status { break; case 'reset_roles' : // Remove then re-add caps and roles - $installer = include( WC()->plugin_path() . '/includes/class-wc-install.php' ); - $installer->remove_roles(); - $installer->create_roles(); + WC_Install::remove_roles(); + WC_Install::create_roles(); echo '

    ' . __( 'Roles successfully reset', 'woocommerce' ) . '

    '; break; diff --git a/includes/class-wc-install.php b/includes/class-wc-install.php index 44121b37eeb..8034217da2e 100644 --- a/includes/class-wc-install.php +++ b/includes/class-wc-install.php @@ -5,15 +5,13 @@ * @author WooThemes * @category Admin * @package WooCommerce/Classes - * @version 2.1.0 + * @version 2.3.0 */ if ( ! defined( 'ABSPATH' ) ) { - exit; // Exit if accessed directly + exit; } -if ( ! class_exists( 'WC_Install' ) ) : - /** * WC_Install Class */ @@ -22,31 +20,23 @@ class WC_Install { /** * Hook in tabs. */ - public function __construct() { - // Run this on activation. - register_activation_hook( WC_PLUGIN_FILE, array( $this, 'install' ) ); + public static function init() { + register_activation_hook( WC_PLUGIN_FILE, array( __CLASS__, 'install' ) ); - // Hooks - add_action( 'admin_init', array( $this, 'install_actions' ) ); - add_action( 'admin_init', array( $this, 'check_version' ), 5 ); - add_action( 'in_plugin_update_message-woocommerce/woocommerce.php', array( $this, 'in_plugin_update_message' ) ); - add_filter( 'plugin_action_links_' . WC_PLUGIN_BASENAME, array( $this, 'plugin_action_links' ) ); - add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 ); - - if ( is_multisite() ) { - add_filter( 'wpmu_drop_tables', array( $this, 'wpmu_drop_tables' ) ); - } + add_action( 'admin_init', array( __CLASS__, 'check_version' ), 5 ); + add_action( 'admin_init', array( __CLASS__, 'install_actions' ) ); + add_action( 'in_plugin_update_message-woocommerce/woocommerce.php', array( __CLASS__, 'in_plugin_update_message' ) ); + add_filter( 'plugin_action_links_' . WC_PLUGIN_BASENAME, array( __CLASS__, 'plugin_action_links' ) ); + add_filter( 'plugin_row_meta', array( __CLASS__, 'plugin_row_meta' ), 10, 2 ); + add_filter( 'wpmu_drop_tables', array( __CLASS__, 'wpmu_drop_tables' ) ); } /** * check_version function. - * - * @return void */ - public function check_version() { + public static function check_version() { if ( ! defined( 'IFRAME_REQUEST' ) && ( get_option( 'woocommerce_version' ) != WC()->version || get_option( 'woocommerce_db_version' ) != WC()->version ) ) { - $this->install(); - + self::install(); do_action( 'woocommerce_updated' ); } } @@ -54,7 +44,7 @@ class WC_Install { /** * Install actions such as installing pages when a button is clicked. */ - public function install_actions() { + public static function install_actions() { // Install - Add pages button if ( ! empty( $_GET['install_woocommerce_pages'] ) ) { @@ -82,7 +72,7 @@ class WC_Install { // Update button } elseif ( ! empty( $_GET['do_update_woocommerce'] ) ) { - $this->update(); + self::update(); // Update complete delete_option( '_wc_needs_pages' ); @@ -98,10 +88,10 @@ class WC_Install { /** * Install WC */ - public function install() { - $this->create_options(); - $this->create_tables(); - $this->create_roles(); + public static function install() { + self::create_options(); + self::create_tables(); + self::create_roles(); // Register post types include_once( 'class-wc-post-types.php' ); @@ -112,9 +102,9 @@ class WC_Install { WC()->query->init_query_vars(); WC()->query->add_endpoints(); - $this->create_terms(); - $this->create_cron_jobs(); - $this->create_files(); + self::create_terms(); + self::create_cron_jobs(); + self::create_files(); // Queue upgrades $current_db_version = get_option( 'woocommerce_db_version', null ); @@ -143,46 +133,20 @@ class WC_Install { /** * Handle updates */ - public function update() { - // Do updates + private static function update() { $current_db_version = get_option( 'woocommerce_db_version' ); + $db_updates = array( + '2.0.0' => 'updates/woocommerce-update-2.0.php', + '2.0.9' => 'updates/woocommerce-update-2.0.9.php', + '2.1.0' => 'updates/woocommerce-update-2.1.php', + '2.2.0' => 'updates/woocommerce-update-2.2.php' + ); - if ( version_compare( $current_db_version, '1.4', '<' ) ) { - include( 'updates/woocommerce-update-1.4.php' ); - update_option( 'woocommerce_db_version', '1.4' ); - } - - if ( version_compare( $current_db_version, '1.5', '<' ) ) { - include( 'updates/woocommerce-update-1.5.php' ); - update_option( 'woocommerce_db_version', '1.5' ); - } - - if ( version_compare( $current_db_version, '2.0', '<' ) ) { - include( 'updates/woocommerce-update-2.0.php' ); - update_option( 'woocommerce_db_version', '2.0' ); - } - - if ( version_compare( $current_db_version, '2.0.9', '<' ) ) { - include( 'updates/woocommerce-update-2.0.9.php' ); - update_option( 'woocommerce_db_version', '2.0.9' ); - } - - if ( version_compare( $current_db_version, '2.0.14', '<' ) ) { - if ( 'HU' == get_option( 'woocommerce_default_country' ) ) { - update_option( 'woocommerce_default_country', 'HU:BU' ); + foreach ( $db_updates as $version => $updater ) { + if ( version_compare( $current_db_version, $version, '<' ) ) { + include( $updater ); + update_option( 'woocommerce_db_version', $version ); } - - update_option( 'woocommerce_db_version', '2.0.14' ); - } - - if ( version_compare( $current_db_version, '2.1.0', '<' ) || WC_VERSION == '2.1-bleeding' ) { - include( 'updates/woocommerce-update-2.1.php' ); - update_option( 'woocommerce_db_version', '2.1.0' ); - } - - if ( version_compare( $current_db_version, '2.2.0', '<' ) || WC_VERSION == '2.2-bleeding' ) { - include( 'updates/woocommerce-update-2.2.php' ); - update_option( 'woocommerce_db_version', '2.2.0' ); } update_option( 'woocommerce_db_version', WC()->version ); @@ -191,8 +155,7 @@ class WC_Install { /** * Create cron jobs (clear them first) */ - private function create_cron_jobs() { - // Cron jobs + private static function create_cron_jobs() { wp_clear_scheduled_hook( 'woocommerce_scheduled_sales' ); wp_clear_scheduled_hook( 'woocommerce_cancel_unpaid_orders' ); wp_clear_scheduled_hook( 'woocommerce_cleanup_sessions' ); @@ -202,11 +165,7 @@ class WC_Install { wp_schedule_event( strtotime( '00:00 tomorrow ' . $ve . get_option( 'gmt_offset' ) . ' HOURS' ), 'daily', 'woocommerce_scheduled_sales' ); - $held_duration = get_option( 'woocommerce_hold_stock_minutes', null ); - - if ( is_null( $held_duration ) ) { - $held_duration = '60'; - } + $held_duration = get_option( 'woocommerce_hold_stock_minutes', '60' ); if ( $held_duration != '' ) { wp_schedule_single_event( time() + ( absint( $held_duration ) * 60 ), 'woocommerce_cancel_unpaid_orders' ); @@ -218,10 +177,10 @@ class WC_Install { /** * Create pages that the plugin relies on, storing page id's in variables. - * - * @return void */ public static function create_pages() { + include_once( 'admin/wc-admin-functions.php' ); + $pages = apply_filters( 'woocommerce_create_pages', array( 'shop' => array( 'name' => _x( 'shop', 'Page slug', 'woocommerce' ), @@ -250,39 +209,12 @@ class WC_Install { } } - /** - * Add the default terms for WC taxonomies - product types and order statuses. Modify this at your own risk. - * - * @return void - */ - private function create_terms() { - - $taxonomies = array( - 'product_type' => array( - 'simple', - 'grouped', - 'variable', - 'external' - ) - ); - - foreach ( $taxonomies as $taxonomy => $terms ) { - foreach ( $terms as $term ) { - if ( ! get_term_by( 'slug', sanitize_title( $term ), $taxonomy ) ) { - wp_insert_term( $term, $taxonomy ); - } - } - } - } - /** * Default options * * Sets up the default options used on the settings page - * - * @return void */ - public function create_options() { + private static function create_options() { // Include settings so that we can run through defaults include_once( 'admin/class-wc-admin-settings.php' ); @@ -312,6 +244,28 @@ class WC_Install { } } + /** + * Add the default terms for WC taxonomies - product types and order statuses. Modify this at your own risk. + */ + private static function create_terms() { + $taxonomies = array( + 'product_type' => array( + 'simple', + 'grouped', + 'variable', + 'external' + ) + ); + + foreach ( $taxonomies as $taxonomy => $terms ) { + foreach ( $terms as $term ) { + if ( ! get_term_by( 'slug', sanitize_title( $term ), $taxonomy ) ) { + wp_insert_term( $term, $taxonomy ); + } + } + } + } + /** * Set up the database tables which the plugin needs to function. * @@ -327,28 +281,15 @@ class WC_Install { * * @return void */ - private function create_tables() { + private static function create_tables() { global $wpdb; $wpdb->hide_errors(); - $collate = ''; - - if ( $wpdb->has_cap( 'collation' ) ) { - if ( ! empty($wpdb->charset ) ) { - $collate .= "DEFAULT CHARACTER SET $wpdb->charset"; - } - if ( ! empty($wpdb->collate ) ) { - $collate .= " COLLATE $wpdb->collate"; - } - } - require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); /** - * Update schemas before DBDELTA - * - * Before updating, remove any primary keys which could be modified due to schema updates + * Before updating with DBDELTA, remove any primary keys which could be modified due to schema updates */ if ( $wpdb->get_var( "SHOW TABLES LIKE '{$wpdb->prefix}woocommerce_downloadable_product_permissions';" ) ) { if ( ! $wpdb->get_var( "SHOW COLUMNS FROM `{$wpdb->prefix}woocommerce_downloadable_product_permissions` LIKE 'permission_id';" ) ) { @@ -356,162 +297,180 @@ class WC_Install { } } - // WooCommerce Tables - $woocommerce_tables = " - CREATE TABLE {$wpdb->prefix}woocommerce_attribute_taxonomies ( - attribute_id bigint(20) NOT NULL auto_increment, - attribute_name varchar(200) NOT NULL, - attribute_label longtext NULL, - attribute_type varchar(200) NOT NULL, - attribute_orderby varchar(200) NOT NULL, - PRIMARY KEY (attribute_id), - KEY attribute_name (attribute_name) - ) $collate; - CREATE TABLE {$wpdb->prefix}woocommerce_termmeta ( - meta_id bigint(20) NOT NULL auto_increment, - woocommerce_term_id bigint(20) NOT NULL, - meta_key varchar(255) NULL, - meta_value longtext NULL, - PRIMARY KEY (meta_id), - KEY woocommerce_term_id (woocommerce_term_id), - KEY meta_key (meta_key) - ) $collate; - CREATE TABLE {$wpdb->prefix}woocommerce_downloadable_product_permissions ( - permission_id bigint(20) NOT NULL auto_increment, - download_id varchar(32) NOT NULL, - product_id bigint(20) NOT NULL, - order_id bigint(20) NOT NULL DEFAULT 0, - order_key varchar(200) NOT NULL, - user_email varchar(200) NOT NULL, - user_id bigint(20) NULL, - downloads_remaining varchar(9) NULL, - access_granted datetime NOT NULL default '0000-00-00 00:00:00', - access_expires datetime NULL default null, - download_count bigint(20) NOT NULL DEFAULT 0, - PRIMARY KEY (permission_id), - KEY download_order_key_product (product_id,order_id,order_key,download_id), - KEY download_order_product (download_id,order_id,product_id) - ) $collate; - CREATE TABLE {$wpdb->prefix}woocommerce_order_items ( - order_item_id bigint(20) NOT NULL auto_increment, - order_item_name longtext NOT NULL, - order_item_type varchar(200) NOT NULL DEFAULT '', - order_id bigint(20) NOT NULL, - PRIMARY KEY (order_item_id), - KEY order_id (order_id) - ) $collate; - CREATE TABLE {$wpdb->prefix}woocommerce_order_itemmeta ( - meta_id bigint(20) NOT NULL auto_increment, - order_item_id bigint(20) NOT NULL, - meta_key varchar(255) NULL, - meta_value longtext NULL, - PRIMARY KEY (meta_id), - KEY order_item_id (order_item_id), - KEY meta_key (meta_key) - ) $collate; - CREATE TABLE {$wpdb->prefix}woocommerce_tax_rates ( - tax_rate_id bigint(20) NOT NULL auto_increment, - tax_rate_country varchar(200) NOT NULL DEFAULT '', - tax_rate_state varchar(200) NOT NULL DEFAULT '', - tax_rate varchar(200) NOT NULL DEFAULT '', - tax_rate_name varchar(200) NOT NULL DEFAULT '', - tax_rate_priority bigint(20) NOT NULL, - tax_rate_compound int(1) NOT NULL DEFAULT 0, - tax_rate_shipping int(1) NOT NULL DEFAULT 1, - tax_rate_order bigint(20) NOT NULL, - tax_rate_class varchar(200) NOT NULL DEFAULT '', - PRIMARY KEY (tax_rate_id), - KEY tax_rate_country (tax_rate_country), - KEY tax_rate_state (tax_rate_state), - KEY tax_rate_class (tax_rate_class), - KEY tax_rate_priority (tax_rate_priority) - ) $collate; - CREATE TABLE {$wpdb->prefix}woocommerce_tax_rate_locations ( - location_id bigint(20) NOT NULL auto_increment, - location_code varchar(255) NOT NULL, - tax_rate_id bigint(20) NOT NULL, - location_type varchar(40) NOT NULL, - PRIMARY KEY (location_id), - KEY tax_rate_id (tax_rate_id), - KEY location_type (location_type), - KEY location_type_code (location_type,location_code) - ) $collate; - "; - dbDelta( $woocommerce_tables ); + dbDelta( self::get_schema() ); + } + + /** + * Get Table schema + * @return string + */ + private static function get_schema() { + global $wpdb; + + $collate = ''; + + if ( $wpdb->has_cap( 'collation' ) ) { + if ( ! empty( $wpdb->charset ) ) { + $collate .= "DEFAULT CHARACTER SET $wpdb->charset"; + } + if ( ! empty( $wpdb->collate ) ) { + $collate .= " COLLATE $wpdb->collate"; + } + } + + return " +CREATE TABLE {$wpdb->prefix}woocommerce_attribute_taxonomies ( + attribute_id bigint(20) NOT NULL auto_increment, + attribute_name varchar(200) NOT NULL, + attribute_label longtext NULL, + attribute_type varchar(200) NOT NULL, + attribute_orderby varchar(200) NOT NULL, + PRIMARY KEY (attribute_id), + KEY attribute_name (attribute_name) +) $collate; +CREATE TABLE {$wpdb->prefix}woocommerce_termmeta ( + meta_id bigint(20) NOT NULL auto_increment, + woocommerce_term_id bigint(20) NOT NULL, + meta_key varchar(255) NULL, + meta_value longtext NULL, + PRIMARY KEY (meta_id), + KEY woocommerce_term_id (woocommerce_term_id), + KEY meta_key (meta_key) +) $collate; +CREATE TABLE {$wpdb->prefix}woocommerce_downloadable_product_permissions ( + permission_id bigint(20) NOT NULL auto_increment, + download_id varchar(32) NOT NULL, + product_id bigint(20) NOT NULL, + order_id bigint(20) NOT NULL DEFAULT 0, + order_key varchar(200) NOT NULL, + user_email varchar(200) NOT NULL, + user_id bigint(20) NULL, + downloads_remaining varchar(9) NULL, + access_granted datetime NOT NULL default '0000-00-00 00:00:00', + access_expires datetime NULL default null, + download_count bigint(20) NOT NULL DEFAULT 0, + PRIMARY KEY (permission_id), + KEY download_order_key_product (product_id,order_id,order_key,download_id), + KEY download_order_product (download_id,order_id,product_id) +) $collate; +CREATE TABLE {$wpdb->prefix}woocommerce_order_items ( + order_item_id bigint(20) NOT NULL auto_increment, + order_item_name longtext NOT NULL, + order_item_type varchar(200) NOT NULL DEFAULT '', + order_id bigint(20) NOT NULL, + PRIMARY KEY (order_item_id), + KEY order_id (order_id) +) $collate; +CREATE TABLE {$wpdb->prefix}woocommerce_order_itemmeta ( + meta_id bigint(20) NOT NULL auto_increment, + order_item_id bigint(20) NOT NULL, + meta_key varchar(255) NULL, + meta_value longtext NULL, + PRIMARY KEY (meta_id), + KEY order_item_id (order_item_id), + KEY meta_key (meta_key) +) $collate; +CREATE TABLE {$wpdb->prefix}woocommerce_tax_rates ( + tax_rate_id bigint(20) NOT NULL auto_increment, + tax_rate_country varchar(200) NOT NULL DEFAULT '', + tax_rate_state varchar(200) NOT NULL DEFAULT '', + tax_rate varchar(200) NOT NULL DEFAULT '', + tax_rate_name varchar(200) NOT NULL DEFAULT '', + tax_rate_priority bigint(20) NOT NULL, + tax_rate_compound int(1) NOT NULL DEFAULT 0, + tax_rate_shipping int(1) NOT NULL DEFAULT 1, + tax_rate_order bigint(20) NOT NULL, + tax_rate_class varchar(200) NOT NULL DEFAULT '', + PRIMARY KEY (tax_rate_id), + KEY tax_rate_country (tax_rate_country), + KEY tax_rate_state (tax_rate_state), + KEY tax_rate_class (tax_rate_class), + KEY tax_rate_priority (tax_rate_priority) +) $collate; +CREATE TABLE {$wpdb->prefix}woocommerce_tax_rate_locations ( + location_id bigint(20) NOT NULL auto_increment, + location_code varchar(255) NOT NULL, + tax_rate_id bigint(20) NOT NULL, + location_type varchar(40) NOT NULL, + PRIMARY KEY (location_id), + KEY tax_rate_id (tax_rate_id), + KEY location_type (location_type), + KEY location_type_code (location_type,location_code) +) $collate; + "; } /** * Create roles and capabilities */ - public function create_roles() { + public static function create_roles() { global $wp_roles; - if ( class_exists( 'WP_Roles' ) ) { - if ( ! isset( $wp_roles ) ) { - $wp_roles = new WP_Roles(); - } + if ( ! class_exists( 'WP_Roles' ) ) { + return; } - if ( is_object( $wp_roles ) ) { + if ( ! isset( $wp_roles ) ) { + $wp_roles = new WP_Roles(); + } - // Customer role - add_role( 'customer', __( 'Customer', 'woocommerce' ), array( - 'read' => true, - 'edit_posts' => false, - 'delete_posts' => false - ) ); + // Customer role + add_role( 'customer', __( 'Customer', 'woocommerce' ), array( + 'read' => true, + 'edit_posts' => false, + 'delete_posts' => false + ) ); - // Shop manager role - add_role( 'shop_manager', __( 'Shop Manager', 'woocommerce' ), array( - 'level_9' => true, - 'level_8' => true, - 'level_7' => true, - 'level_6' => true, - 'level_5' => true, - 'level_4' => true, - 'level_3' => true, - 'level_2' => true, - 'level_1' => true, - 'level_0' => true, - 'read' => true, - 'read_private_pages' => true, - 'read_private_posts' => true, - 'edit_users' => true, - 'edit_posts' => true, - 'edit_pages' => true, - 'edit_published_posts' => true, - 'edit_published_pages' => true, - 'edit_private_pages' => true, - 'edit_private_posts' => true, - 'edit_others_posts' => true, - 'edit_others_pages' => true, - 'publish_posts' => true, - 'publish_pages' => true, - 'delete_posts' => true, - 'delete_pages' => true, - 'delete_private_pages' => true, - 'delete_private_posts' => true, - 'delete_published_pages' => true, - 'delete_published_posts' => true, - 'delete_others_posts' => true, - 'delete_others_pages' => true, - 'manage_categories' => true, - 'manage_links' => true, - 'moderate_comments' => true, - 'unfiltered_html' => true, - 'upload_files' => true, - 'export' => true, - 'import' => true, - 'list_users' => true - ) ); + // Shop manager role + add_role( 'shop_manager', __( 'Shop Manager', 'woocommerce' ), array( + 'level_9' => true, + 'level_8' => true, + 'level_7' => true, + 'level_6' => true, + 'level_5' => true, + 'level_4' => true, + 'level_3' => true, + 'level_2' => true, + 'level_1' => true, + 'level_0' => true, + 'read' => true, + 'read_private_pages' => true, + 'read_private_posts' => true, + 'edit_users' => true, + 'edit_posts' => true, + 'edit_pages' => true, + 'edit_published_posts' => true, + 'edit_published_pages' => true, + 'edit_private_pages' => true, + 'edit_private_posts' => true, + 'edit_others_posts' => true, + 'edit_others_pages' => true, + 'publish_posts' => true, + 'publish_pages' => true, + 'delete_posts' => true, + 'delete_pages' => true, + 'delete_private_pages' => true, + 'delete_private_posts' => true, + 'delete_published_pages' => true, + 'delete_published_posts' => true, + 'delete_others_posts' => true, + 'delete_others_pages' => true, + 'manage_categories' => true, + 'manage_links' => true, + 'moderate_comments' => true, + 'unfiltered_html' => true, + 'upload_files' => true, + 'export' => true, + 'import' => true, + 'list_users' => true + ) ); - $capabilities = $this->get_core_capabilities(); + $capabilities = self::get_core_capabilities(); - foreach ( $capabilities as $cap_group ) { - foreach ( $cap_group as $cap ) { - $wp_roles->add_cap( 'shop_manager', $cap ); - $wp_roles->add_cap( 'administrator', $cap ); - } + foreach ( $capabilities as $cap_group ) { + foreach ( $cap_group as $cap ) { + $wp_roles->add_cap( 'shop_manager', $cap ); + $wp_roles->add_cap( 'administrator', $cap ); } } } @@ -521,7 +480,7 @@ class WC_Install { * * @return array */ - public function get_core_capabilities() { + private static function get_core_capabilities() { $capabilities = array(); $capabilities['core'] = array( @@ -562,38 +521,35 @@ class WC_Install { /** * woocommerce_remove_roles function. - * - * @return void */ - public function remove_roles() { + public static function remove_roles() { global $wp_roles; - if ( class_exists( 'WP_Roles' ) ) { - if ( ! isset( $wp_roles ) ) { - $wp_roles = new WP_Roles(); + if ( ! class_exists( 'WP_Roles' ) ) { + return; + } + + if ( ! isset( $wp_roles ) ) { + $wp_roles = new WP_Roles(); + } + + $capabilities = self::get_core_capabilities(); + + foreach ( $capabilities as $cap_group ) { + foreach ( $cap_group as $cap ) { + $wp_roles->remove_cap( 'shop_manager', $cap ); + $wp_roles->remove_cap( 'administrator', $cap ); } } - if ( is_object( $wp_roles ) ) { - - $capabilities = $this->get_core_capabilities(); - - foreach ( $capabilities as $cap_group ) { - foreach ( $cap_group as $cap ) { - $wp_roles->remove_cap( 'shop_manager', $cap ); - $wp_roles->remove_cap( 'administrator', $cap ); - } - } - - remove_role( 'customer' ); - remove_role( 'shop_manager' ); - } + remove_role( 'customer' ); + remove_role( 'shop_manager' ); } /** * Create files/directories */ - private function create_files() { + private static function create_files() { // Install files and folders for uploading files and prevent hotlinking $upload_dir = wp_upload_dir(); @@ -632,39 +588,15 @@ class WC_Install { /** * Show plugin changes. Code adapted from W3 Total Cache. - * - * @return void */ - public function in_plugin_update_message( $args ) { + public static function in_plugin_update_message( $args ) { $transient_name = 'wc_upgrade_notice_' . $args['Version']; if ( false === ( $upgrade_notice = get_transient( $transient_name ) ) ) { - $response = wp_remote_get( 'https://plugins.svn.wordpress.org/woocommerce/trunk/readme.txt' ); if ( ! is_wp_error( $response ) && ! empty( $response['body'] ) ) { - - // Output Upgrade Notice - $matches = null; - $regexp = '~==\s*Upgrade Notice\s*==\s*=\s*(.*)\s*=(.*)(=\s*' . preg_quote( WC_VERSION ) . '\s*=|$)~Uis'; - $upgrade_notice = ''; - - if ( preg_match( $regexp, $response['body'], $matches ) ) { - $version = trim( $matches[1] ); - $notices = (array) preg_split('~[\r\n]+~', trim( $matches[2] ) ); - - if ( version_compare( WC_VERSION, $version, '<' ) ) { - - $upgrade_notice .= '
    '; - - foreach ( $notices as $index => $line ) { - $upgrade_notice .= wp_kses_post( preg_replace( '~\[([^\]]*)\]\(([^\)]*)\)~', '${1}', $line ) ); - } - - $upgrade_notice .= '
    '; - } - } - + $upgrade_notice = self::parse_update_notice( $response['body'] ); set_transient( $transient_name, $upgrade_notice, DAY_IN_SECONDS ); } } @@ -672,15 +604,45 @@ class WC_Install { echo wp_kses_post( $upgrade_notice ); } + /** + * Parse update notice from readme file + * @param string $content + * @return string + */ + private static function parse_update_notice( $content ) { + // Output Upgrade Notice + $matches = null; + $regexp = '~==\s*Upgrade Notice\s*==\s*=\s*(.*)\s*=(.*)(=\s*' . preg_quote( WC_VERSION ) . '\s*=|$)~Uis'; + $upgrade_notice = ''; + + if ( preg_match( $regexp, $content, $matches ) ) { + $version = trim( $matches[1] ); + $notices = (array) preg_split('~[\r\n]+~', trim( $matches[2] ) ); + + if ( version_compare( WC_VERSION, $version, '<' ) ) { + + $upgrade_notice .= '
    '; + + foreach ( $notices as $index => $line ) { + $upgrade_notice .= wp_kses_post( preg_replace( '~\[([^\]]*)\]\(([^\)]*)\)~', '${1}', $line ) ); + } + + $upgrade_notice .= '
    '; + } + } + + return wp_kses_post( $upgrade_notice ); + } + /** * Show action links on the plugin screen. * * @param mixed $links Plugin Action links * @return array */ - public function plugin_action_links( $links ) { + public static function plugin_action_links( $links ) { $action_links = array( - 'settings' => '' . __( 'Settings', 'woocommerce' ) . '', + 'settings' => '' . __( 'Settings', 'woocommerce' ) . '', ); return array_merge( $action_links, $links ); @@ -693,12 +655,12 @@ class WC_Install { * @param mixed $file Plugin Base file * @return array */ - public function plugin_row_meta( $links, $file ) { + public static function plugin_row_meta( $links, $file ) { if ( $file == WC_PLUGIN_BASENAME ) { $row_meta = array( - 'docs' => '' . __( 'Docs', 'woocommerce' ) . '', - 'apidocs' => '' . __( 'API Docs', 'woocommerce' ) . '', - 'support' => '' . __( 'Premium Support', 'woocommerce' ) . '', + 'docs' => '' . __( 'Docs', 'woocommerce' ) . '', + 'apidocs' => '' . __( 'API Docs', 'woocommerce' ) . '', + 'support' => '' . __( 'Premium Support', 'woocommerce' ) . '', ); return array_merge( $links, $row_meta ); @@ -712,7 +674,7 @@ class WC_Install { * @param array $tables * @return array */ - public function wpmu_drop_tables( $tables ) { + public static function wpmu_drop_tables( $tables ) { global $wpdb; $tables[] = $wpdb->prefix . "woocommerce_attribute_taxonomies"; @@ -727,6 +689,4 @@ class WC_Install { } } -endif; - -return new WC_Install(); +WC_Install::init(); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 1dd4e4efe41..191e0164701 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -68,8 +68,7 @@ class WC_Unit_Tests_Bootstrap { define( 'WP_UNINSTALL_PLUGIN', true ); include( $this->plugin_dir . '/uninstall.php' ); - $installer = include( $this->plugin_dir . '/includes/class-wc-install.php' ); - $installer->install(); + WC_Install::install(); // reload capabilities after install, see https://core.trac.wordpress.org/ticket/28374 $GLOBALS['wp_roles']->reinit(); diff --git a/tests/unit-tests/install.php b/tests/unit-tests/install.php new file mode 100644 index 00000000000..783ddcd2224 --- /dev/null +++ b/tests/unit-tests/install.php @@ -0,0 +1,110 @@ +version - 1 ); + update_option( 'woocommerce_db_version', WC()->version ); + WC_Install::check_version(); + + $this->assertTrue( did_action( 'woocommerce_updated' ) === 1 ); + + update_option( 'woocommerce_version', WC()->version ); + update_option( 'woocommerce_db_version', WC()->version ); + WC_Install::check_version(); + + $this->assertTrue( did_action( 'woocommerce_updated' ) === 1 ); + } + + /** + * Test - install + */ + public function test_install() { + // clean existing install first + if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { + define( 'WP_UNINSTALL_PLUGIN', true ); + } + include( dirname( dirname( dirname( __FILE__ ) ) ) . '/uninstall.php' ); + + WC_Install::install(); + + $this->assertTrue( get_option( 'woocommerce_version' ) === WC()->version ); + } + + /** + * Test - create pages + */ + public function test_create_pages() { + // Clear options + delete_option( 'woocommerce_shop_page_id' ); + delete_option( 'woocommerce_cart_page_id' ); + delete_option( 'woocommerce_checkout_page_id' ); + delete_option( 'woocommerce_myaccount_page_id' ); + + WC_Install::create_pages(); + + $this->assertGreaterThan( 0, get_option( 'woocommerce_shop_page_id' ) ); + $this->assertGreaterThan( 0, get_option( 'woocommerce_cart_page_id' ) ); + $this->assertGreaterThan( 0, get_option( 'woocommerce_checkout_page_id' ) ); + $this->assertGreaterThan( 0, get_option( 'woocommerce_myaccount_page_id' ) ); + + // Delete pages + wp_delete_post( get_option( 'woocommerce_shop_page_id' ), true ); + wp_delete_post( get_option( 'woocommerce_cart_page_id' ), true ); + wp_delete_post( get_option( 'woocommerce_checkout_page_id' ), true ); + wp_delete_post( get_option( 'woocommerce_myaccount_page_id' ), true ); + + // Clear options + delete_option( 'woocommerce_shop_page_id' ); + delete_option( 'woocommerce_cart_page_id' ); + delete_option( 'woocommerce_checkout_page_id' ); + delete_option( 'woocommerce_myaccount_page_id' ); + + WC_Install::create_pages(); + + $this->assertGreaterThan( 0, get_option( 'woocommerce_shop_page_id' ) ); + $this->assertGreaterThan( 0, get_option( 'woocommerce_cart_page_id' ) ); + $this->assertGreaterThan( 0, get_option( 'woocommerce_checkout_page_id' ) ); + $this->assertGreaterThan( 0, get_option( 'woocommerce_myaccount_page_id' ) ); + } + + /** + * Test - create roles + */ + public function test_create_roles() { + // clean existing install first + if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { + define( 'WP_UNINSTALL_PLUGIN', true ); + } + include( dirname( dirname( dirname( __FILE__ ) ) ) . '/uninstall.php' ); + + WC_Install::create_roles(); + + $this->assertNotNull( get_role( 'customer' ) ); + $this->assertNotNull( get_role( 'shop_manager' ) ); + } + + /** + * Test - remove pages + */ + public function test_remove_roles() { + WC_Install::remove_roles(); + + $this->assertNull( get_role( 'customer' ) ); + $this->assertNull( get_role( 'shop_manager' ) ); + } + + /** + * Test - in_plugin_update_message + */ + public function test_in_plugin_update_message() { + ob_start(); + WC_install::in_plugin_update_message( array( 'Version' => '2.0.0' ) ); + $result = ob_get_clean(); + $this->assertTrue( is_string( $result ) ); + } + +} diff --git a/tests/unit-tests/tax.php b/tests/unit-tests/tax.php index de181aca45f..91959f33382 100644 --- a/tests/unit-tests/tax.php +++ b/tests/unit-tests/tax.php @@ -8,8 +8,8 @@ class WC_Tests_Tax extends WC_Unit_Test_Case { public function test_get_rates() { global $wpdb; - $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rates" ); - $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); + $wpdb->query( "DELETE FROM {$wpdb->prefix}woocommerce_tax_rates" ); + $wpdb->query( "DELETE FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); $tax_rate = array( 'tax_rate_country' => "GB", @@ -38,8 +38,8 @@ class WC_Tests_Tax extends WC_Unit_Test_Case { public function test_get_shipping_tax_rates() { global $wpdb; - $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rates" ); - $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); + $wpdb->query( "DELETE FROM {$wpdb->prefix}woocommerce_tax_rates" ); + $wpdb->query( "DELETE FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); $tax_rate = array( 'tax_rate_country' => "GB", @@ -68,8 +68,8 @@ class WC_Tests_Tax extends WC_Unit_Test_Case { public function test_get_base_tax_rates() { global $wpdb; - $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rates" ); - $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); + $wpdb->query( "DELETE FROM {$wpdb->prefix}woocommerce_tax_rates" ); + $wpdb->query( "DELETE FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); $tax_rate = array( 'tax_rate_country' => "GB", @@ -98,8 +98,8 @@ class WC_Tests_Tax extends WC_Unit_Test_Case { public function test_find_rates() { global $wpdb; - $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rates" ); - $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); + $wpdb->query( "DELETE FROM {$wpdb->prefix}woocommerce_tax_rates" ); + $wpdb->query( "DELETE FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); $tax_rate = array( 'tax_rate_country' => "GB", @@ -134,8 +134,8 @@ class WC_Tests_Tax extends WC_Unit_Test_Case { public function test_find_shipping_rates() { global $wpdb; - $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rates" ); - $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); + $wpdb->query( "DELETE FROM {$wpdb->prefix}woocommerce_tax_rates" ); + $wpdb->query( "DELETE FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); $tax_rate = array( 'tax_rate_country' => "GB", @@ -170,8 +170,8 @@ class WC_Tests_Tax extends WC_Unit_Test_Case { public function test_calc_tax() { global $wpdb; - $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rates" ); - $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); + $wpdb->query( "DELETE FROM {$wpdb->prefix}woocommerce_tax_rates" ); + $wpdb->query( "DELETE FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); $tax_rate = array( 'tax_rate_country' => "GB", @@ -212,8 +212,8 @@ class WC_Tests_Tax extends WC_Unit_Test_Case { public function test_calc_shipping_tax() { global $wpdb; - $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rates" ); - $wpdb->query( "DELETE * FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); + $wpdb->query( "DELETE FROM {$wpdb->prefix}woocommerce_tax_rates" ); + $wpdb->query( "DELETE FROM {$wpdb->prefix}woocommerce_tax_rate_locations" ); $tax_rate = array( 'tax_rate_country' => "GB", diff --git a/uninstall.php b/uninstall.php index fc1df402279..db0e07aa3ed 100644 --- a/uninstall.php +++ b/uninstall.php @@ -9,16 +9,17 @@ * @package WooCommerce/Uninstaller * @version 2.1.0 */ -if( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) +if( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { exit(); +} global $wpdb, $wp_roles; $status_options = get_option( 'woocommerce_status_options', array() ); // Roles + caps -$installer = include( 'includes/class-wc-install.php' ); -$installer->remove_roles(); +include_once( 'includes/class-wc-install.php' ); +WC_Install::remove_roles(); // Pages wp_trash_post( get_option( 'woocommerce_shop_page_id' ) ); From 1c88e35c450c85d945fd1079b2d5ad1288220870 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 25 Nov 2014 17:35:43 +0000 Subject: [PATCH 274/743] Remove deprecated 2.1 methods from WC class. @claudiosmweb :) --- woocommerce.php | 294 ------------------------------------------------ 1 file changed, 294 deletions(-) diff --git a/woocommerce.php b/woocommerce.php index e909e5ed0c7..66f6b7783ce 100644 --- a/woocommerce.php +++ b/woocommerce.php @@ -148,18 +148,6 @@ final class WooCommerce { if ( method_exists( $this, $key ) ) { return $this->$key(); } - - switch( $key ) { - case 'template_url': - _deprecated_argument( 'Woocommerce->template_url', '2.1', 'Use WC()->template_path()' ); - return $this->template_path(); - case 'messages': - _deprecated_argument( 'Woocommerce->messages', '2.1', 'Use wc_get_notices' ); - return wc_get_notices( 'success' ); - case 'errors': - _deprecated_argument( 'Woocommerce->errors', '2.1', 'Use wc_get_notices' ); - return wc_get_notices( 'error' ); - } } /** @@ -504,7 +492,6 @@ final class WooCommerce { * @since 2.2 */ public function load_webhooks() { - $args = array( 'fields' => 'ids', 'post_type' => 'shop_webhook', @@ -514,7 +501,6 @@ final class WooCommerce { $query = new WP_Query( $args ); if ( ! empty( $query->posts ) ) { - foreach ( $query->posts as $id ) { $webhook = new WC_Webhook( $id ); $webhook->enqueue(); @@ -522,8 +508,6 @@ final class WooCommerce { } } - /** Load Instances on demand **********************************************/ - /** * Get Checkout Class. * @@ -559,284 +543,6 @@ final class WooCommerce { public function mailer() { return WC_Emails::instance(); } - - /** Deprecated methods *********************************************************/ - - /** - * @deprecated 2.1.0 - * @param $image_size - * @return array - */ - public function get_image_size( $image_size ) { - _deprecated_function( 'Woocommerce->get_image_size', '2.1', 'wc_get_image_size()' ); - return wc_get_image_size( $image_size ); - } - - /** - * @deprecated 2.1.0 - * @return WC_Logger - */ - public function logger() { - _deprecated_function( 'Woocommerce->logger', '2.1', 'new WC_Logger()' ); - return new WC_Logger(); - } - - /** - * @deprecated 2.1.0 - * @return WC_Validation - */ - public function validation() { - _deprecated_function( 'Woocommerce->validation', '2.1', 'new WC_Validation()' ); - return new WC_Validation(); - } - - /** - * @deprecated 2.1.0 - * @param $post - * @return WC_Product - */ - public function setup_product_data( $post ) { - _deprecated_function( 'Woocommerce->setup_product_data', '2.1', 'wc_setup_product_data' ); - return wc_setup_product_data( $post ); - } - - /** - * @deprecated 2.1.0 - * @param $content - * @return string - */ - public function force_ssl( $content ) { - _deprecated_function( 'Woocommerce->force_ssl', '2.1', 'WC_HTTPS::force_https_url' ); - return WC_HTTPS::force_https_url( $content ); - } - - /** - * @deprecated 2.1.0 - * @param int $post_id - */ - public function clear_product_transients( $post_id = 0 ) { - _deprecated_function( 'Woocommerce->clear_product_transients', '2.1', 'wc_delete_product_transients' ); - wc_delete_product_transients( $post_id ); - } - - /** - * @deprecated 2.1.0 Access via the WC_Inline_Javascript_Helper helper - * @param $code - */ - public function add_inline_js( $code ) { - _deprecated_function( 'Woocommerce->add_inline_js', '2.1', 'wc_enqueue_js' ); - wc_enqueue_js( $code ); - } - - /** - * @deprecated 2.1.0 - * @param $action - * @param bool $referer - * @param bool $echo - * @return string - */ - public function nonce_field( $action, $referer = true , $echo = true ) { - _deprecated_function( 'Woocommerce->nonce_field', '2.1', 'wp_nonce_field' ); - return wp_nonce_field('woocommerce-' . $action, '_wpnonce', $referer, $echo ); - } - - /** - * @deprecated 2.1.0 - * @param $action - * @param string $url - * @return string - */ - public function nonce_url( $action, $url = '' ) { - _deprecated_function( 'Woocommerce->nonce_url', '2.1', 'wp_nonce_url' ); - return wp_nonce_url( $url , 'woocommerce-' . $action ); - } - - /** - * @deprecated 2.1.0 - * @param $action - * @param string $method - * @param bool $error_message - * @return bool - */ - public function verify_nonce( $action, $method = '_POST', $error_message = false ) { - _deprecated_function( 'Woocommerce->verify_nonce', '2.1', 'wp_verify_nonce' ); - if ( ! isset( $method[ '_wpnonce' ] ) ) { - return false; - } - return wp_verify_nonce( $method[ '_wpnonce' ], 'woocommerce-' . $action ); - } - - /** - * @deprecated 2.1.0 - * @param $function - * @param array $atts - * @param array $wrapper - * @return string - */ - public function shortcode_wrapper( $function, $atts = array(), $wrapper = array( 'class' => 'woocommerce', 'before' => null, 'after' => null ) ) { - _deprecated_function( 'Woocommerce->shortcode_wrapper', '2.1', 'WC_Shortcodes::shortcode_wrapper' ); - return WC_Shortcodes::shortcode_wrapper( $function, $atts, $wrapper ); - } - - /** - * @deprecated 2.1.0 - * @return object - */ - public function get_attribute_taxonomies() { - _deprecated_function( 'Woocommerce->get_attribute_taxonomies', '2.1', 'wc_get_attribute_taxonomies' ); - return wc_get_attribute_taxonomies(); - } - - /** - * @deprecated 2.1.0 - * @param $name - * @return string - */ - public function attribute_taxonomy_name( $name ) { - _deprecated_function( 'Woocommerce->attribute_taxonomy_name', '2.1', 'wc_attribute_taxonomy_name' ); - return wc_attribute_taxonomy_name( $name ); - } - - /** - * @deprecated 2.1.0 - * @param $name - * @return string - */ - public function attribute_label( $name ) { - _deprecated_function( 'Woocommerce->attribute_label', '2.1', 'wc_attribute_label' ); - return wc_attribute_label( $name ); - } - - /** - * @deprecated 2.1.0 - * @param $name - * @return string - */ - public function attribute_orderby( $name ) { - _deprecated_function( 'Woocommerce->attribute_orderby', '2.1', 'wc_attribute_orderby' ); - return wc_attribute_orderby( $name ); - } - - /** - * @deprecated 2.1.0 - * @return array - */ - public function get_attribute_taxonomy_names() { - _deprecated_function( 'Woocommerce->get_attribute_taxonomy_names', '2.1', 'wc_get_attribute_taxonomy_names' ); - return wc_get_attribute_taxonomy_names(); - } - - /** - * @deprecated 2.1.0 - * @return array - */ - public function get_coupon_discount_types() { - _deprecated_function( 'Woocommerce->get_coupon_discount_types', '2.1', 'wc_get_coupon_types' ); - return wc_get_coupon_types(); - } - - /** - * @deprecated 2.1.0 - * @param string $type - * @return string - */ - public function get_coupon_discount_type( $type = '' ) { - _deprecated_function( 'Woocommerce->get_coupon_discount_type', '2.1', 'wc_get_coupon_type' ); - return wc_get_coupon_type( $type ); - } - - /** - * @deprecated 2.1.0 - * @param $class - */ - public function add_body_class( $class ) { - _deprecated_function( 'Woocommerce->add_body_class', '2.1' ); - } - - /** - * @deprecated 2.1.0 - * @param $classes - */ - public function output_body_class( $classes ) { - _deprecated_function( 'Woocommerce->output_body_class', '2.1' ); - } - - /** - * @deprecated 2.1.0 - * @param $error - */ - public function add_error( $error ) { - _deprecated_function( 'Woocommerce->add_error', '2.1', 'wc_add_notice' ); - wc_add_notice( $error, 'error' ); - } - - /** - * @deprecated 2.1.0 - * @param $message - */ - public function add_message( $message ) { - _deprecated_function( 'Woocommerce->add_message', '2.1', 'wc_add_notice' ); - wc_add_notice( $message ); - } - - /** - * @deprecated 2.1.0 - */ - public function clear_messages() { - _deprecated_function( 'Woocommerce->clear_messages', '2.1', 'wc_clear_notices' ); - wc_clear_notices(); - } - - /** - * @deprecated 2.1.0 - * @return int - */ - public function error_count() { - _deprecated_function( 'Woocommerce->error_count', '2.1', 'wc_notice_count' ); - return wc_notice_count( 'error' ); - } - - /** - * @deprecated 2.1.0 - * @return int - */ - public function message_count() { - _deprecated_function( 'Woocommerce->message_count', '2.1', 'wc_notice_count' ); - return wc_notice_count( 'message' ); - } - - /** - * @deprecated 2.1.0 - * @return mixed - */ - public function get_errors() { - _deprecated_function( 'Woocommerce->get_errors', '2.1', 'wc_get_notices( "error" )' ); - return wc_get_notices( 'error' ); - } - - /** - * @deprecated 2.1.0 - * @return mixed - */ - public function get_messages() { - _deprecated_function( 'Woocommerce->get_messages', '2.1', 'wc_get_notices( "success" )' ); - return wc_get_notices( 'success' ); - } - - /** - * @deprecated 2.1.0 - */ - public function show_messages() { - _deprecated_function( 'Woocommerce->show_messages', '2.1', 'wc_print_notices()' ); - wc_print_notices(); - } - - /** - * @deprecated 2.1.0 - */ - public function set_messages() { - _deprecated_function( 'Woocommerce->set_messages', '2.1' ); - } } endif; From 2752e0c61da59aafb17916eb4ea2dae5a29f8b44 Mon Sep 17 00:00:00 2001 From: Illimar Tambek Date: Wed, 26 Nov 2014 00:28:23 +0200 Subject: [PATCH 275/743] Correct hook name: `woocommerce_email_settings_before` --- includes/emails/class-wc-email.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/emails/class-wc-email.php b/includes/emails/class-wc-email.php index b7f51170c6e..42e9ebc2950 100644 --- a/includes/emails/class-wc-email.php +++ b/includes/emails/class-wc-email.php @@ -563,7 +563,7 @@ class WC_Email extends WC_Settings_API { * * @param string $email The email object */ - do_action( 'woocommerce_email_settings_after', $this ); + do_action( 'woocommerce_email_settings_before', $this ); ?> From e8b6e3f3bfa604dea2bfdf459309a744abfb9cc4 Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Tue, 25 Nov 2014 21:06:31 -0200 Subject: [PATCH 276/743] Make coverage works with scrutinizer and coveralls --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 010aad3af0f..03314b34180 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,9 +17,9 @@ before_script: - bash tests/bin/install.sh woocommerce_test root '' localhost $WP_VERSION - bash tests/bin/travis.sh before -script: phpunit -c phpunit.xml.dist --coverage-clover=coverage.clover +script: phpunit -c phpunit.xml.dist after_script: - bash tests/bin/travis.sh after - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover coverage.clover + - php ocular.phar code-coverage:upload --format=php-clover ./tmp/clover.xml From 206496b584977271065cb1e199283e725241b25a Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 25 Nov 2014 22:50:53 +0000 Subject: [PATCH 277/743] Split up WC_Product_Factory methods --- includes/class-wc-product-factory.php | 101 ++++++++++++++++---------- 1 file changed, 64 insertions(+), 37 deletions(-) diff --git a/includes/class-wc-product-factory.php b/includes/class-wc-product-factory.php index b58b6bfb4b8..b36f86a3009 100644 --- a/includes/class-wc-product-factory.php +++ b/includes/class-wc-product-factory.php @@ -5,7 +5,7 @@ * The WooCommerce product factory creating the right product object * * @class WC_Product_Factory - * @version 2.0.0 + * @version 2.3.0 * @package WooCommerce/Classes * @category Class * @author WooThemes @@ -15,54 +15,81 @@ class WC_Product_Factory { /** * get_product function. * - * @access public * @param bool $the_product (default: false) * @param array $args (default: array()) - * @return WC_Product + * @return WC_Product|bool false if the product cannot be loaded */ public function get_product( $the_product = false, $args = array() ) { - global $post; - - if ( false === $the_product ) { - $the_product = $post; - } elseif ( is_numeric( $the_product ) ) { - $the_product = get_post( $the_product ); - } elseif ( $the_product instanceof WC_Product ) { - return $the_product; - } + $the_product = $this->get_product_object( $the_product ); if ( ! $the_product ) { return false; } - if ( is_object( $the_product ) ) { - $product_id = absint( $the_product->ID ); - $post_type = $the_product->post_type; - } + $classname = $this->get_product_class( $the_product ); - if ( in_array( $post_type, array( 'product', 'product_variation' ) ) ) { - if ( isset( $args['product_type'] ) ) { - $product_type = $args['product_type']; - } elseif ( 'product_variation' == $post_type ) { - $product_type = 'variation'; - } else { - $terms = get_the_terms( $product_id, 'product_type' ); - $product_type = ! empty( $terms ) && isset( current( $terms )->name ) ? sanitize_title( current( $terms )->name ) : 'simple'; - } - - // Create a WC coding standards compliant class name e.g. WC_Product_Type_Class instead of WC_Product_type-class - $classname = 'WC_Product_' . implode( '_', array_map( 'ucfirst', explode( '-', $product_type ) ) ); - } else { - $classname = false; - $product_type = false; - } - - // Filter classname so that the class can be overridden if extended. - $classname = apply_filters( 'woocommerce_product_class', $classname, $product_type, $post_type, $product_id ); - - if ( ! class_exists( $classname ) ) + if ( ! class_exists( $classname ) ) { $classname = 'WC_Product_Simple'; + } return new $classname( $the_product, $args ); } + + /** + * Create a WC coding standards compliant class name e.g. WC_Product_Type_Class instead of WC_Product_type-class + * @param string $product_type + * @return string|bool + */ + private function get_classname_from_product_type( $product_type ) { + return $product_type ? 'WC_Product_' . implode( '_', array_map( 'ucfirst', explode( '-', $product_type ) ) ) : false; + } + + /** + * Get the product class name + * @param WP_Post $the_product + * @return string + */ + private function get_product_class( $the_product ) { + $product_id = absint( $the_product->ID ); + $post_type = $the_product->post_type; + + if ( 'product' === $post_type ) { + if ( isset( $args['product_type'] ) ) { + $product_type = $args['product_type']; + } else { + $terms = get_the_terms( $product_id, 'product_type' ); + $product_type = ! empty( $terms ) ? sanitize_title( current( $terms )->name ) : 'simple'; + } + } elseif( 'product_variation' === $post_type ) { + $product_type = 'variation'; + } else { + $product_type = false; + } + + $classname = $this->get_classname_from_product_type( $product_type ); + + // Filter classname so that the class can be overridden if extended. + return apply_filters( 'woocommerce_product_class', $classname, $product_type, $post_type, $product_id ); + } + + /** + * Get the product object + * @param mixed $the_product + * @return WP_Post|bool false on failure + */ + private function get_product_object( $the_product ) { + if ( false === $the_product ) { + $the_product = $GLOBALS['post']; + } elseif ( is_numeric( $the_product ) ) { + $the_product = get_post( $the_product ); + } elseif ( $the_product instanceof WC_Product ) { + $the_product = get_post( $the_product->id ); + } elseif ( $the_product instanceof WP_Post ) { + $the_product = $the_product; + } else { + $the_product = false; + } + + return $the_product; + } } From 1993509e073ec4f7f885e967542c5a99fd56acc9 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 25 Nov 2014 23:21:00 +0000 Subject: [PATCH 278/743] Removed unused variables from emails class, including content_type --- includes/class-wc-emails.php | 57 ++++-------------------------------- 1 file changed, 6 insertions(+), 51 deletions(-) diff --git a/includes/class-wc-emails.php b/includes/class-wc-emails.php index 9f569543f14..bd3d2e8c451 100644 --- a/includes/class-wc-emails.php +++ b/includes/class-wc-emails.php @@ -5,40 +5,17 @@ * WooCommerce Emails Class which handles the sending on transactional emails and email templates. This class loads in available emails. * * @class WC_Emails - * @version 2.0.0 + * @version 2.3.0 * @package WooCommerce/Classes/Emails * @category Class * @author WooThemes */ class WC_Emails { - /** - * @var array Array of email notification classes. - */ + /** @var array Array of email notification classes */ public $emails; - /** - * @var string Stores the emailer's address. - * @access private - */ - private $_from_address; - - /** - * @var string Stores the emailer's name. - * @access private - */ - private $_from_name; - - /** - * @var mixed Content type for sent emails - * @access private - */ - private $_content_type; - - /** - * @var WC_Emails The single instance of the class - * @since 2.1 - */ + /** @var WC_Emails The single instance of the class */ protected static $_instance = null; /** @@ -80,7 +57,6 @@ class WC_Emails { * */ public function __construct() { - $this->init(); // Email Header, Footer and content hooks @@ -139,11 +115,7 @@ class WC_Emails { * @return string */ public function get_from_name() { - if ( ! $this->_from_name ) { - $this->_from_name = get_option( 'woocommerce_email_from_name' ); - } - - return wp_specialchars_decode( $this->_from_name ); + return wp_specialchars_decode( et_option( 'woocommerce_email_from_name' ) ); } /** @@ -152,20 +124,7 @@ class WC_Emails { * @return string */ public function get_from_address() { - if ( ! $this->_from_address ) { - $this->_from_address = get_option( 'woocommerce_email_from_address' ); - } - - return $this->_from_address; - } - - /** - * Get the content type for the email. - * - * @return string - */ - public function get_content_type() { - return $this->_content_type; + return get_option( 'woocommerce_email_from_address' ); } /** @@ -217,11 +176,7 @@ class WC_Emails { * @param string $attachments (default: "") * @param string $content_type (default: "text/html") */ - public function send( $to, $subject, $message, $headers = "Content-Type: text/html\r\n", $attachments = "", $content_type = 'text/html' ) { - - // Set content type - $this->_content_type = $content_type; - + public function send( $to, $subject, $message, $headers = "Content-Type: text/html\r\n", $attachments = "" ) { // Send $email = new WC_Email(); $email->send( $to, $subject, $message, $headers, $attachments ); From 0d4d6fdcaf35c11ce88c87eeb9ddb784ac8f2967 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 25 Nov 2014 23:21:39 +0000 Subject: [PATCH 279/743] WC class cleanup --- includes/emails/class-wc-email.php | 1 - woocommerce.php | 107 ++++++++++++++--------------- 2 files changed, 53 insertions(+), 55 deletions(-) diff --git a/includes/emails/class-wc-email.php b/includes/emails/class-wc-email.php index 8d3efa83358..c1a7ee1a8af 100644 --- a/includes/emails/class-wc-email.php +++ b/includes/emails/class-wc-email.php @@ -247,7 +247,6 @@ class WC_Email extends WC_Settings_API { * @return string */ public function get_content_type() { - switch ( $this->get_email_type() ) { case "html" : return 'text/html'; diff --git a/woocommerce.php b/woocommerce.php index 66f6b7783ce..4c5fc9eb836 100644 --- a/woocommerce.php +++ b/woocommerce.php @@ -138,22 +138,10 @@ final class WooCommerce { do_action( 'woocommerce_loaded' ); } - /** - * Auto-load in-accessible properties on demand. - * - * @param mixed $key - * @return mixed - */ - public function __get( $key ) { - if ( method_exists( $this, $key ) ) { - return $this->$key(); - } - } - /** * Define constant if not already set * @param string $name - * @param string $value + * @param string|bool $value */ private function define( $name, $value ) { if ( ! defined( $name ) ) { @@ -161,6 +149,22 @@ final class WooCommerce { } } + /** + * What type of request is this? + * string $type ajax, frontend or admin + * @return string + */ + private function is_request( $type ) { + switch ( $type ) { + case 'admin' : + return is_admin(); + case 'ajax' : + return defined( 'DOING_AJAX' ); + case 'frontend' : + return ! is_admin() || defined( 'DOING_AJAX' ); + } + } + /** * Define WC Constants */ @@ -189,43 +193,34 @@ final class WooCommerce { include_once( 'includes/class-wc-comments.php' ); include_once( 'includes/class-wc-post-data.php' ); - if ( is_admin() ) { + if ( $this->is_request( 'admin' ) ) { include_once( 'includes/admin/class-wc-admin.php' ); } - if ( defined( 'DOING_AJAX' ) ) { + if ( $this->is_request( 'ajax' ) ) { $this->ajax_includes(); } - if ( ! is_admin() || defined( 'DOING_AJAX' ) ) { + if ( $this->is_request( 'frontend' ) ) { $this->frontend_includes(); } // Query class $this->query = include( 'includes/class-wc-query.php' ); // The main query class - // Post types include_once( 'includes/class-wc-post-types.php' ); // Registers post types - - // API Class - include_once( 'includes/class-wc-api.php' ); - - // Include abstract classes + include_once( 'includes/class-wc-api.php' ); // API Class include_once( 'includes/abstracts/abstract-wc-product.php' ); // Products include_once( 'includes/abstracts/abstract-wc-order.php' ); // Orders include_once( 'includes/abstracts/abstract-wc-settings-api.php' ); // Settings API (for gateways, shipping, and integrations) include_once( 'includes/abstracts/abstract-wc-shipping-method.php' ); // A Shipping method include_once( 'includes/abstracts/abstract-wc-payment-gateway.php' ); // A Payment gateway include_once( 'includes/abstracts/abstract-wc-integration.php' ); // An integration with a service - - // Classes (used on all pages) include_once( 'includes/class-wc-product-factory.php' ); // Product factory include_once( 'includes/class-wc-countries.php' ); // Defines countries and states include_once( 'includes/class-wc-integrations.php' ); // Loads integrations include_once( 'includes/class-wc-cache-helper.php' ); // Cache Helper - - // Download/update languages - include_once( 'includes/class-wc-language-pack-upgrader.php' ); + include_once( 'includes/class-wc-language-pack-upgrader.php' ); // Download/update languages } /** @@ -258,7 +253,7 @@ final class WooCommerce { * Function used to Init WooCommerce Template Functions - This makes them pluggable by plugins and themes. */ public function include_template_functions() { - if ( ! is_admin() || defined( 'DOING_AJAX' ) ) { + if ( $this->is_request( 'frontend' ) ) { include_once( 'includes/wc-template-functions.php' ); } } @@ -288,7 +283,7 @@ final class WooCommerce { $this->integrations = new WC_Integrations(); // Integrations class // Classes/actions loaded for the frontend and for ajax requests - if ( ! is_admin() || defined( 'DOING_AJAX' ) ) { + if ( $this->is_request( 'frontend' ) ) { // Session class, handles session data for users - can be overwritten if custom handler is needed $session_class = apply_filters( 'woocommerce_session_handler', 'WC_Session_Handler' ); @@ -298,29 +293,7 @@ final class WooCommerce { $this->customer = new WC_Customer(); // Customer class, handles data such as customer location } - // Email Actions - $email_actions = apply_filters( 'woocommerce_email_actions', array( - 'woocommerce_low_stock', - 'woocommerce_no_stock', - 'woocommerce_product_on_backorder', - 'woocommerce_order_status_pending_to_processing', - 'woocommerce_order_status_pending_to_completed', - 'woocommerce_order_status_pending_to_cancelled', - 'woocommerce_order_status_pending_to_on-hold', - 'woocommerce_order_status_failed_to_processing', - 'woocommerce_order_status_failed_to_completed', - 'woocommerce_order_status_on-hold_to_processing', - 'woocommerce_order_status_on-hold_to_cancelled', - 'woocommerce_order_status_completed', - 'woocommerce_new_customer_note', - 'woocommerce_created_customer' - ) ); - - foreach ( $email_actions as $action ) { - add_action( $action, array( $this, 'send_transactional_email' ), 10, 10 ); - } - - // webhooks + $this->init_transactional_emails(); $this->load_webhooks(); // Init action @@ -344,7 +317,7 @@ final class WooCommerce { public function load_plugin_textdomain() { $locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce' ); - if ( is_admin() ) { + if ( $this->is_request( 'admin' ) ) { load_textdomain( 'woocommerce', WP_LANG_DIR . '/woocommerce/woocommerce-admin-' . $locale . '.mo' ); load_textdomain( 'woocommerce', WP_LANG_DIR . '/plugins/woocommerce-admin-' . $locale . '.mo' ); } @@ -486,12 +459,38 @@ final class WooCommerce { do_action_ref_array( current_filter() . '_notification', $args ); } + /** + * Hook in all transactional emails + */ + private function init_transactional_emails() { + $email_actions = apply_filters( 'woocommerce_email_actions', array( + 'woocommerce_low_stock', + 'woocommerce_no_stock', + 'woocommerce_product_on_backorder', + 'woocommerce_order_status_pending_to_processing', + 'woocommerce_order_status_pending_to_completed', + 'woocommerce_order_status_pending_to_cancelled', + 'woocommerce_order_status_pending_to_on-hold', + 'woocommerce_order_status_failed_to_processing', + 'woocommerce_order_status_failed_to_completed', + 'woocommerce_order_status_on-hold_to_processing', + 'woocommerce_order_status_on-hold_to_cancelled', + 'woocommerce_order_status_completed', + 'woocommerce_new_customer_note', + 'woocommerce_created_customer' + ) ); + + foreach ( $email_actions as $action ) { + add_action( $action, array( $this, 'send_transactional_email' ), 10, 10 ); + } + } + /** * Load & enqueue active webhooks * * @since 2.2 */ - public function load_webhooks() { + private function load_webhooks() { $args = array( 'fields' => 'ids', 'post_type' => 'shop_webhook', From 626d7f4256ec48b85b3e630e5d07c4480c7546e5 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 26 Nov 2014 00:02:41 +0000 Subject: [PATCH 280/743] Moved email methods to emails class --- includes/class-wc-emails.php | 39 ++++++++++++++++++- .../gateways/cod/class-wc-gateway-cod.php | 2 +- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/includes/class-wc-emails.php b/includes/class-wc-emails.php index bd3d2e8c451..aa21c85b984 100644 --- a/includes/class-wc-emails.php +++ b/includes/class-wc-emails.php @@ -52,6 +52,41 @@ class WC_Emails { _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'woocommerce' ), '2.1' ); } + /** + * Hook in all transactional emails + */ + public static function init_transactional_emails() { + $email_actions = apply_filters( 'woocommerce_email_actions', array( + 'woocommerce_low_stock', + 'woocommerce_no_stock', + 'woocommerce_product_on_backorder', + 'woocommerce_order_status_pending_to_processing', + 'woocommerce_order_status_pending_to_completed', + 'woocommerce_order_status_pending_to_cancelled', + 'woocommerce_order_status_pending_to_on-hold', + 'woocommerce_order_status_failed_to_processing', + 'woocommerce_order_status_failed_to_completed', + 'woocommerce_order_status_on-hold_to_processing', + 'woocommerce_order_status_on-hold_to_cancelled', + 'woocommerce_order_status_completed', + 'woocommerce_new_customer_note', + 'woocommerce_created_customer' + ) ); + + foreach ( $email_actions as $action ) { + add_action( $action, array( __CLASS__, 'send_transactional_email' ), 10, 10 ); + } + } + + /** + * Init the mailer instance and call the notifications for the current filter. + * @internal param array $args (default: array()) + */ + public static function send_transactional_email() { + self::instance(); + do_action_ref_array( current_filter() . '_notification', func_get_args() ); + } + /** * Constructor for the email class hooks in all emails that can be sent. * @@ -276,7 +311,7 @@ class WC_Emails { * @param bool $plain_text (default: false) * @return string */ - function customer_details( $order, $sent_to_admin = false, $plain_text = false ) { + public function customer_details( $order, $sent_to_admin = false, $plain_text = false ) { $fields = array(); if ( $order->billing_email ) { @@ -331,7 +366,7 @@ class WC_Emails { * * @return void */ - function email_addresses( $order, $sent_to_admin = false, $plain_text = false ) { + public function email_addresses( $order, $sent_to_admin = false, $plain_text = false ) { wc_get_template( 'emails/email-addresses.php', array( 'order' => $order ) ); } diff --git a/includes/gateways/cod/class-wc-gateway-cod.php b/includes/gateways/cod/class-wc-gateway-cod.php index 979f9d7b1b5..ba0dc94210c 100644 --- a/includes/gateways/cod/class-wc-gateway-cod.php +++ b/includes/gateways/cod/class-wc-gateway-cod.php @@ -52,7 +52,7 @@ class WC_Gateway_COD extends WC_Payment_Gateway { $shipping_methods = array(); if ( is_admin() ) - foreach ( WC()->shipping->load_shipping_methods() as $method ) { + foreach ( WC()->shipping()->load_shipping_methods() as $method ) { $shipping_methods[ $method->id ] = $method->get_title(); } From 67d899da3a3472bfaf1bf62505fbacb7bedf0908 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 26 Nov 2014 00:02:56 +0000 Subject: [PATCH 281/743] Restore __Get and move template debug mode to template functions --- includes/wc-template-functions.php | 15 +++++++ woocommerce.php | 68 ++++++------------------------ 2 files changed, 27 insertions(+), 56 deletions(-) diff --git a/includes/wc-template-functions.php b/includes/wc-template-functions.php index 1043e35da31..7e84cf4bf15 100644 --- a/includes/wc-template-functions.php +++ b/includes/wc-template-functions.php @@ -69,6 +69,21 @@ function wc_template_redirect() { } add_action( 'template_redirect', 'wc_template_redirect' ); +/** + * Enables template debug mode + */ +function wc_template_debug_mode() { + if ( ! defined( 'WC_TEMPLATE_DEBUG_MODE' ) ) { + $status_options = get_option( 'woocommerce_status_options', array() ); + if ( ! empty( $status_options['template_debug_mode'] ) && current_user_can( 'manage_options' ) ) { + define( 'WC_TEMPLATE_DEBUG_MODE', true ); + } else { + define( 'WC_TEMPLATE_DEBUG_MODE', false ); + } + } +} +add_action( 'after_setup_theme', 'wc_template_debug_mode', 20 ); + /** * When the_post is called, put product data into a global. * diff --git a/woocommerce.php b/woocommerce.php index 4c5fc9eb836..0062da8f069 100644 --- a/woocommerce.php +++ b/woocommerce.php @@ -116,6 +116,17 @@ final class WooCommerce { _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'woocommerce' ), '2.1' ); } + /** + * Auto-load in-accessible properties on demand. + * @param mixed $key + * @return mixed + */ + public function __get( $key ) { + if ( in_array( $key, array( 'payment_gateways', 'shipping', 'mailer', 'checkout' ) ) ) { + return $this->$key(); + } + } + /** * WooCommerce Constructor. * @access public @@ -133,6 +144,7 @@ final class WooCommerce { add_action( 'after_setup_theme', array( $this, 'include_template_functions' ), 11 ); add_action( 'init', array( $this, 'init' ), 0 ); add_action( 'init', array( 'WC_Shortcodes', 'init' ) ); + add_action( 'init', array( 'WC_Emails', 'init_transactional_emails' ) ); // Loaded action do_action( 'woocommerce_loaded' ); @@ -268,14 +280,6 @@ final class WooCommerce { // Set up localisation $this->load_plugin_textdomain(); - // Template debug mode - $status_options = get_option( 'woocommerce_status_options', array() ); - if ( ! empty( $status_options['template_debug_mode'] ) && current_user_can( 'manage_options' ) ) { - $this->define( 'WC_TEMPLATE_DEBUG_MODE', true ); - } else { - $this->define( 'WC_TEMPLATE_DEBUG_MODE', false ); - } - // Load class instances $this->product_factory = new WC_Product_Factory(); // Product Factory to create new product instances $this->order_factory = new WC_Order_Factory(); // Order Factory to create new order instances @@ -293,7 +297,6 @@ final class WooCommerce { $this->customer = new WC_Customer(); // Customer class, handles data such as customer location } - $this->init_transactional_emails(); $this->load_webhooks(); // Init action @@ -387,11 +390,8 @@ final class WooCommerce { } } - /** Helper functions ******************************************************/ - /** * Get the plugin url. - * * @return string */ public function plugin_url() { @@ -400,7 +400,6 @@ final class WooCommerce { /** * Get the plugin path. - * * @return string */ public function plugin_path() { @@ -409,7 +408,6 @@ final class WooCommerce { /** * Get the template path. - * * @return string */ public function template_path() { @@ -418,7 +416,6 @@ final class WooCommerce { /** * Get Ajax URL. - * * @return string */ public function ajax_url() { @@ -448,43 +445,6 @@ final class WooCommerce { } } - /** - * Init the mailer and call the notifications for the current filter. - * - * @internal param array $args (default: array()) - */ - public function send_transactional_email() { - $this->mailer(); - $args = func_get_args(); - do_action_ref_array( current_filter() . '_notification', $args ); - } - - /** - * Hook in all transactional emails - */ - private function init_transactional_emails() { - $email_actions = apply_filters( 'woocommerce_email_actions', array( - 'woocommerce_low_stock', - 'woocommerce_no_stock', - 'woocommerce_product_on_backorder', - 'woocommerce_order_status_pending_to_processing', - 'woocommerce_order_status_pending_to_completed', - 'woocommerce_order_status_pending_to_cancelled', - 'woocommerce_order_status_pending_to_on-hold', - 'woocommerce_order_status_failed_to_processing', - 'woocommerce_order_status_failed_to_completed', - 'woocommerce_order_status_on-hold_to_processing', - 'woocommerce_order_status_on-hold_to_cancelled', - 'woocommerce_order_status_completed', - 'woocommerce_new_customer_note', - 'woocommerce_created_customer' - ) ); - - foreach ( $email_actions as $action ) { - add_action( $action, array( $this, 'send_transactional_email' ), 10, 10 ); - } - } - /** * Load & enqueue active webhooks * @@ -509,7 +469,6 @@ final class WooCommerce { /** * Get Checkout Class. - * * @return WC_Checkout */ public function checkout() { @@ -518,7 +477,6 @@ final class WooCommerce { /** * Get gateways class - * * @return WC_Payment_Gateways */ public function payment_gateways() { @@ -527,7 +485,6 @@ final class WooCommerce { /** * Get shipping class - * * @return WC_Shipping */ public function shipping() { @@ -536,7 +493,6 @@ final class WooCommerce { /** * Email Class. - * * @return WC_Emails */ public function mailer() { From c3fb83d4435fa2cef61179ebe9c6c2490101fed6 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 26 Nov 2014 10:56:51 +0000 Subject: [PATCH 282/743] Append query string when removing item from cart to bust cache Closes #6544 --- includes/class-wc-form-handler.php | 2 +- templates/cart/mini-cart.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/class-wc-form-handler.php b/includes/class-wc-form-handler.php index 10439962eca..92074ce07c1 100644 --- a/includes/class-wc-form-handler.php +++ b/includes/class-wc-form-handler.php @@ -388,7 +388,7 @@ class WC_Form_Handler { } wc_add_notice( sprintf( __( '%s removed. %sUndo?%s', 'woocommerce' ), $product->get_title(), '', '' ) ); - $referer = wp_get_referer() ? remove_query_arg( array( 'remove_item' ), wp_get_referer() ) : WC()->cart->get_cart_url(); + $referer = wp_get_referer() ? remove_query_arg( array( 'remove_item', 'add-to-cart', 'added-to-cart' ), add_query_arg( 'removed_item', '1', wp_get_referer() ) ) : WC()->cart->get_cart_url(); wp_safe_redirect( $referer ); exit; diff --git a/templates/cart/mini-cart.php b/templates/cart/mini-cart.php index 721b80893c8..ccc8843d044 100644 --- a/templates/cart/mini-cart.php +++ b/templates/cart/mini-cart.php @@ -31,7 +31,6 @@ if ( ! defined( 'ABSPATH' ) ) { $product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key ); $thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key ); $product_price = apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); - ?>
  • ×', esc_url( WC()->cart->get_remove_url( $cart_item_key ) ), __( 'Remove this item', 'woocommerce' ) ), $cart_item_key ); ?> From d9f26e7848beaabccec0d0f3074ceb4780634474 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 26 Nov 2014 11:03:39 +0000 Subject: [PATCH 283/743] Remove troublesome 'featured image' text replacement Little gain in keeping this - not worth the overhead. Closes #6451 --- includes/admin/class-wc-admin-post-types.php | 39 -------------------- 1 file changed, 39 deletions(-) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 9321b227c2f..3afd014b71a 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -71,14 +71,11 @@ class WC_Admin_Post_Types { add_action( 'before_delete_post', array( $this, 'delete_order_items' ) ); // Edit post screens - add_filter( 'media_view_strings', array( $this, 'media_view_strings' ), 10, 2 ); add_filter( 'enter_title_here', array( $this, 'enter_title_here' ), 1, 2 ); add_action( 'edit_form_after_title', array( $this, 'edit_form_after_title' ) ); add_filter( 'media_view_strings', array( $this, 'change_insert_into_post' ) ); add_action( 'post_submitbox_misc_actions', array( $this, 'product_data_visibility' ) ); - $this->change_featured_image_text(); - // Uploads add_filter( 'upload_dir', array( $this, 'upload_dir' ) ); add_action( 'media_upload_downloadable_product', array( $this, 'media_upload_downloadable_product' ) ); @@ -1914,42 +1911,6 @@ class WC_Admin_Post_Types { } } - /** - * Change text without slow getext filter - */ - public function change_featured_image_text() { - global $l10n; - if ( isset( $l10n['default'] ) && isset( $l10n['default']->entries ) ) { - foreach ( $l10n['default']->entries as $entry_key => $entries ) { - foreach ( $entries->translations as $key => $value ) { - if ( 'Featured Image' == $value ) { - $l10n['default']->entries[ $entry_key ]->translations[ $key ] = __( 'Product Image', 'woocommerce' ); - } elseif ( 'Remove featured image' == $value ) { - $l10n['default']->entries[ $entry_key ]->translations[ $key ] = __( 'Remove product image', 'woocommerce' ); - } elseif ( 'Set featured image' == $value ) { - $l10n['default']->entries[ $entry_key ]->translations[ $key ] = __( 'Set product image', 'woocommerce' ); - } - } - } - } - } - - /** - * Change "Featured Image" to "Product Image" throughout media modals. - * - * @param array $strings Array of strings to translate. - * @param object $post - * @return array - */ - public function media_view_strings( $strings = array(), $post = null ) { - if ( isset( $post->post_type ) && 'product' == $post->post_type ) { - $strings['setFeaturedImageTitle'] = __( 'Set product image', 'woocommerce' ); - $strings['setFeaturedImage'] = __( 'Set product image', 'woocommerce' ); - } - - return $strings; - } - /** * Change title boxes in admin. * @param string $text From 06129f60cdd251bcc4e218d390dd582e07501249 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 26 Nov 2014 11:14:08 +0000 Subject: [PATCH 284/743] Message when updating attributes #6189 --- includes/admin/class-wc-admin-attributes.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/admin/class-wc-admin-attributes.php b/includes/admin/class-wc-admin-attributes.php index 33774c1a751..ee66f621603 100644 --- a/includes/admin/class-wc-admin-attributes.php +++ b/includes/admin/class-wc-admin-attributes.php @@ -167,6 +167,8 @@ class WC_Admin_Attributes { ); } + echo '

    ' . __( 'Attribute updated successfully', 'woocommerce' ) . '

    '; + $action_completed = true; } From 3904035003c7c6ed247e914ec1c753b83853847a Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 26 Nov 2014 11:35:07 +0000 Subject: [PATCH 285/743] Disable already added attributes #6189 --- assets/js/admin/meta-boxes-product.js | 10 +++++++++- assets/js/admin/meta-boxes-product.min.js | 2 +- .../meta-boxes/class-wc-meta-box-product-data.php | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/assets/js/admin/meta-boxes-product.js b/assets/js/admin/meta-boxes-product.js index 0b4ee516e39..04ac0f04780 100644 --- a/assets/js/admin/meta-boxes-product.js +++ b/assets/js/admin/meta-boxes-product.js @@ -271,6 +271,12 @@ jQuery( function( $ ){ }); }; + $('.product_attributes .woocommerce_attribute').each(function(index, el){ + if ( $(el).css('display') != 'none' && $(el).is('.taxonomy') ) { + $('select.attribute_taxonomy').find('option[value="' + $(el).data( 'taxonomy' ) + '"]').attr('disabled','disabled'); + } + }); + // Add rows $('button.add_attribute').on('click', function(){ @@ -278,7 +284,7 @@ jQuery( function( $ ){ var attribute_type = $('select.attribute_taxonomy').val(); - if (!attribute_type) { + if ( ! attribute_type ) { var product_type = $('select#product-type').val(); if (product_type!='variable') enable_variation = 'style="display:none;"'; else enable_variation = ''; @@ -327,6 +333,7 @@ jQuery( function( $ ){ $('.product_attributes').append( $(thisrow) ); $(thisrow).show().find('.woocommerce_attribute_data').show(); attribute_row_indexes(); + $('select.attribute_taxonomy').find('option[value="' + attribute_type + '"]').attr('disabled','disabled'); } @@ -357,6 +364,7 @@ jQuery( function( $ ){ if ($parent.is('.taxonomy')) { $parent.find('select, input[type=text]').val(''); $parent.hide(); + $('select.attribute_taxonomy').find('option[value="' + $parent.data( 'taxonomy' ) + '"]').removeAttr('disabled'); } else { $parent.find('select, input[type=text]').val(''); $parent.hide(); diff --git a/assets/js/admin/meta-boxes-product.min.js b/assets/js/admin/meta-boxes-product.min.js index 23b66fb7d4c..ec075765e42 100644 --- a/assets/js/admin/meta-boxes-product.min.js +++ b/assets/js/admin/meta-boxes-product.min.js @@ -1 +1 @@ -jQuery(function(a){function b(){var b=a("select#product-type").val(),c=a("input#_virtual:checked").size(),d=a("input#_downloadable:checked").size(),e=".hide_if_downloadable, .hide_if_virtual",f=".show_if_downloadable, .show_if_virtual, .show_if_external";a.each(woocommerce_admin_meta_boxes.product_types,function(a,b){e=e+", .hide_if_"+b,f=f+", .show_if_"+b}),a(e).show(),a(f).hide(),d&&a(".show_if_downloadable").show(),c&&a(".show_if_virtual").show(),a(".show_if_"+b).show(),d&&a(".hide_if_downloadable").hide(),c&&a(".hide_if_virtual").hide(),a(".hide_if_"+b).hide(),a("input#_manage_stock").change()}function c(){a(".product_attributes .woocommerce_attribute").each(function(b,c){a(".attribute_position",c).val(parseInt(a(c).index(".product_attributes .woocommerce_attribute")))})}a(function(){a('[id$="-all"] > ul.categorychecklist').each(function(){var b=a(this),c=b.find(":checked").first();if(c.length){var d=b.find("input").position().top,e=c.position().top;b.closest(".tabs-panel").scrollTop(e-d+5)}})}),a("#upsell_product_data").bind("keypress",function(a){return 13==a.keyCode?!1:void 0}),a(".type_box").appendTo("#woocommerce-product-data h3.hndle span"),a(function(){a("#woocommerce-product-data h3.hndle").unbind("click.postboxes"),jQuery("#woocommerce-product-data").on("click","h3.hndle",function(b){a(b.target).filter("input, option, label, select").length||a("#woocommerce-product-data").toggleClass("closed")})}),a("#catalog-visibility .edit-catalog-visibility").click(function(){return a("#catalog-visibility-select").is(":hidden")&&(a("#catalog-visibility-select").slideDown("fast"),a(this).hide()),!1}),a("#catalog-visibility .save-post-visibility").click(function(){a("#catalog-visibility-select").slideUp("fast"),a("#catalog-visibility .edit-catalog-visibility").show();var b=(a("input[name=_visibility]:checked").val(),a("input[name=_visibility]:checked").attr("data-label"));return a("input[name=_featured]").is(":checked")&&(b=b+", "+woocommerce_admin_meta_boxes.featured_label,a("input[name=_featured]").attr("checked","checked")),a("#catalog-visibility-display").text(b),!1}),a("#catalog-visibility .cancel-post-visibility").click(function(){a("#catalog-visibility-select").slideUp("fast"),a("#catalog-visibility .edit-catalog-visibility").show();var b=a("#current_visibility").val(),c=a("#current_featured").val();a("input[name=_visibility]").removeAttr("checked"),a("input[name=_visibility][value="+b+"]").attr("checked","checked");var d=a("input[name=_visibility]:checked").attr("data-label");return"yes"==c?(d=d+", "+woocommerce_admin_meta_boxes.featured_label,a("input[name=_featured]").attr("checked","checked")):a("input[name=_featured]").removeAttr("checked"),a("#catalog-visibility-display").text(d),!1}),a("select#product-type").change(function(){var c=a(this).val();"variable"===c?(a("input#_manage_stock").change(),a("input#_downloadable").prop("checked",!1),a("input#_virtual").removeAttr("checked")):"grouped"===c?(a("input#_downloadable").prop("checked",!1),a("input#_virtual").removeAttr("checked")):"external"===c&&(a("input#_downloadable").prop("checked",!1),a("input#_virtual").removeAttr("checked")),b(),a("ul.wc-tabs li:visible").eq(0).find("a").click(),a("body").trigger("woocommerce-product-type-change",c,a(this))}).change(),a("body").on("woocommerce-product-type-change",function(b,c){"variable"!==c&&0d?-1:d>e?1:0}),a(e).each(function(b,c){a(".product_attributes").append(c)}),a("button.add_attribute").on("click",function(){var b=a(".product_attributes .woocommerce_attribute").size(),d=a("select.attribute_taxonomy").val();if(d){var e=a(".product_attributes .woocommerce_attribute."+d);a(".product_attributes").append(a(e)),a(e).show().find(".woocommerce_attribute_data").show(),c()}else{var f=a("select#product-type").val();enable_variation="variable"!=f?'style="display:none;"':"",a(".product_attributes").append('

  • ")}a("select.attribute_taxonomy").val("")}),a(".product_attributes").on("blur","input.attribute_name",function(){a(this).closest(".woocommerce_attribute").find("strong.attribute_name").text(a(this).val())}),a(".product_attributes").on("click","button.select_all_attributes",function(){return a(this).closest("td").find("select option").attr("selected","selected"),a(this).closest("td").find("select").trigger("chosen:updated"),!1}),a(".product_attributes").on("click","button.select_no_attributes",function(){return a(this).closest("td").find("select option").removeAttr("selected"),a(this).closest("td").find("select").trigger("chosen:updated"),!1}),a(".product_attributes").on("click","button.remove_row",function(){var b=confirm(woocommerce_admin_meta_boxes.remove_attribute);if(b){var d=a(this).parent().parent();d.is(".taxonomy")?(d.find("select, input[type=text]").val(""),d.hide()):(d.find("select, input[type=text]").val(""),d.hide(),c())}return!1}),a(".product_attributes").sortable({items:".woocommerce_attribute",cursor:"move",axis:"y",handle:"h3",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"wc-metabox-sortable-placeholder",start:function(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,b){b.item.removeAttr("style"),c()}}),a(".product_attributes").on("click","button.add_new_attribute",function(){a(".product_attributes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b=a(this).attr("data-attribute"),c=a(this).closest(".woocommerce_attribute_data"),d=prompt(woocommerce_admin_meta_boxes.new_attribute_prompt);if(d){var e={action:"woocommerce_add_new_attribute",taxonomy:b,term:d,security:woocommerce_admin_meta_boxes.add_attribute_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,e,function(b){b.error?alert(b.error):b.slug&&(c.find("select.attribute_values").append('"),c.find("select.attribute_values").trigger("chosen:updated")),a(".product_attributes").unblock()})}else a(".product_attributes").unblock();return!1}),a(".save_attributes").on("click",function(){a(".product_attributes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b={post_id:woocommerce_admin_meta_boxes.post_id,data:a(".product_attributes").find("input, select, textarea").serialize(),action:"woocommerce_save_attributes",security:woocommerce_admin_meta_boxes.save_attributes_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,b,function(){var b=window.location.toString();b=b.replace("post-new.php?","post.php?post="+woocommerce_admin_meta_boxes.post_id+"&action=edit&"),a("#variable_product_options").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a("#variable_product_options").load(b+" #variable_product_options_inner",function(){a("#variable_product_options").unblock()}),a(".product_attributes").unblock()})});var f,g;jQuery(document).on("click",".upload_file_button",function(b){var c=a(this);if(g=c.closest("tr").find("td.file_url input"),b.preventDefault(),f)return void f.open();var d=[new wp.media.controller.Library({library:wp.media.query(),multiple:!0,title:c.data("choose"),priority:20,filterable:"uploaded"})];f=wp.media.frames.downloadable_file=wp.media({title:c.data("choose"),library:{type:""},button:{text:c.data("update")},multiple:!0,states:d}),f.on("select",function(){var a="",b=f.state().get("selection");b.map(function(b){b=b.toJSON(),b.url&&(a=b.url)}),g.val(a)}),f.on("ready",function(){f.uploader.options.uploader.params={type:"downloadable_product"}}),f.open()}),jQuery(".downloadable_files tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:"td.sort",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65});var h,i=a("#product_image_gallery"),j=a("#product_images_container ul.product_images");jQuery(".add_product_images").on("click","a",function(b){var c=a(this),d=i.val();return b.preventDefault(),h?void h.open():(h=wp.media.frames.product_gallery=wp.media({title:c.data("choose"),button:{text:c.data("update")},states:[new wp.media.controller.Library({title:c.data("choose"),filterable:"all",multiple:!0})]}),h.on("select",function(){var a=h.state().get("selection");a.map(function(a){a=a.toJSON(),a.id&&(d=d?d+","+a.id:a.id,j.append('
  • "))}),i.val(d)}),void h.open())}),j.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,placeholder:"wc-metabox-sortable-placeholder",start:function(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,b){b.item.removeAttr("style")},update:function(){var b="";a("#product_images_container ul li.image").css("cursor","default").each(function(){var a=jQuery(this).attr("data-attachment_id");b=b+a+","}),i.val(b)}}),a("#product_images_container").on("click","a.delete",function(){a(this).closest("li.image").remove();var b="";return a("#product_images_container ul li.image").css("cursor","default").each(function(){var a=jQuery(this).attr("data-attachment_id");b=b+a+","}),i.val(b),runTipTip(),!1})}); \ No newline at end of file +jQuery(function(a){function b(){var b=a("select#product-type").val(),c=a("input#_virtual:checked").size(),d=a("input#_downloadable:checked").size(),e=".hide_if_downloadable, .hide_if_virtual",f=".show_if_downloadable, .show_if_virtual, .show_if_external";a.each(woocommerce_admin_meta_boxes.product_types,function(a,b){e=e+", .hide_if_"+b,f=f+", .show_if_"+b}),a(e).show(),a(f).hide(),d&&a(".show_if_downloadable").show(),c&&a(".show_if_virtual").show(),a(".show_if_"+b).show(),d&&a(".hide_if_downloadable").hide(),c&&a(".hide_if_virtual").hide(),a(".hide_if_"+b).hide(),a("input#_manage_stock").change()}function c(){a(".product_attributes .woocommerce_attribute").each(function(b,c){a(".attribute_position",c).val(parseInt(a(c).index(".product_attributes .woocommerce_attribute")))})}a(function(){a('[id$="-all"] > ul.categorychecklist').each(function(){var b=a(this),c=b.find(":checked").first();if(c.length){var d=b.find("input").position().top,e=c.position().top;b.closest(".tabs-panel").scrollTop(e-d+5)}})}),a("#upsell_product_data").bind("keypress",function(a){return 13==a.keyCode?!1:void 0}),a(".type_box").appendTo("#woocommerce-product-data h3.hndle span"),a(function(){a("#woocommerce-product-data h3.hndle").unbind("click.postboxes"),jQuery("#woocommerce-product-data").on("click","h3.hndle",function(b){a(b.target).filter("input, option, label, select").length||a("#woocommerce-product-data").toggleClass("closed")})}),a("#catalog-visibility .edit-catalog-visibility").click(function(){return a("#catalog-visibility-select").is(":hidden")&&(a("#catalog-visibility-select").slideDown("fast"),a(this).hide()),!1}),a("#catalog-visibility .save-post-visibility").click(function(){a("#catalog-visibility-select").slideUp("fast"),a("#catalog-visibility .edit-catalog-visibility").show();var b=(a("input[name=_visibility]:checked").val(),a("input[name=_visibility]:checked").attr("data-label"));return a("input[name=_featured]").is(":checked")&&(b=b+", "+woocommerce_admin_meta_boxes.featured_label,a("input[name=_featured]").attr("checked","checked")),a("#catalog-visibility-display").text(b),!1}),a("#catalog-visibility .cancel-post-visibility").click(function(){a("#catalog-visibility-select").slideUp("fast"),a("#catalog-visibility .edit-catalog-visibility").show();var b=a("#current_visibility").val(),c=a("#current_featured").val();a("input[name=_visibility]").removeAttr("checked"),a("input[name=_visibility][value="+b+"]").attr("checked","checked");var d=a("input[name=_visibility]:checked").attr("data-label");return"yes"==c?(d=d+", "+woocommerce_admin_meta_boxes.featured_label,a("input[name=_featured]").attr("checked","checked")):a("input[name=_featured]").removeAttr("checked"),a("#catalog-visibility-display").text(d),!1}),a("select#product-type").change(function(){var c=a(this).val();"variable"===c?(a("input#_manage_stock").change(),a("input#_downloadable").prop("checked",!1),a("input#_virtual").removeAttr("checked")):"grouped"===c?(a("input#_downloadable").prop("checked",!1),a("input#_virtual").removeAttr("checked")):"external"===c&&(a("input#_downloadable").prop("checked",!1),a("input#_virtual").removeAttr("checked")),b(),a("ul.wc-tabs li:visible").eq(0).find("a").click(),a("body").trigger("woocommerce-product-type-change",c,a(this))}).change(),a("body").on("woocommerce-product-type-change",function(b,c){"variable"!==c&&0d?-1:d>e?1:0}),a(e).each(function(b,c){a(".product_attributes").append(c)}),a(".product_attributes .woocommerce_attribute").each(function(b,c){"none"!=a(c).css("display")&&a(c).is(".taxonomy")&&a("select.attribute_taxonomy").find('option[value="'+a(c).data("taxonomy")+'"]').attr("disabled","disabled")}),a("button.add_attribute").on("click",function(){var b=a(".product_attributes .woocommerce_attribute").size(),d=a("select.attribute_taxonomy").val();if(d){var e=a(".product_attributes .woocommerce_attribute."+d);a(".product_attributes").append(a(e)),a(e).show().find(".woocommerce_attribute_data").show(),c(),a("select.attribute_taxonomy").find('option[value="'+d+'"]').attr("disabled","disabled")}else{var f=a("select#product-type").val();enable_variation="variable"!=f?'style="display:none;"':"",a(".product_attributes").append('

    ")}a("select.attribute_taxonomy").val("")}),a(".product_attributes").on("blur","input.attribute_name",function(){a(this).closest(".woocommerce_attribute").find("strong.attribute_name").text(a(this).val())}),a(".product_attributes").on("click","button.select_all_attributes",function(){return a(this).closest("td").find("select option").attr("selected","selected"),a(this).closest("td").find("select").trigger("chosen:updated"),!1}),a(".product_attributes").on("click","button.select_no_attributes",function(){return a(this).closest("td").find("select option").removeAttr("selected"),a(this).closest("td").find("select").trigger("chosen:updated"),!1}),a(".product_attributes").on("click","button.remove_row",function(){var b=confirm(woocommerce_admin_meta_boxes.remove_attribute);if(b){var d=a(this).parent().parent();d.is(".taxonomy")?(d.find("select, input[type=text]").val(""),d.hide(),a("select.attribute_taxonomy").find('option[value="'+d.data("taxonomy")+'"]').removeAttr("disabled")):(d.find("select, input[type=text]").val(""),d.hide(),c())}return!1}),a(".product_attributes").sortable({items:".woocommerce_attribute",cursor:"move",axis:"y",handle:"h3",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"wc-metabox-sortable-placeholder",start:function(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,b){b.item.removeAttr("style"),c()}}),a(".product_attributes").on("click","button.add_new_attribute",function(){a(".product_attributes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b=a(this).attr("data-attribute"),c=a(this).closest(".woocommerce_attribute_data"),d=prompt(woocommerce_admin_meta_boxes.new_attribute_prompt);if(d){var e={action:"woocommerce_add_new_attribute",taxonomy:b,term:d,security:woocommerce_admin_meta_boxes.add_attribute_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,e,function(b){b.error?alert(b.error):b.slug&&(c.find("select.attribute_values").append('"),c.find("select.attribute_values").trigger("chosen:updated")),a(".product_attributes").unblock()})}else a(".product_attributes").unblock();return!1}),a(".save_attributes").on("click",function(){a(".product_attributes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b={post_id:woocommerce_admin_meta_boxes.post_id,data:a(".product_attributes").find("input, select, textarea").serialize(),action:"woocommerce_save_attributes",security:woocommerce_admin_meta_boxes.save_attributes_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,b,function(){var b=window.location.toString();b=b.replace("post-new.php?","post.php?post="+woocommerce_admin_meta_boxes.post_id+"&action=edit&"),a("#variable_product_options").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a("#variable_product_options").load(b+" #variable_product_options_inner",function(){a("#variable_product_options").unblock()}),a(".product_attributes").unblock()})});var f,g;jQuery(document).on("click",".upload_file_button",function(b){var c=a(this);if(g=c.closest("tr").find("td.file_url input"),b.preventDefault(),f)return void f.open();var d=[new wp.media.controller.Library({library:wp.media.query(),multiple:!0,title:c.data("choose"),priority:20,filterable:"uploaded"})];f=wp.media.frames.downloadable_file=wp.media({title:c.data("choose"),library:{type:""},button:{text:c.data("update")},multiple:!0,states:d}),f.on("select",function(){var a="",b=f.state().get("selection");b.map(function(b){b=b.toJSON(),b.url&&(a=b.url)}),g.val(a)}),f.on("ready",function(){f.uploader.options.uploader.params={type:"downloadable_product"}}),f.open()}),jQuery(".downloadable_files tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:"td.sort",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65});var h,i=a("#product_image_gallery"),j=a("#product_images_container ul.product_images");jQuery(".add_product_images").on("click","a",function(b){var c=a(this),d=i.val();return b.preventDefault(),h?void h.open():(h=wp.media.frames.product_gallery=wp.media({title:c.data("choose"),button:{text:c.data("update")},states:[new wp.media.controller.Library({title:c.data("choose"),filterable:"all",multiple:!0})]}),h.on("select",function(){var a=h.state().get("selection");a.map(function(a){a=a.toJSON(),a.id&&(d=d?d+","+a.id:a.id,j.append('
  • "))}),i.val(d)}),void h.open())}),j.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,placeholder:"wc-metabox-sortable-placeholder",start:function(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,b){b.item.removeAttr("style")},update:function(){var b="";a("#product_images_container ul li.image").css("cursor","default").each(function(){var a=jQuery(this).attr("data-attachment_id");b=b+a+","}),i.val(b)}}),a("#product_images_container").on("click","a.delete",function(){a(this).closest("li.image").remove();var b="";return a("#product_images_container ul li.image").css("cursor","default").each(function(){var a=jQuery(this).attr("data-attachment_id");b=b+a+","}),i.val(b),runTipTip(),!1})}); \ No newline at end of file diff --git a/includes/admin/meta-boxes/class-wc-meta-box-product-data.php b/includes/admin/meta-boxes/class-wc-meta-box-product-data.php index 7c6173a2f9b..eef43356c4e 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-product-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-product-data.php @@ -445,7 +445,7 @@ class WC_Meta_Box_Product_Data { // Any set? $has_terms = ( is_wp_error( $post_terms ) || ! $post_terms || sizeof( $post_terms ) == 0 ) ? 0 : 1; ?> -
    > +
    >

    From 2e398a3a791ceb62efe2eeaefc646e08eb7fe5cc Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 26 Nov 2014 14:19:53 +0000 Subject: [PATCH 286/743] Decoupled the order summary and payments area. Both are updated independently via ajax fragments and can be moved around via actions. TEMPLATES OVERRIDING THESE TEMPLATES WILL NEED TO UPDATE THEIR FILES. Closes #5781 Closes #6570 --- assets/js/frontend/checkout.js | 20 +- assets/js/frontend/checkout.min.js | 2 +- includes/class-wc-ajax.php | 27 ++- includes/class-wc-payment-gateways.php | 14 ++ includes/wc-template-functions.php | 138 +++---------- includes/wc-template-hooks.php | 2 + readme.txt | 1 + templates/checkout/form-checkout.php | 16 +- templates/checkout/payment-method.php | 25 +++ templates/checkout/payment.php | 61 ++++++ templates/checkout/review-order.php | 264 +++++++++---------------- 11 files changed, 261 insertions(+), 309 deletions(-) create mode 100644 templates/checkout/payment-method.php create mode 100644 templates/checkout/payment.php diff --git a/assets/js/frontend/checkout.js b/assets/js/frontend/checkout.js index 52594552f0d..0e21d6d83e0 100644 --- a/assets/js/frontend/checkout.js +++ b/assets/js/frontend/checkout.js @@ -50,7 +50,7 @@ jQuery( function( $ ) { s_address_2 = address_2; } - $( '#order_methods, #order_review' ).block({ + $( '.woocommerce-checkout-payment, .woocommerce-checkout-review-order-table' ).block({ message: null, overlayCSS: { background: '#fff', @@ -82,15 +82,20 @@ jQuery( function( $ ) { type: 'POST', url: wc_checkout_params.ajax_url, data: data, - success: function( response ) { - if ( response ) { - $( '#order_review' ).html( $.trim( response ) ); - $( '#order_review' ).find( 'input[name=payment_method]:checked' ).trigger('click'); + success: function( data ) { + console.log( data ); + if ( data && data.fragments ) { + + $.each( data.fragments, function( key, value ) { + $( key ).replaceWith( value ); + $( key ).unblock(); + }); + + $( '.woocommerce-checkout' ).find( 'input[name=payment_method]:checked' ).trigger('click'); $( 'body' ).trigger('updated_checkout' ); } } }); - } // Event for updating the checkout @@ -123,7 +128,6 @@ jQuery( function( $ ) { }).change(); if ( wc_checkout_params.option_guest_checkout === 'yes' ) { - $( 'div.create-account' ).hide(); $( 'input#createaccount' ).change( function() { @@ -133,7 +137,6 @@ jQuery( function( $ ) { $( 'div.create-account' ).slideDown(); } }).change(); - } $( '#order_review' ) @@ -410,5 +413,4 @@ jQuery( function( $ ) { if ( wc_checkout_params.is_checkout === '1' ) { $( 'body' ).trigger( 'init_checkout' ); } - }); diff --git a/assets/js/frontend/checkout.min.js b/assets/js/frontend/checkout.min.js index f160f15807e..6b5eb9ba981 100644 --- a/assets/js/frontend/checkout.min.js +++ b/assets/js/frontend/checkout.min.js @@ -1 +1 @@ -jQuery(function(a){function b(){e&&e.abort();var b=[];a("select.shipping_method, input[name^=shipping_method][type=radio]:checked, input[name^=shipping_method][type=hidden]").each(function(){b[a(this).data("index")]=a(this).val()});var c,d,f,g,h,i,j=a("#order_review input[name=payment_method]:checked").val(),k=a("#billing_country").val(),l=a("#billing_state").val(),m=a("input#billing_postcode").val(),n=a("#billing_city").val(),o=a("input#billing_address_1").val(),p=a("input#billing_address_2").val();a("#ship-to-different-address input").is(":checked")?(c=a("#shipping_country").val(),d=a("#shipping_state").val(),f=a("input#shipping_postcode").val(),g=a("#shipping_city").val(),h=a("input#shipping_address_1").val(),i=a("input#shipping_address_2").val()):(c=k,d=l,f=m,g=n,h=o,i=p),a("#order_methods, #order_review").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var q={action:"woocommerce_update_order_review",security:wc_checkout_params.update_order_review_nonce,shipping_method:b,payment_method:j,country:k,state:l,postcode:m,city:n,address:o,address_2:p,s_country:c,s_state:d,s_postcode:f,s_city:g,s_address:h,s_address_2:i,post_data:a("form.checkout").serialize()};e=a.ajax({type:"POST",url:wc_checkout_params.ajax_url,data:q,success:function(b){b&&(a("#order_review").html(a.trim(b)),a("#order_review").find("input[name=payment_method]:checked").trigger("click"),a("body").trigger("updated_checkout"))}})}function c(){var b=!0;a(f).size()&&($required_inputs=a(f).closest("div").find(".address-field.validate-required"),$required_inputs.size()&&$required_inputs.each(function(){""===a(this).find("input.input-text").val()&&(b=!1)})),b&&(f=!1,a("body").trigger("update_checkout"))}if(a.blockUI.defaults.overlayCSS.cursor="default","undefined"==typeof wc_checkout_params)return!1;var d,e,f=!1;a("body").bind("update_checkout",function(){clearTimeout(d),b()}),a(".checkout_coupon, div.shipping_address").hide(),a("a.showlogin").click(function(){return a("form.login").slideToggle(),!1}),a("a.showcoupon").click(function(){return a(".checkout_coupon").slideToggle(400,function(){a("#coupon_code").focus()}),!1}),a("#ship-to-different-address input").change(function(){a("div.shipping_address").hide(),a(this).is(":checked")&&a("div.shipping_address").slideDown()}).change(),"yes"===wc_checkout_params.option_guest_checkout&&(a("div.create-account").hide(),a("input#createaccount").change(function(){a("div.create-account").hide(),a(this).is(":checked")&&a("div.create-account").slideDown()}).change()),a("#order_review").on("click",".payment_methods input.input-radio",function(){if(a(".payment_methods input.input-radio").length>1){var b=a("div.payment_box."+a(this).attr("ID"));a(this).is(":checked")&&!b.is(":visible")&&(a("div.payment_box").filter(":visible").slideUp(250),a(this).is(":checked")&&a("div.payment_box."+a(this).attr("ID")).slideDown(250))}else a("div.payment_box").show();a("#place_order").val(a(this).data("order_button_text")?a(this).data("order_button_text"):a("#place_order").data("value"))}).find("input[name=payment_method]:checked").click(),a("form.checkout").on("input change","select.shipping_method, input[name^=shipping_method], #ship-to-different-address input, .update_totals_on_change select, .update_totals_on_change input[type=radio]",function(){clearTimeout(d),f=!1,a("body").trigger("update_checkout")}).on("change",".address-field input.input-text, .update_totals_on_change input.input-text",function(){f&&c()}).on("input change",".address-field select",function(){f=this,c()}).on("input keydown",".address-field input.input-text, .update_totals_on_change input.input-text",function(a){var b=a.keyCode||a.which||0;return 9===b?!0:(f=this,clearTimeout(d),void(d=setTimeout(c,"1000")))}).on("blur input change",".input-text, select",function(){var b=a(this),c=b.closest(".form-row"),d=!0;if(c.is(".validate-required")&&""===b.val()&&(c.removeClass("woocommerce-validated").addClass("woocommerce-invalid woocommerce-invalid-required-field"),d=!1),c.is(".validate-email")&&b.val()){var e=new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);e.test(b.val())||(c.removeClass("woocommerce-validated").addClass("woocommerce-invalid woocommerce-invalid-email"),d=!1)}d&&c.removeClass("woocommerce-invalid woocommerce-invalid-required-field").addClass("woocommerce-validated")}).submit(function(){clearTimeout(d);var b=a(this);if(b.is(".processing"))return!1;if(b.triggerHandler("checkout_place_order")!==!1&&b.triggerHandler("checkout_place_order_"+a("#order_review input[name=payment_method]:checked").val())!==!1){b.addClass("processing");var c=b.data();1!=c["blockUI.isBlocked"]&&b.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({type:"POST",url:wc_checkout_params.checkout_url,data:b.serialize(),success:function(c){var d="";try{if(c.indexOf("")>=0&&(c=c.split("")[1]),c.indexOf("")>=0&&(c=c.split("")[0]),d=a.parseJSON(c),"success"!==d.result)throw"failure"===d.result?"Result failure":"Invalid response";window.location=-1!=d.redirect.indexOf("https://")||-1!=d.redirect.indexOf("http://")?d.redirect:decodeURI(d.redirect)}catch(e){if("true"===d.reload)return void window.location.reload();a(".woocommerce-error, .woocommerce-message").remove(),b.prepend(d.messages?d.messages:c),b.removeClass("processing").unblock(),b.find(".input-text, select").blur(),a("html, body").animate({scrollTop:a("form.checkout").offset().top-100},1e3),"true"===d.refresh&&a("body").trigger("update_checkout"),a("body").trigger("checkout_error")}},dataType:"html"})}return!1}),a("form.checkout_coupon").submit(function(){var b=a(this);if(b.is(".processing"))return!1;b.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_apply_coupon",security:wc_checkout_params.apply_coupon_nonce,coupon_code:b.find("input[name=coupon_code]").val()};return a.ajax({type:"POST",url:wc_checkout_params.ajax_url,data:c,success:function(c){a(".woocommerce-error, .woocommerce-message").remove(),b.removeClass("processing").unblock(),c&&(b.before(c),b.slideUp(),a("body").trigger("update_checkout"))},dataType:"html"}),!1}),a("body").bind("init_checkout",function(){a("#billing_country, #shipping_country, .country_to_state").change(),a("body").trigger("update_checkout")}),"1"===wc_checkout_params.is_checkout&&a("body").trigger("init_checkout")}); \ No newline at end of file +jQuery(function(a){function b(){e&&e.abort();var b=[];a("select.shipping_method, input[name^=shipping_method][type=radio]:checked, input[name^=shipping_method][type=hidden]").each(function(){b[a(this).data("index")]=a(this).val()});var c,d,f,g,h,i,j=a("#order_review input[name=payment_method]:checked").val(),k=a("#billing_country").val(),l=a("#billing_state").val(),m=a("input#billing_postcode").val(),n=a("#billing_city").val(),o=a("input#billing_address_1").val(),p=a("input#billing_address_2").val();a("#ship-to-different-address input").is(":checked")?(c=a("#shipping_country").val(),d=a("#shipping_state").val(),f=a("input#shipping_postcode").val(),g=a("#shipping_city").val(),h=a("input#shipping_address_1").val(),i=a("input#shipping_address_2").val()):(c=k,d=l,f=m,g=n,h=o,i=p),a(".woocommerce-checkout-payment, .woocommerce-checkout-review-order-table").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var q={action:"woocommerce_update_order_review",security:wc_checkout_params.update_order_review_nonce,shipping_method:b,payment_method:j,country:k,state:l,postcode:m,city:n,address:o,address_2:p,s_country:c,s_state:d,s_postcode:f,s_city:g,s_address:h,s_address_2:i,post_data:a("form.checkout").serialize()};e=a.ajax({type:"POST",url:wc_checkout_params.ajax_url,data:q,success:function(b){console.log(b),b&&b.fragments&&(a.each(b.fragments,function(b,c){a(b).replaceWith(c),a(b).unblock()}),a(".woocommerce-checkout").find("input[name=payment_method]:checked").trigger("click"),a("body").trigger("updated_checkout"))}})}function c(){var b=!0;a(f).size()&&($required_inputs=a(f).closest("div").find(".address-field.validate-required"),$required_inputs.size()&&$required_inputs.each(function(){""===a(this).find("input.input-text").val()&&(b=!1)})),b&&(f=!1,a("body").trigger("update_checkout"))}if(a.blockUI.defaults.overlayCSS.cursor="default","undefined"==typeof wc_checkout_params)return!1;var d,e,f=!1;a("body").bind("update_checkout",function(){clearTimeout(d),b()}),a(".checkout_coupon, div.shipping_address").hide(),a("a.showlogin").click(function(){return a("form.login").slideToggle(),!1}),a("a.showcoupon").click(function(){return a(".checkout_coupon").slideToggle(400,function(){a("#coupon_code").focus()}),!1}),a("#ship-to-different-address input").change(function(){a("div.shipping_address").hide(),a(this).is(":checked")&&a("div.shipping_address").slideDown()}).change(),"yes"===wc_checkout_params.option_guest_checkout&&(a("div.create-account").hide(),a("input#createaccount").change(function(){a("div.create-account").hide(),a(this).is(":checked")&&a("div.create-account").slideDown()}).change()),a("#order_review").on("click",".payment_methods input.input-radio",function(){if(a(".payment_methods input.input-radio").length>1){var b=a("div.payment_box."+a(this).attr("ID"));a(this).is(":checked")&&!b.is(":visible")&&(a("div.payment_box").filter(":visible").slideUp(250),a(this).is(":checked")&&a("div.payment_box."+a(this).attr("ID")).slideDown(250))}else a("div.payment_box").show();a("#place_order").val(a(this).data("order_button_text")?a(this).data("order_button_text"):a("#place_order").data("value"))}).find("input[name=payment_method]:checked").click(),a("form.checkout").on("input change","select.shipping_method, input[name^=shipping_method], #ship-to-different-address input, .update_totals_on_change select, .update_totals_on_change input[type=radio]",function(){clearTimeout(d),f=!1,a("body").trigger("update_checkout")}).on("change",".address-field input.input-text, .update_totals_on_change input.input-text",function(){f&&c()}).on("input change",".address-field select",function(){f=this,c()}).on("input keydown",".address-field input.input-text, .update_totals_on_change input.input-text",function(a){var b=a.keyCode||a.which||0;return 9===b?!0:(f=this,clearTimeout(d),void(d=setTimeout(c,"1000")))}).on("blur input change",".input-text, select",function(){var b=a(this),c=b.closest(".form-row"),d=!0;if(c.is(".validate-required")&&""===b.val()&&(c.removeClass("woocommerce-validated").addClass("woocommerce-invalid woocommerce-invalid-required-field"),d=!1),c.is(".validate-email")&&b.val()){var e=new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);e.test(b.val())||(c.removeClass("woocommerce-validated").addClass("woocommerce-invalid woocommerce-invalid-email"),d=!1)}d&&c.removeClass("woocommerce-invalid woocommerce-invalid-required-field").addClass("woocommerce-validated")}).submit(function(){clearTimeout(d);var b=a(this);if(b.is(".processing"))return!1;if(b.triggerHandler("checkout_place_order")!==!1&&b.triggerHandler("checkout_place_order_"+a("#order_review input[name=payment_method]:checked").val())!==!1){b.addClass("processing");var c=b.data();1!=c["blockUI.isBlocked"]&&b.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({type:"POST",url:wc_checkout_params.checkout_url,data:b.serialize(),success:function(c){var d="";try{if(c.indexOf("")>=0&&(c=c.split("")[1]),c.indexOf("")>=0&&(c=c.split("")[0]),d=a.parseJSON(c),"success"!==d.result)throw"failure"===d.result?"Result failure":"Invalid response";window.location=-1!=d.redirect.indexOf("https://")||-1!=d.redirect.indexOf("http://")?d.redirect:decodeURI(d.redirect)}catch(e){if("true"===d.reload)return void window.location.reload();a(".woocommerce-error, .woocommerce-message").remove(),b.prepend(d.messages?d.messages:c),b.removeClass("processing").unblock(),b.find(".input-text, select").blur(),a("html, body").animate({scrollTop:a("form.checkout").offset().top-100},1e3),"true"===d.refresh&&a("body").trigger("update_checkout"),a("body").trigger("checkout_error")}},dataType:"html"})}return!1}),a("form.checkout_coupon").submit(function(){var b=a(this);if(b.is(".processing"))return!1;b.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_apply_coupon",security:wc_checkout_params.apply_coupon_nonce,coupon_code:b.find("input[name=coupon_code]").val()};return a.ajax({type:"POST",url:wc_checkout_params.ajax_url,data:c,success:function(c){a(".woocommerce-error, .woocommerce-message").remove(),b.removeClass("processing").unblock(),c&&(b.before(c),b.slideUp(),a("body").trigger("update_checkout"))},dataType:"html"}),!1}),a("body").bind("init_checkout",function(){a("#billing_country, #shipping_country, .country_to_state").change(),a("body").trigger("update_checkout")}),"1"===wc_checkout_params.is_checkout&&a("body").trigger("init_checkout")}); \ No newline at end of file diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 1a6929861d4..c2be06f5425 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -150,6 +150,7 @@ class WC_AJAX { * AJAX update order review on checkout */ public static function update_order_review() { + ob_start(); check_ajax_referer( 'update-order-review', 'security' ); @@ -158,7 +159,14 @@ class WC_AJAX { } if ( 0 == sizeof( WC()->cart->get_cart() ) ) { - echo '
    ' . __( 'Sorry, your session has expired.', 'woocommerce' ) . ' ' . __( 'Return to homepage', 'woocommerce' ) . '
    '; + $data = array( + 'fragments' => apply_filters( 'woocommerce_update_order_review_fragments', array( + '.woocommerce-checkout' => '
    ' . __( 'Sorry, your session has expired.', 'woocommerce' ) . ' ' . __( 'Return to homepage', 'woocommerce' ) . '
    ' + ) ) + ); + + wp_send_json( $data ); + die(); } @@ -253,7 +261,22 @@ class WC_AJAX { WC()->cart->calculate_totals(); - do_action( 'woocommerce_checkout_order_review', true ); // Display review order table + ob_start(); + woocommerce_order_review(); + $woocommerce_order_review = ob_get_clean(); + + ob_start(); + woocommerce_checkout_payment(); + $woocommerce_checkout_payment = ob_get_clean(); + + $data = array( + 'fragments' => apply_filters( 'woocommerce_update_order_review_fragments', array( + '.woocommerce-checkout-review-order-table' => $woocommerce_order_review, + '.woocommerce-checkout-payment' => $woocommerce_checkout_payment + ) ) + ); + + wp_send_json( $data ); die(); } diff --git a/includes/class-wc-payment-gateways.php b/includes/class-wc-payment-gateways.php index e3a60f70f35..14c924f0090 100644 --- a/includes/class-wc-payment-gateways.php +++ b/includes/class-wc-payment-gateways.php @@ -151,6 +151,20 @@ class WC_Payment_Gateways { return apply_filters( 'woocommerce_available_payment_gateways', $_available_gateways ); } + /** + * Set the current, active gateway + */ + public function set_current_gateway( $gateways ) { + $default = get_option( 'woocommerce_default_gateway', current( array_keys( $gateways ) ) ); + $current = WC()->session->get( 'chosen_payment_method', $default ); + + if ( isset( $gateways[ $current ] ) ) { + $gateways[ $current ]->set_current(); + } elseif ( isset( $gateways[ $default ] ) ) { + $gateways[ $default ]->set_current(); + } + } + /** * Save options in admin. * diff --git a/includes/wc-template-functions.php b/includes/wc-template-functions.php index 7e84cf4bf15..9cb99daa51a 100644 --- a/includes/wc-template-functions.php +++ b/includes/wc-template-functions.php @@ -110,9 +110,7 @@ if ( ! function_exists( 'woocommerce_reset_loop' ) ) { /** * Reset the loop's index and columns when we're done outputting a product loop. * - * @access public * @subpackage Loop - * @return void */ function woocommerce_reset_loop() { global $woocommerce_loop; @@ -291,8 +289,6 @@ if ( ! function_exists( 'woocommerce_content' ) ) { * which people can add to their themes to add basic woocommerce support * without hooks or modifying core templates. * - * @access public - * @return void */ function woocommerce_content() { @@ -349,8 +345,6 @@ if ( ! function_exists( 'woocommerce_output_content_wrapper' ) ) { /** * Output the start of the page wrapper. * - * @access public - * @return void */ function woocommerce_output_content_wrapper() { wc_get_template( 'global/wrapper-start.php' ); @@ -361,8 +355,6 @@ if ( ! function_exists( 'woocommerce_output_content_wrapper_end' ) ) { /** * Output the end of the page wrapper. * - * @access public - * @return void */ function woocommerce_output_content_wrapper_end() { wc_get_template( 'global/wrapper-end.php' ); @@ -374,8 +366,6 @@ if ( ! function_exists( 'woocommerce_get_sidebar' ) ) { /** * Get the shop sidebar template. * - * @access public - * @return void */ function woocommerce_get_sidebar() { wc_get_template( 'global/sidebar.php' ); @@ -387,8 +377,6 @@ if ( ! function_exists( 'woocommerce_demo_store' ) ) { /** * Adds a demo store banner to the site if enabled * - * @access public - * @return void */ function woocommerce_demo_store() { if ( !is_store_notice_showing() ) @@ -445,7 +433,6 @@ if ( ! function_exists( 'woocommerce_product_loop_start' ) ) { /** * Output the start of a product loop. By default this is a UL * - * @access public * @param bool $echo * @return string */ @@ -463,7 +450,6 @@ if ( ! function_exists( 'woocommerce_product_loop_end' ) ) { /** * Output the end of a product loop. By default this is a UL * - * @access public * @param bool $echo * @return string */ @@ -483,9 +469,7 @@ if ( ! function_exists( 'woocommerce_taxonomy_archive_description' ) ) { /** * Show an archive description on taxonomy archives * - * @access public * @subpackage Archives - * @return void */ function woocommerce_taxonomy_archive_description() { if ( is_tax( array( 'product_cat', 'product_tag' ) ) && get_query_var( 'paged' ) == 0 ) { @@ -501,9 +485,7 @@ if ( ! function_exists( 'woocommerce_product_archive_description' ) ) { /** * Show a shop page description on product archives * - * @access public * @subpackage Archives - * @return void */ function woocommerce_product_archive_description() { if ( is_post_type_archive( 'product' ) && get_query_var( 'paged' ) == 0 ) { @@ -523,9 +505,7 @@ if ( ! function_exists( 'woocommerce_template_loop_add_to_cart' ) ) { /** * Get the add to cart template for the loop. * - * @access public * @subpackage Loop - * @return void */ function woocommerce_template_loop_add_to_cart( $args = array() ) { wc_get_template( 'loop/add-to-cart.php' , $args ); @@ -536,9 +516,7 @@ if ( ! function_exists( 'woocommerce_template_loop_product_thumbnail' ) ) { /** * Get the product thumbnail for the loop. * - * @access public * @subpackage Loop - * @return void */ function woocommerce_template_loop_product_thumbnail() { echo woocommerce_get_product_thumbnail(); @@ -549,9 +527,7 @@ if ( ! function_exists( 'woocommerce_template_loop_price' ) ) { /** * Get the product price for the loop. * - * @access public * @subpackage Loop - * @return void */ function woocommerce_template_loop_price() { wc_get_template( 'loop/price.php' ); @@ -562,9 +538,7 @@ if ( ! function_exists( 'woocommerce_template_loop_rating' ) ) { /** * Display the average rating in the loop * - * @access public * @subpackage Loop - * @return void */ function woocommerce_template_loop_rating() { wc_get_template( 'loop/rating.php' ); @@ -575,9 +549,7 @@ if ( ! function_exists( 'woocommerce_show_product_loop_sale_flash' ) ) { /** * Get the sale flash for the loop. * - * @access public * @subpackage Loop - * @return void */ function woocommerce_show_product_loop_sale_flash() { wc_get_template( 'loop/sale-flash.php' ); @@ -619,7 +591,6 @@ if ( ! function_exists( 'woocommerce_get_product_thumbnail' ) ) { /** * Get the product thumbnail, or the placeholder if not set. * - * @access public * @subpackage Loop * @param string $size (default: 'shop_catalog') * @param int $placeholder_width (default: 0) @@ -642,9 +613,7 @@ if ( ! function_exists( 'woocommerce_result_count' ) ) { /** * Output the result count text (Showing x - x of x results). * - * @access public * @subpackage Loop - * @return void */ function woocommerce_result_count() { wc_get_template( 'loop/result-count.php' ); @@ -656,9 +625,7 @@ if ( ! function_exists( 'woocommerce_catalog_ordering' ) ) { /** * Output the product sorting options. * - * @access public * @subpackage Loop - * @return void */ function woocommerce_catalog_ordering() { global $wp_query; @@ -695,9 +662,7 @@ if ( ! function_exists( 'woocommerce_pagination' ) ) { /** * Output the pagination. * - * @access public * @subpackage Loop - * @return void */ function woocommerce_pagination() { wc_get_template( 'loop/pagination.php' ); @@ -711,9 +676,7 @@ if ( ! function_exists( 'woocommerce_show_product_images' ) ) { /** * Output the product image before the single product summary. * - * @access public * @subpackage Product - * @return void */ function woocommerce_show_product_images() { wc_get_template( 'single-product/product-image.php' ); @@ -724,9 +687,7 @@ if ( ! function_exists( 'woocommerce_show_product_thumbnails' ) ) { /** * Output the product thumbnails. * - * @access public * @subpackage Product - * @return void */ function woocommerce_show_product_thumbnails() { wc_get_template( 'single-product/product-thumbnails.php' ); @@ -737,9 +698,7 @@ if ( ! function_exists( 'woocommerce_output_product_data_tabs' ) ) { /** * Output the product tabs. * - * @access public * @subpackage Product/Tabs - * @return void */ function woocommerce_output_product_data_tabs() { wc_get_template( 'single-product/tabs/tabs.php' ); @@ -750,9 +709,7 @@ if ( ! function_exists( 'woocommerce_template_single_title' ) ) { /** * Output the product title. * - * @access public * @subpackage Product - * @return void */ function woocommerce_template_single_title() { wc_get_template( 'single-product/title.php' ); @@ -763,9 +720,7 @@ if ( ! function_exists( 'woocommerce_template_single_rating' ) ) { /** * Output the product rating. * - * @access public * @subpackage Product - * @return void */ function woocommerce_template_single_rating() { wc_get_template( 'single-product/rating.php' ); @@ -776,9 +731,7 @@ if ( ! function_exists( 'woocommerce_template_single_price' ) ) { /** * Output the product price. * - * @access public * @subpackage Product - * @return void */ function woocommerce_template_single_price() { wc_get_template( 'single-product/price.php' ); @@ -789,9 +742,7 @@ if ( ! function_exists( 'woocommerce_template_single_excerpt' ) ) { /** * Output the product short description (excerpt). * - * @access public * @subpackage Product - * @return void */ function woocommerce_template_single_excerpt() { wc_get_template( 'single-product/short-description.php' ); @@ -802,9 +753,7 @@ if ( ! function_exists( 'woocommerce_template_single_meta' ) ) { /** * Output the product meta. * - * @access public * @subpackage Product - * @return void */ function woocommerce_template_single_meta() { wc_get_template( 'single-product/meta.php' ); @@ -815,9 +764,7 @@ if ( ! function_exists( 'woocommerce_template_single_sharing' ) ) { /** * Output the product sharing. * - * @access public * @subpackage Product - * @return void */ function woocommerce_template_single_sharing() { wc_get_template( 'single-product/share.php' ); @@ -828,9 +775,7 @@ if ( ! function_exists( 'woocommerce_show_product_sale_flash' ) ) { /** * Output the product sale flash. * - * @access public * @subpackage Product - * @return void */ function woocommerce_show_product_sale_flash() { wc_get_template( 'single-product/sale-flash.php' ); @@ -842,9 +787,7 @@ if ( ! function_exists( 'woocommerce_template_single_add_to_cart' ) ) { /** * Trigger the single product add to cart action. * - * @access public * @subpackage Product - * @return void */ function woocommerce_template_single_add_to_cart() { global $product; @@ -856,9 +799,7 @@ if ( ! function_exists( 'woocommerce_simple_add_to_cart' ) ) { /** * Output the simple product add to cart area. * - * @access public * @subpackage Product - * @return void */ function woocommerce_simple_add_to_cart() { wc_get_template( 'single-product/add-to-cart/simple.php' ); @@ -869,9 +810,7 @@ if ( ! function_exists( 'woocommerce_grouped_add_to_cart' ) ) { /** * Output the grouped product add to cart area. * - * @access public * @subpackage Product - * @return void */ function woocommerce_grouped_add_to_cart() { global $product; @@ -888,9 +827,7 @@ if ( ! function_exists( 'woocommerce_variable_add_to_cart' ) ) { /** * Output the variable product add to cart area. * - * @access public * @subpackage Product - * @return void */ function woocommerce_variable_add_to_cart() { global $product; @@ -911,9 +848,7 @@ if ( ! function_exists( 'woocommerce_external_add_to_cart' ) ) { /** * Output the external product add to cart area. * - * @access public * @subpackage Product - * @return void */ function woocommerce_external_add_to_cart() { global $product; @@ -935,8 +870,7 @@ if ( ! function_exists( 'woocommerce_quantity_input' ) ) { * * @param array $args Args for the input * @param WC_Product|null $product - * @param boolean $echo Whether to return or echo - * @return void|string + * @param boolean $echo Whether to return or echo|string */ function woocommerce_quantity_input( $args = array(), $product = null, $echo = true ) { if ( is_null( $product ) ) @@ -969,9 +903,7 @@ if ( ! function_exists( 'woocommerce_product_description_tab' ) ) { /** * Output the description tab content. * - * @access public * @subpackage Product/Tabs - * @return void */ function woocommerce_product_description_tab() { wc_get_template( 'single-product/tabs/description.php' ); @@ -982,9 +914,7 @@ if ( ! function_exists( 'woocommerce_product_additional_information_tab' ) ) { /** * Output the attributes tab content. * - * @access public * @subpackage Product/Tabs - * @return void */ function woocommerce_product_additional_information_tab() { wc_get_template( 'single-product/tabs/additional-information.php' ); @@ -995,9 +925,7 @@ if ( ! function_exists( 'woocommerce_product_reviews_tab' ) ) { /** * Output the reviews tab content. * - * @access public * @subpackage Product/Tabs - * @return void */ function woocommerce_product_reviews_tab() { wc_get_template( 'single-product/tabs/reviews.php' ); @@ -1009,7 +937,6 @@ if ( ! function_exists( 'woocommerce_default_product_tabs' ) ) { /** * Add default product tabs to product pages. * - * @access public * @param array $tabs * @return array */ @@ -1052,7 +979,6 @@ if ( ! function_exists( 'woocommerce_sort_product_tabs' ) ) { /** * Sort tabs by priority * - * @access public * @param array $tabs * @return array */ @@ -1084,9 +1010,7 @@ if ( ! function_exists( 'woocommerce_comments' ) ) { /** * Output the Review comments template. * - * @access public * @subpackage Product - * @return void */ function woocommerce_comments( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; @@ -1099,9 +1023,7 @@ if ( ! function_exists( 'woocommerce_output_related_products' ) ) { /** * Output the related products. * - * @access public * @subpackage Product - * @return void */ function woocommerce_output_related_products() { @@ -1120,11 +1042,9 @@ if ( ! function_exists( 'woocommerce_related_products' ) ) { /** * Output the related products. * - * @access public * @param array Provided arguments * @param bool Columns argument for backwards compat * @param bool Order by argument for backwards compat - * @return void */ function woocommerce_related_products( $args = array(), $columns = false, $orderby = false ) { if ( ! is_array( $args ) ) { @@ -1156,11 +1076,9 @@ if ( ! function_exists( 'woocommerce_upsell_display' ) ) { /** * Output product up sells. * - * @access public * @param int $posts_per_page (default: -1) * @param int $columns (default: 2) * @param string $orderby (default: 'rand') - * @return void */ function woocommerce_upsell_display( $posts_per_page = '-1', $columns = 2, $orderby = 'rand' ) { wc_get_template( 'single-product/up-sells.php', array( @@ -1178,9 +1096,7 @@ if ( ! function_exists( 'woocommerce_shipping_calculator' ) ) { /** * Output the cart shipping calculator. * - * @access public * @subpackage Cart - * @return void */ function woocommerce_shipping_calculator() { wc_get_template( 'cart/shipping-calculator.php' ); @@ -1192,9 +1108,7 @@ if ( ! function_exists( 'woocommerce_cart_totals' ) ) { /** * Output the cart totals. * - * @access public * @subpackage Cart - * @return void */ function woocommerce_cart_totals() { wc_get_template( 'cart/cart-totals.php' ); @@ -1224,9 +1138,7 @@ if ( ! function_exists( 'woocommerce_button_proceed_to_checkout' ) ) { /** * Output the proceed to checkout button. * - * @access public * @subpackage Cart - * @return void */ function woocommerce_button_proceed_to_checkout() { $checkout_url = WC()->cart->get_checkout_url(); @@ -1246,8 +1158,6 @@ if ( ! function_exists( 'woocommerce_mini_cart' ) ) { /** * Output the Mini-cart - used by cart widget * - * @access public - * @return void */ function woocommerce_mini_cart( $args = array() ) { @@ -1268,9 +1178,7 @@ if ( ! function_exists( 'woocommerce_login_form' ) ) { /** * Output the WooCommerce Login Form * - * @access public * @subpackage Forms - * @return void */ function woocommerce_login_form( $args = array() ) { @@ -1291,9 +1199,7 @@ if ( ! function_exists( 'woocommerce_checkout_login_form' ) ) { /** * Output the WooCommerce Checkout Login Form * - * @access public * @subpackage Checkout - * @return void */ function woocommerce_checkout_login_form() { wc_get_template( 'checkout/form-login.php', array( 'checkout' => WC()->checkout() ) ); @@ -1305,8 +1211,6 @@ if ( ! function_exists( 'woocommerce_breadcrumb' ) ) { /** * Output the WooCommerce Breadcrumb * - * @access public - * @return void */ function woocommerce_breadcrumb( $args = array() ) { @@ -1330,12 +1234,33 @@ if ( ! function_exists( 'woocommerce_order_review' ) ) { /** * Output the Order review table for the checkout. * - * @access public * @subpackage Checkout - * @return void */ - function woocommerce_order_review( $is_ajax = false ) { - wc_get_template( 'checkout/review-order.php', array( 'checkout' => WC()->checkout(), 'is_ajax' => $is_ajax ) ); + function woocommerce_order_review( $deprecated = false ) { + wc_get_template( 'checkout/review-order.php', array( 'checkout' => WC()->checkout() ) ); + } +} + +if ( ! function_exists( 'woocommerce_checkout_payment' ) ) { + + /** + * Output the Payment Methods on the checkout + * + * @subpackage Checkout + */ + function woocommerce_checkout_payment() { + if ( WC()->cart->needs_payment() ) { + $available_gateways = WC()->payment_gateways()->get_available_payment_gateways(); + WC()->payment_gateways()->set_current_gateway( $available_gateways ); + } else { + $available_gateways = array(); + } + + wc_get_template( 'checkout/payment.php', array( + 'checkout' => WC()->checkout(), + 'available_gateways' => WC()->payment_gateways()->get_available_payment_gateways(), + 'order_button_text' => apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) ) + ) ); } } @@ -1344,9 +1269,7 @@ if ( ! function_exists( 'woocommerce_checkout_coupon_form' ) ) { /** * Output the Coupon form for the checkout. * - * @access public * @subpackage Checkout - * @return void */ function woocommerce_checkout_coupon_form() { wc_get_template( 'checkout/form-coupon.php', array( 'checkout' => WC()->checkout() ) ); @@ -1358,7 +1281,6 @@ if ( ! function_exists( 'woocommerce_products_will_display' ) ) { /** * Check if we will be showing products or not (and not subcats only) * - * @access public * @subpackage Loop * @return bool */ @@ -1438,7 +1360,6 @@ if ( ! function_exists( 'woocommerce_product_subcategories' ) ) { /** * Display product sub categories as thumbnails. * - * @access public * @subpackage Loop * @param array $args * @return null|boolean @@ -1550,10 +1471,8 @@ if ( ! function_exists( 'woocommerce_subcategory_thumbnail' ) ) { /** * Show subcategory thumbnails. * - * @access public * @param mixed $category * @subpackage Loop - * @return void */ function woocommerce_subcategory_thumbnail( $category ) { $small_thumbnail_size = apply_filters( 'single_product_small_thumbnail_size', 'shop_catalog' ); @@ -1582,10 +1501,8 @@ if ( ! function_exists( 'woocommerce_order_details_table' ) ) { /** * Displays order details in a table. * - * @access public * @param mixed $order_id * @subpackage Orders - * @return void */ function woocommerce_order_details_table( $order_id ) { if ( ! $order_id ) return; @@ -1602,7 +1519,6 @@ if ( ! function_exists( 'woocommerce_order_again_button' ) ) { /** * Display an 'order again' button on the view order page. * - * @access public * @param object $order * @subpackage Orders */ @@ -1624,12 +1540,10 @@ if ( ! function_exists( 'woocommerce_form_field' ) ) { /** * Outputs a checkout/address form field. * - * @access public * @subpackage Forms * @param mixed $key * @param mixed $args * @param string $value (default: null) - * @return void * @todo This function needs to be broken up in smaller pieces */ function woocommerce_form_field( $key, $args, $value = null ) { diff --git a/includes/wc-template-hooks.php b/includes/wc-template-hooks.php index 4afa95d15f5..84fac1de4cd 100644 --- a/includes/wc-template-hooks.php +++ b/includes/wc-template-hooks.php @@ -172,6 +172,8 @@ add_filter( 'woocommerce_product_tabs', 'woocommerce_sort_product_tabs', 99 ); add_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_login_form', 10 ); add_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 ); add_action( 'woocommerce_checkout_order_review', 'woocommerce_order_review', 10 ); +add_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 ); + /** * Cart diff --git a/readme.txt b/readme.txt index 0ad2ea7bd16..b31ddb83868 100644 --- a/readme.txt +++ b/readme.txt @@ -160,6 +160,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Dev - Made template debug mode set WC_TEMPLATE_DEBUG_MODE constant and remove all overrides for all template loading functions. * Dev - Switched to .scss from .less for all styles. * Dev - Included bourbon for scss mixins. +* Dev - Decoupled the order summary and payments area. Both are updated independently via ajax fragments and can be moved around via actions. TEMPLATES OVERRIDING THESE TEMPLATES WILL NEED TO UPDATE THEIR FILES. * Localisation - Add Ukrainian currency and symbol. = 2.2.5 - 07/10/2014 = diff --git a/templates/checkout/form-checkout.php b/templates/checkout/form-checkout.php index 476db318de9..850297e04c4 100644 --- a/templates/checkout/form-checkout.php +++ b/templates/checkout/form-checkout.php @@ -4,11 +4,11 @@ * * @author WooThemes * @package WooCommerce/Templates - * @version 2.0.0 + * @version 2.3.0 */ if ( ! defined( 'ABSPATH' ) ) { - exit; // Exit if accessed directly + exit; } wc_print_notices(); @@ -24,26 +24,20 @@ if ( ! $checkout->enable_signup && ! $checkout->enable_guest_checkout && ! is_us // filter hook for include new pages inside the payment method $get_checkout_url = apply_filters( 'woocommerce_get_checkout_url', WC()->cart->get_checkout_url() ); ?> -
    + checkout_fields ) > 0 ) : ?>
    -
    - -
    - -
    -
    @@ -52,7 +46,9 @@ $get_checkout_url = apply_filters( 'woocommerce_get_checkout_url', WC()->cart->g - +
    + +
    diff --git a/templates/checkout/payment-method.php b/templates/checkout/payment-method.php new file mode 100644 index 00000000000..fbd99c9f1b3 --- /dev/null +++ b/templates/checkout/payment-method.php @@ -0,0 +1,25 @@ + +
  • + chosen, true ); ?> data-order_button_text="order_button_text ); ?>" /> + + + has_fields() || $gateway->get_description() ) : ?> +
    chosen ) : ?>style="display:none;"> + payment_fields(); ?> +
    + +
  • diff --git a/templates/checkout/payment.php b/templates/checkout/payment.php new file mode 100644 index 00000000000..c1a7285221b --- /dev/null +++ b/templates/checkout/payment.php @@ -0,0 +1,61 @@ + + +
    + cart->needs_payment() ) : ?> +
      + $gateway ) ); + } + } else { + if ( ! WC()->customer->get_country() ) { + $no_gateways_message = __( 'Please fill in your details above to see available payment methods.', 'woocommerce' ); + } else { + $no_gateways_message = __( 'Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ); + } + + echo '

      ' . apply_filters( 'woocommerce_no_available_payment_methods_message', $no_gateways_message ) . '

      '; + } + ?> +
    + + +
    + + + + + + + + ' ); ?> + + 0 && apply_filters( 'woocommerce_checkout_show_terms', true ) ) : ?> +

    + + id="terms" /> +

    + + + + +
    + +
    +
    + + diff --git a/templates/checkout/review-order.php b/templates/checkout/review-order.php index 35d66fc7fb2..0a8840b1580 100644 --- a/templates/checkout/review-order.php +++ b/templates/checkout/review-order.php @@ -1,197 +1,111 @@ + + + + + + + + +
    + foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { + $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); -
    - - - - - - - - cart->get_cart() as $cart_item_key => $cart_item ) { - $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); - - if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_checkout_cart_item_visible', true, $cart_item, $cart_item_key ) ) { - ?> - - - - - - - - - - - - - - cart->get_coupons( 'cart' ) as $code => $coupon ) : ?> - - - - - - - cart->needs_shipping() && WC()->cart->show_shipping() ) : ?> - - - - - - - - - - cart->get_fees() as $fee ) : ?> - - - - - - - cart->tax_display_cart === 'excl' ) : ?> - - cart->get_tax_totals() as $code => $tax ) : ?> - - - - - - - - - + if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_checkout_cart_item_visible', true, $cart_item, $cart_item_key ) ) { + ?> + + + - - - - cart->get_coupons( 'order' ) as $code => $coupon ) : ?> - - - - - - - - - - - - - - - - -
    - get_title(), $cart_item, $cart_item_key ); ?> - ' . sprintf( '× %s', $cart_item['quantity'] ) . '', $cart_item, $cart_item_key ); ?> - cart->get_item_data( $cart_item ); ?> - - cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); ?> -
    name ); ?>
    label ); ?>formatted_amount ); ?>
    countries->tax_or_vat() ); ?>cart->get_taxes_total() ); ?>
    + get_title(), $cart_item, $cart_item_key ); ?> + ' . sprintf( '× %s', $cart_item['quantity'] ) . '', $cart_item, $cart_item_key ); ?> + cart->get_item_data( $cart_item ); ?> + + cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); ?> +
    - - - -
    - cart->needs_payment() ) : ?> -
      - payment_gateways->get_available_payment_gateways(); - if ( ! empty( $available_gateways ) ) { - - // Chosen Method - if ( isset( WC()->session->chosen_payment_method ) && isset( $available_gateways[ WC()->session->chosen_payment_method ] ) ) { - $available_gateways[ WC()->session->chosen_payment_method ]->set_current(); - } elseif ( isset( $available_gateways[ get_option( 'woocommerce_default_gateway' ) ] ) ) { - $available_gateways[ get_option( 'woocommerce_default_gateway' ) ]->set_current(); - } else { - current( $available_gateways )->set_current(); - } - - foreach ( $available_gateways as $gateway ) { - ?> -
    • - chosen, true ); ?> data-order_button_text="order_button_text ); ?>" /> - - has_fields() || $gateway->get_description() ) : - echo '
      chosen ? '' : 'style="display:none;"' ) . '>'; - $gateway->payment_fields(); - echo '
      '; - endif; - ?> -
    • - customer->get_country() ) - $no_gateways_message = __( 'Please fill in your details above to see available payment methods.', 'woocommerce' ); - else - $no_gateways_message = __( 'Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ); - - echo '

      ' . apply_filters( 'woocommerce_no_available_payment_methods_message', $no_gateways_message ) . '

      '; - + -
    + } + + do_action( 'woocommerce_review_order_after_cart_contents' ); + ?> +

    name ); ?>
    label ); ?>formatted_amount ); ?>
    countries->tax_or_vat() ); ?>cart->get_taxes_total() ); ?>
    From 4bc63de72a374c8b269df50493f035e3a6350d39 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 26 Nov 2014 15:37:06 +0000 Subject: [PATCH 287/743] Added 'stupidtable' script to allow order item sorting on the order screen (by name, cost, qty). Closes #5998 --- assets/css/admin.css | 2 +- assets/css/admin.scss | 11 +- assets/js/admin/meta-boxes-order.js | 2 + assets/js/admin/meta-boxes-order.min.js | 2 +- assets/js/stupidtable/stupidtable.js | 115 ++++++++++++++++++ includes/admin/class-wc-admin-assets.php | 6 +- .../meta-boxes/views/html-order-item.php | 6 +- .../meta-boxes/views/html-order-items.php | 9 +- readme.txt | 1 + 9 files changed, 141 insertions(+), 13 deletions(-) create mode 100644 assets/js/stupidtable/stupidtable.js diff --git a/assets/css/admin.css b/assets/css/admin.css index 9114cc38846..b5425a14ba1 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -1 +1 @@ -@charset "UTF-8";@-moz-keyframes spin{100%{-moz-transform:rotate(360deg)}}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.woocommerce-checkout .form-row .chosen-container{width:100%!important}.woocommerce-checkout .form-row .chosen-container-single .chosen-single{height:28px;line-height:29px}.woocommerce-checkout .form-row .chosen-container-single .chosen-single div b{background:url(../images/chosen-sprite.png) 0 3px no-repeat!important}.woocommerce-checkout .form-row .chosen-container-active .chosen-single-with-drop div b{background-position:-18px 4px!important}.woocommerce-checkout .form-row .chosen-container-single .chosen-search input{line-height:13px;width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce-checkout .form-row .chosen-container .chosen-drop{width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.woocommerce-checkout .form-row .chosen-container-single .chosen-single div b{background-image:url(../images/chosen-sprite@2x.png)!important;background-position:0 5px!important;background-repeat:no-repeat!important;background-size:52px 37px!important}.woocommerce-checkout .form-row .chosen-container-active .chosen-single-with-drop div b{background-position:-18px 5px!important}}.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;border:1px solid #aaa;border-radius:5px;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:0 0,top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%;background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;right:26px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover,.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:url(../images/chosen-sprite.png) 100% -20px no-repeat #fff;background:url(../images/chosen-sprite.png) 100% -20px no-repeat,-o-linear-gradient(#eee 1%,#fff 15%);background:url(../images/chosen-sprite.png) 100% -20px no-repeat,0 0,0 0,#eee 1%,#fff 15%;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.chosen-container .chosen-results{position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear,false,#3875d7 20%,#2a62bc 90%;color:#fff}.chosen-container .chosen-results li.no-results{display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear,false,#eee 1%,#fff 15%;cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:5px;height:15px;outline:0;border:0!important;background:0 0!important;box-shadow:none;color:#666;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-multi .chosen-choices li.search-field .default{color:#999}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 0 3px 5px;padding:3px 20px 3px 5px;border:1px solid #aaa;border-radius:3px;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear,false,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%;background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear,top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%;color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#eee),color-stop(80%,#fff));background-image:-webkit-linear-gradient(#eee 20%,#fff 80%);background-image:-moz-linear-gradient(#eee 20%,#fff 80%);background-image:-o-linear-gradient(#eee 20%,#fff 80%);background-image:linear,false,#eee 20%,#fff 80%;box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#111!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close,.chosen-disabled .chosen-single{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl .chosen-drop,.chosen-rtl.chosen-container-single-nosearch .chosen-search{left:9999px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:url(../images/chosen-sprite.png) -30px -20px no-repeat #fff;background:url(../images/chosen-sprite.png) -30px -20px no-repeat,-o-linear-gradient(#eee 1%,#fff 15%);background:url(../images/chosen-sprite.png) -30px -20px no-repeat,0 0,0 0,#eee 1%,#fff 15%;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-rtl .chosen-search input[type=text]{background-image:url(../images/chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}.blockUI.blockOverlay:before{height:1em;width:1em;position:absolute;top:50%;left:50%;margin-left:-.5em;margin-top:-.5em;display:block;-webkit-animation:spin 2s linear infinite;-moz-animation:spin 2s linear infinite;animation:spin 2s linear infinite;font-family:Dashicons;content:"\f463";line-height:1;text-align:center;font-size:2em;color:rgba(0,0,0,.75);vertical-align:top;-webkit-font-smoothing:antialiased;font-weight:400}.wc_addons_wrap .products{overflow:hidden}.wc_addons_wrap .products li{float:left;margin:0 1em 1em 0!important;padding:0;vertical-align:top;width:300px}.wc_addons_wrap .products li a{text-decoration:none;color:inherit;border:1px solid #ddd;display:block;min-height:220px;overflow:hidden;background:#f5f5f5;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1)}.wc_addons_wrap .products li a img{max-width:258px;max-height:24px;padding:17px 20px;display:block;margin:0;background:#fff;border-right:260px solid #fff}.wc_addons_wrap .products li a .price,.wc_addons_wrap .products li a img.extension-thumb+h3{display:none}.wc_addons_wrap .products li a h3{margin:0!important;padding:20px!important;background:#fff}.wc_addons_wrap .products li a p{padding:20px!important;margin:0!important;border-top:1px solid #f1f1f1}.wc_addons_wrap .products li a:focus,.wc_addons_wrap .products li a:hover{background-color:#fff}.woocommerce-message{position:relative;border-left-color:#cc99c2!important;overflow:hidden}.woocommerce-message a.button-primary,.woocommerce-message button.button-primary{background:#cc99c2;border-color:#b366a4;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none!important}.woocommerce-message a.button-primary:hover,.woocommerce-message button.button-primary:hover{background:#bb77ae;border-color:#aa559a;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15)}.woocommerce-message a.button-primary:active,.woocommerce-message button.button-primary:active{background:#aa559a;border-color:#aa559a}.woocommerce-message a.docs,.woocommerce-message a.skip{opacity:.5}.woocommerce-message .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}#variable_product_options #message{margin:10px}.clear{clear:both}.wrap.woocommerce div.error,.wrap.woocommerce div.updated{margin-top:10px}mark.amount{background:0 0;color:inherit}.postbox,.woocommerce{input:invalid;input-border:1px solid #cc010b;input-background:#ffebe8}.simplify-commerce-banner{overflow:hidden}.simplify-commerce-banner img{float:right;padding:15px 0;margin-left:1em;width:200px}table.wc_status_table{margin-bottom:1em}table.wc_status_table tr:nth-child(2n) td,table.wc_status_table tr:nth-child(2n) th{background:#fcfcfc}table.wc_status_table th{font-weight:700;padding:9px}table.wc_status_table td:first-child{width:33%}table.wc_status_table td.help{width:1em}table.wc_status_table td{padding:9px;font-size:1.1em}table.wc_status_table td mark{background:0 0}table.wc_status_table td mark.yes{color:#7ad03a}table.wc_status_table td mark.no{color:#999}table.wc_status_table td mark.error{color:#a00}table.wc_status_table td ul{margin:0}table.wc_status_table .help_tip{cursor:help}#debug-report{display:none;margin:10px 0;padding:0;position:relative}#debug-report textarea{font-family:monospace;width:100%;margin:0;height:300px;padding:20px;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;resize:none;font-size:12px;line-height:20px;outline:0}#log-viewer-select{padding:10px 0 8px;line-height:180%}#log-viewer textarea{width:100%;resize:vertical}.inline-edit-product.quick-edit-row .inline-edit-col-center,.inline-edit-product.quick-edit-row .inline-edit-col-right{float:right!important}#woocommerce-fields.inline-edit-col{clear:left}#woocommerce-fields.inline-edit-col label.featured,#woocommerce-fields.inline-edit-col label.manage_stock{margin-left:10px}#woocommerce-fields.inline-edit-col .dimensions div{display:block;margin:.2em 0}#woocommerce-fields.inline-edit-col .dimensions div span.title{display:block;float:left;width:5em}#woocommerce-fields.inline-edit-col .dimensions div span.input-text-wrap{display:block;margin-left:5em}#woocommerce-fields.inline-edit-col .text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:99%;float:left;margin:1px 1% 1px 1px}#woocommerce-fields.inline-edit-col .height,#woocommerce-fields.inline-edit-col .length,#woocommerce-fields.inline-edit-col .width{width:32.33%}#woocommerce-fields.inline-edit-col .height{margin-right:0}#woocommerce-fields-bulk.inline-edit-col label{clear:left}#woocommerce-fields-bulk.inline-edit-col .inline-edit-group label{clear:none;width:49%;margin:.2em 0}#woocommerce-fields-bulk.inline-edit-col .inline-edit-group.dimensions label{width:75%;max-width:75%}#woocommerce-fields-bulk.inline-edit-col .length,#woocommerce-fields-bulk.inline-edit-col .regular_price,#woocommerce-fields-bulk.inline-edit-col .sale_price,#woocommerce-fields-bulk.inline-edit-col .stock,#woocommerce-fields-bulk.inline-edit-col .weight{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;margin-left:4.4em}#woocommerce-fields-bulk.inline-edit-col .height,#woocommerce-fields-bulk.inline-edit-col .length,#woocommerce-fields-bulk.inline-edit-col .width{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:25%}.column-coupon_code{line-height:2.25em}.column-coupon_code,ul.wc_coupon_list{margin:0;overflow:hidden;zoom:1;clear:both}ul.wc_coupon_list_block{margin:0;padding-bottom:2px}ul.wc_coupon_list_block li{border-top:1px solid #fff;border-bottom:1px solid #ccc;line-height:2.5em;margin:0;padding:.5em 0}ul.wc_coupon_list_block li:first-child{border-top:0;padding-top:0}ul.wc_coupon_list_block li:last-child{border-bottom:0;padding-bottom:0}.button.wc-reload{text-indent:-9999px;position:relative;padding:0;-webkit-border-radius:100%;border-radius:100%;height:24px;width:24px!important;display:inline-block}.button.wc-reload:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:22px}.tablenav .actions{overflow:visible}.alignleft.actions .chosen-container-single{display:inline-block;vertical-align:middle}#woocommerce-order-data .handlediv,#woocommerce-order-data h3.hndle{display:none}#woocommerce-order-data .inside{display:block!important}#order_data{padding:23px 24px 12px}#order_data h2{margin:0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;font-size:21px;font-weight:400;line-height:1.2;text-shadow:1px 1px 1px #fff;padding:0}#order_data h4{color:#333;margin:1.33em 0 0}#order_data p{color:#777}#order_data p.order_number{margin:0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;font-weight:400;line-height:1.6em;font-size:16px}#order_data .order_data_column_container{clear:both}#order_data .order_data_column{width:32%;padding:0 2% 0 0;float:left}#order_data .order_data_column:last-child{padding-right:0}#order_data .order_data_column p{padding:0!important}#order_data .order_data_column .address strong{display:block}#order_data .order_data_column .form-field{float:left;width:48%;padding:0;margin:9px 0 0}#order_data .order_data_column .form-field label{display:block;padding:0 0 3px}#order_data .order_data_column .form-field input,#order_data .order_data_column .form-field select,#order_data .order_data_column .form-field textarea{width:100%}#order_data .order_data_column .form-field #order_status_chosen .chosen-search{display:none}#order_data .order_data_column .form-field .chosen-container{width:100%!important}#order_data .order_data_column .form-field .date-picker-field{width:50%}#order_data .order_data_column .form-field .hour,#order_data .order_data_column .form-field .minute{width:2.5em}#order_data .order_data_column .form-field small{display:block;margin:5px 0 0;color:#999}#order_data .order_data_column .form-field.last{float:right}#order_data .order_data_column .form-field-wide{width:100%;clear:both}#order_data .order_data_column .form-field-wide input,#order_data .order_data_column .form-field-wide select,#order_data .order_data_column .form-field-wide textarea{width:100%}#order_data .order_data_column p.none_set{color:#999}#order_data .order_data_column ._billing_address_1_field,#order_data .order_data_column ._billing_city_field,#order_data .order_data_column ._billing_country_field,#order_data .order_data_column ._billing_email_field,#order_data .order_data_column ._billing_first_name_field,#order_data .order_data_column ._shipping_address_1_field,#order_data .order_data_column ._shipping_city_field,#order_data .order_data_column ._shipping_country_field,#order_data .order_data_column ._shipping_first_name_field{float:left}#order_data .order_data_column ._billing_address_2_field,#order_data .order_data_column ._billing_last_name_field,#order_data .order_data_column ._billing_phone_field,#order_data .order_data_column ._billing_postcode_field,#order_data .order_data_column ._billing_state_field,#order_data .order_data_column ._shipping_address_2_field,#order_data .order_data_column ._shipping_last_name_field,#order_data .order_data_column ._shipping_postcode_field,#order_data .order_data_column ._shipping_state_field{float:right}#order_data .order_data_column ._billing_company_field,#order_data .order_data_column ._shipping_company_field,#order_data .order_data_column ._transaction_id_field{clear:both;width:100%}#order_data .order_data_column ._billing_email_field{clear:left}#order_data .order_data_column div.edit_address{display:none;zoom:1;padding-right:1px}#order_data a.edit_address{opacity:.4}#order_data a.edit_address:focus,#order_data a.edit_address:hover{opacity:1}.order_actions{margin:0;overflow:hidden;zoom:1}.order_actions li{border-top:1px solid #fff;border-bottom:1px solid #ddd;padding:6px 0;margin:0;line-height:1.6em;float:left;width:50%;text-align:center}.order_actions li a{float:none;text-align:center;text-decoration:underline}.order_actions li.wide{width:auto;float:none;clear:both;padding:6px;text-align:left;overflow:hidden}.order_actions li #delete-action{line-height:25px;vertical-align:middle;text-align:left;float:left}.order_actions li .save_order{float:right}.order_actions li#actions{overflow:hidden}.order_actions li#actions .button{width:24px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:right}.order_actions li#actions select{width:225px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left}#woocommerce-order-items .inside{margin:0;padding:0;background:#fefefe}#woocommerce-order-items .wc-order-data-row{border-bottom:1px solid #DFDFDF;padding:12px;background:#f8f8f8;line-height:2em;text-align:right}#woocommerce-order-items .wc-order-data-row:after,#woocommerce-order-items .wc-order-data-row:before{content:" ";display:table}#woocommerce-order-items .wc-order-data-row:after{clear:both}#woocommerce-order-items .wc-order-data-row p{margin:0;line-height:2em}#woocommerce-order-items .wc-order-bulk-actions{background:#fefefe;vertical-align:top;border-top:0}#woocommerce-order-items .wc-order-bulk-actions select{vertical-align:top}#woocommerce-order-items .wc-order-bulk-actions p.bulk-actions{float:left}#woocommerce-order-items .wc-order-add-item{background:#fff;vertical-align:top;border-top:none}#woocommerce-order-items .wc-order-add-item .add_item_id,#woocommerce-order-items .wc-order-add-item .chosen-container{vertical-align:top}#woocommerce-order-items .wc-order-add-item .add_item_id .search-field input,#woocommerce-order-items .wc-order-add-item .chosen-container .search-field input{min-width:100px}#woocommerce-order-items .wc-order-add-item .chosen-container{width:400px!important;text-align:left}#woocommerce-order-items .wc-order-add-item .calculate-action,#woocommerce-order-items .wc-order-add-item .cancel-action,#woocommerce-order-items .wc-order-add-item .save-action{float:left;margin-right:2px}#woocommerce-order-items .wc-used-coupons{float:left;width:50%}#woocommerce-order-items .wc-order-totals{float:right;width:50%;margin:0;padding:0}#woocommerce-order-items .wc-order-totals .amount{font-weight:700}#woocommerce-order-items .wc-order-totals .label{vertical-align:top}#woocommerce-order-items .wc-order-totals .total{font-size:1em!important;width:10em;margin:0 0 0 .5em;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-order-items .wc-order-totals .total input[type=text]{width:96%;float:right}#woocommerce-order-items .wc-order-totals .refunded-total{color:#a00}#woocommerce-order-items .refund-actions{margin-top:5px;padding-top:12px;border-top:1px solid #DFDFDF}#woocommerce-order-items .refund-actions .button{float:right;margin-left:4px}#woocommerce-order-items .refund-actions .cancel-action{float:left;margin-left:0}#woocommerce-order-items .add_meta{margin-left:0!important}#woocommerce-order-items h3 small{color:#999}#woocommerce-order-items .amount{white-space:nowrap}#woocommerce-order-items .add-items .description{margin-right:10px}.woocommerce_order_items_wrapper{margin:0;overflow:auto}.woocommerce_order_items_wrapper table.woocommerce_order_items{width:100%;background:#fff}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th{background:#f8f8f8;padding:8px;font-size:11px;text-align:left}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th:last-child{padding-right:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th:first-child{padding-left:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th,.woocommerce_order_items_wrapper table.woocommerce_order_items td{padding:8px;text-align:left;line-height:26px;vertical-align:top;border-bottom:1px dotted #ececec}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items td textarea{width:100%}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th select,.woocommerce_order_items_wrapper table.woocommerce_order_items td select{width:50%}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th input,.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items td input,.woocommerce_order_items_wrapper table.woocommerce_order_items td textarea{font-size:14px;padding:4px;color:#555}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items td:last-child{padding-right:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th:first-child,.woocommerce_order_items_wrapper table.woocommerce_order_items td:first-child{padding-left:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody tr:last-child td{border-bottom:1px solid #dfdfdf}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody tr:first-child td{border-top:8px solid #f8f8f8}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody#order_line_items tr:first-child td{border-top:none}.woocommerce_order_items_wrapper table.woocommerce_order_items td.check-column{padding:8px 8px 8px 12px;width:1%}.woocommerce_order_items_wrapper table.woocommerce_order_items .item{min-width:200px}.woocommerce_order_items_wrapper table.woocommerce_order_items .center,.woocommerce_order_items_wrapper table.woocommerce_order_items .variation-id{text-align:center}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class{text-align:right}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax label,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity label,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax label,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class label{white-space:nowrap;color:#999;font-size:.833em}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class label input{display:inline}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class input{width:70px;vertical-align:middle;text-align:right}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax select,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity select,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax select,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class select{width:85px;height:26px;vertical-align:middle;font-size:1em}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input{display:block;background:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);margin:1px;width:70px}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input input{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:0;box-shadow:none;margin:0;color:#555;background:0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input input:last-child{color:#bbb;border-top:1px dashed #ddd}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .view{white-space:nowrap}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost del,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost del,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost del,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax del,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity del,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax del,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class del{color:#ccc}.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity{text-align:center}.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity input{text-align:center;width:50px}.woocommerce_order_items_wrapper table.woocommerce_order_items span.subtotal{opacity:.5}.woocommerce_order_items_wrapper table.woocommerce_order_items td.tax_class,.woocommerce_order_items_wrapper table.woocommerce_order_items th.tax_class{text-align:left}.woocommerce_order_items_wrapper table.woocommerce_order_items .calculated{border-color:#ae8ca2;border-style:dotted}.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta{width:100%}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta{margin:.5em 0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr th,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr th{border:0;padding:0 4px .5em 0;line-height:1.5em;width:20%}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td{padding:0 4px .5em 0;border:0;line-height:1.5em}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td input,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td input{width:100%;margin:0;position:relative;border-bottom:0;box-shadow:none}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td textarea{width:100%;height:4em;margin:0;box-shadow:none}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td input:focus+textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td input:focus+textarea{border-top-color:#999}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td p,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td p{margin:0 0 .5em;line-height:1.5em}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td p:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td p:last-child{margin:0}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb{text-align:left;width:27px}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb a{display:block}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb img{padding:1px;margin:0;border:1px solid #dfdfdf;vertical-align:middle;width:21px;height:21px}.woocommerce_order_items_wrapper table.woocommerce_order_items .refund_by{border-bottom:1px dotted #999}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.fee .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.fee .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.refund .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.refund .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.shipping .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.shipping .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax{white-space:nowrap}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax{padding:8px 16px 8px 8px}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:12px;visibility:hidden;float:right;margin:2px -16px 0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax:before,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#fff;background-color:#000;-webkit-border-radius:100%;border-radius:100%;border:1px solid #000;box-shadow:0 1px 2px rgba(0,0,0,.2)}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax:hover:before,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax:hover:before{border-color:#a00;background-color:#a00}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax:hover .delete-order-tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax:hover .delete-order-tax{visibility:visible}.woocommerce_order_items_wrapper table.woocommerce_order_items small.refunded{display:block;color:#a00;white-space:nowrap}.wc-order-items-editable .edit-order-item{text-indent:-9999px;position:relative;height:1em;width:1em;display:inline-block;margin:0 .5em 0 0}.wc-order-items-editable .edit-order-item:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";content:"\e603";color:#999}.wc-order-items-editable .edit-order-item:hover:before{color:#555}.wc-order-items-editable .delete-order-item,.wc-order-items-editable .delete_refund{text-indent:-9999px;position:relative;height:1em;width:1em;display:inline-block;margin:0}.wc-order-items-editable .delete-order-item:before,.wc-order-items-editable .delete_refund:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";content:"\e013";color:#999}.wc-order-items-editable .delete-order-item:hover:before,.wc-order-items-editable .delete_refund:hover:before{color:#a00}.wc-order-items-editable .wc-order-edit-line-item-actions{width:2.5em;text-align:right}.wc-order-items-editable .wc-order-totals .wc-order-edit-line-item-actions{width:1.5em}.wc-order-items-editable .wc-order-totals .edit-order-item{margin:0}#woocommerce-order-downloads .buttons{float:left;padding:0;margin:0;vertical-align:top}#woocommerce-order-downloads .buttons .add_item_id,#woocommerce-order-downloads .buttons .chosen-container{width:400px!important;margin-right:9px;vertical-align:top;float:left}#woocommerce-order-downloads .buttons button{margin:2px 0 0}#woocommerce-order-downloads h3 small{color:#999}#poststuff #woocommerce-order-actions .inside{margin:0;padding:0}#poststuff #woocommerce-order-actions .inside ul.order_actions li{padding:6px 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#poststuff #woocommerce-order-actions .inside ul.order_actions li:last-child{border-bottom:0}#poststuff #woocommerce-order-notes .inside{margin:0;padding:0}#poststuff #woocommerce-order-notes .inside ul.order_notes li{padding:0 10px}#woocommerce_customers p.search-box{margin:6px 0 4px;float:left}#woocommerce_customers .tablenav{float:right;clear:none}.widefat.customers td{vertical-align:middle;padding:4px 7px}.widefat .column-order_title{width:15%}.widefat .column-order_title time{display:block;color:#999;margin:3px 0}.widefat .column-orders,.widefat .column-paying,.widefat .column-spent{text-align:center;width:8%}.widefat .column-last_order{width:11%}.widefat .column-order_actions,.widefat .column-user_actions,.widefat .column-wc_actions{width:110px}.widefat .column-order_actions a.button,.widefat .column-user_actions a.button,.widefat .column-wc_actions a.button{float:left;margin:0 4px 2px 0;cursor:pointer;padding:3px 4px;height:auto}.widefat .column-order_actions a.button img,.widefat .column-user_actions a.button img,.widefat .column-wc_actions a.button img{display:block;width:12px;height:auto}.widefat small.meta{display:block;color:#999;font-size:inherit;margin:3px 0}.widefat .column-order_date,.widefat .column-order_total{width:9%}.widefat .column-order_status{width:45px;text-align:center}.widefat .column-order_status mark{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;background:0 0;font-size:1.4em;margin:0 auto}.widefat .column-order_status mark.cancelled:after,.widefat .column-order_status mark.completed:after,.widefat .column-order_status mark.failed:after,.widefat .column-order_status mark.on-hold:after,.widefat .column-order_status mark.pending:after,.widefat .column-order_status mark.processing:after,.widefat .column-order_status mark.refunded:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}.widefat .column-order_status mark.pending:after{content:"\e012";color:#ffba00}.widefat .column-order_status mark.completed:after{content:"\e015";color:#2ea2cc}.widefat .column-order_status mark.on-hold:after{content:"\e033";color:#999}.widefat .column-order_status mark.failed:after{content:"\e016";color:#d0c21f}.widefat .column-order_status mark.cancelled:after{content:"\e013";color:#a00}.widefat .column-order_status mark.processing:after{content:"\e011";color:#73a724}.widefat .column-order_status mark.refunded:after{content:"\e014";color:#999}.widefat td.column-order_status{padding-top:9px}.column-customer_message .note-on{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto;color:#999}.column-customer_message .note-on:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:16px}.column-order_notes .note-on{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto;color:#999}.column-order_notes .note-on:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:16px}.order_actions .complete,.order_actions .processing,.order_actions .view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.order_actions .complete:after,.order_actions .processing:after,.order_actions .view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.order_actions .processing:after{content:"\e00f"}.order_actions .complete:after{content:"\e017"}.order_actions .view:after{content:"\e010"}.user_actions .edit,.user_actions .link,.user_actions .refresh,.user_actions .view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.user_actions .edit:after,.user_actions .link:after,.user_actions .refresh:after,.user_actions .view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.user_actions .edit:after{content:"\e603"}.user_actions .link:after{content:"\e00d"}.user_actions .view:after{content:"\e010"}.user_actions .refresh:after{content:"\e031"}.attributes-table td,.attributes-table th{width:15%;vertical-align:top}.attributes-table .attribute-terms{width:32%}.attributes-table .attribute-actions{width:2em}.attributes-table .attribute-actions .configure-terms{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.attributes-table .attribute-actions .configure-terms:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:1.85}ul.order_notes{padding:2px 0 0}ul.order_notes li{.note_content:after;.note_content-content:"";.note_content-display:block;.note_content-position:absolute;.note_content-bottom:-10px;.note_content-left:20px;.note_content-width:0;.note_content-height:0;.note_content-border-width:10px 10px 0 0;.note_content-border-style:solid;.note_content-border-color:#efefef transparent}ul.order_notes li .note_content{padding:10px;background:#efefef;position:relative}ul.order_notes li .note_content p{margin:0;padding:0;word-wrap:break-word}ul.order_notes li p.meta{padding:10px;color:#999;margin:0;font-size:11px}ul.order_notes li p.meta .exact-date{border-bottom:1px dotted #999}ul.order_notes li a.delete_note{color:#a00}ul.order_notes li.customer-note{.note_content:after;.note_content-border-color:#d7cad2 transparent}ul.order_notes li.customer-note .note_content{background:#d7cad2}.add_note{border-top:1px solid #ddd;padding:10px 10px 0}.add_note h4{margin-top:5px!important}.add_note #add_order_note{width:100%;height:50px}table.wp-list-table .column-thumb{width:52px;text-align:center;white-space:nowrap}table.wp-list-table .column-name{width:22%}table.wp-list-table .column-product_cat,table.wp-list-table .column-product_tag{width:11%!important}table.wp-list-table .column-featured,table.wp-list-table .column-product_type{width:48px;text-align:left!important}table.wp-list-table .column-customer_message,table.wp-list-table .column-order_notes{width:48px;text-align:center}table.wp-list-table .column-customer_message img,table.wp-list-table .column-order_notes img{margin:0 auto;padding-top:0!important}table.wp-list-table .manage-column.column-featured img,table.wp-list-table .manage-column.column-product_type img{padding-left:2px}table.wp-list-table .column-price .woocommerce-price-suffix{display:none}table.wp-list-table img{margin:1px 2px}table.wp-list-table .row-actions{color:#999}table.wp-list-table td.column-thumb img{margin:0;vertical-align:middle;width:auto;height:auto;max-width:40px;max-height:40px}table.wp-list-table span.na{color:#999}table.wp-list-table .column-is_in_stock{text-align:left!important}table.wp-list-table span.wc-featured,table.wp-list-table span.wc-image,table.wp-list-table span.wc-type{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto}table.wp-list-table span.wc-featured:before,table.wp-list-table span.wc-image:before,table.wp-list-table span.wc-type:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:""}table.wp-list-table span.wc-featured{margin:0;cursor:pointer}table.wp-list-table span.wc-featured:before{content:"\e020"}table.wp-list-table span.wc-featured.not-featured:before{content:"\e021"}table.wp-list-table td.column-featured span.wc-featured{font-size:1.2em}table.wp-list-table span.wc-type{margin:0}table.wp-list-table span.wc-type:before{content:"\e01d"}table.wp-list-table span.product-type{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.2em}table.wp-list-table span.product-type:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:""}table.wp-list-table span.product-type.grouped:before{content:"\e002"}table.wp-list-table span.product-type.external:before{content:"\e034"}table.wp-list-table span.product-type.variable:before{content:"\e003"}table.wp-list-table span.product-type.downloadable:before{content:"\e001"}table.wp-list-table span.product-type.virtual:before{content:"\e000"}table.wp-list-table mark.instock{font-weight:700;color:#7ad03a;background:0 0;line-height:1}table.wp-list-table mark.outofstock{font-weight:700;color:#a44;background:0 0;line-height:1}table.wp-list-table .notes_head,table.wp-list-table .order-notes_head,table.wp-list-table .status_head{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto}table.wp-list-table .notes_head:after,table.wp-list-table .order-notes_head:after,table.wp-list-table .status_head:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}table.wp-list-table .order-notes_head:after{content:"\e028"}table.wp-list-table .notes_head:after{content:"\e026"}table.wp-list-table .status_head:after{content:"\e011"}table.wp-list-table .column-order_items{width:12%}table.wp-list-table .column-order_items table.order_items{width:100%;margin:3px 0 0;padding:0;display:none}table.wp-list-table .column-order_items table.order_items td{border:0;margin:0;padding:0 0 3px}table.wp-list-table .column-order_items table.order_items td.qty{color:#999;padding-right:6px;text-align:left}mark.notice{background:#fff;color:#a00;margin:0 0 0 10px}a.export_rates,a.import_rates{float:right;margin-left:9px;margin-top:-2px;margin-bottom:0}table.wc_input_table,table.wc_tax_rates{width:100%}table.wc_input_table span.tips,table.wc_tax_rates span.tips{color:#2ea2cc}table.wc_input_table td,table.wc_tax_rates td{padding:0;border-right:1px solid #DFDFDF;border-bottom:1px solid #DFDFDF;border-top:0;background:#fff}table.wc_input_table td input[type=number],table.wc_input_table td input[type=text],table.wc_tax_rates td input[type=number],table.wc_tax_rates td input[type=text]{width:100%;padding:5px 7px;margin:0;border:0;background:0 0}table.wc_input_table td.apply_to_shipping,table.wc_input_table td.compound,table.wc_tax_rates td.apply_to_shipping,table.wc_tax_rates td.compound{padding:5px 7px;vertical-align:middle}table.wc_input_table td.apply_to_shipping input,table.wc_input_table td.compound input,table.wc_tax_rates td.apply_to_shipping input,table.wc_tax_rates td.compound input{width:auto;padding:0}table.wc_input_table td:last-child,table.wc_tax_rates td:last-child{border-right:0}table.wc_input_table tr.current td,table.wc_tax_rates tr.current td{background-color:#fefbcc}table.wc_input_table .cost,table.wc_input_table .cost input,table.wc_input_table .item_cost,table.wc_input_table .item_cost input,table.wc_tax_rates .cost,table.wc_tax_rates .cost input,table.wc_tax_rates .item_cost,table.wc_tax_rates .item_cost input{text-align:right}table.wc_input_table th.sort,table.wc_tax_rates th.sort{width:17px;padding:0}table.wc_input_table td.sort,table.wc_tax_rates td.sort{padding:0 4px;cursor:move;background:#f9f9f9;text-align:center;vertical-align:middle}table.wc_input_table td.sort:before,table.wc_tax_rates td.sort:before{content:"\e032";font-family:WooCommerce;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%}table.wc_input_table td.sort:hover:before,table.wc_tax_rates td.sort:hover:before{color:#333}table.wc_input_table .button,table.wc_tax_rates .button{float:left;margin-right:5px}table.wc_input_table .export,table.wc_input_table .import,table.wc_tax_rates .export,table.wc_tax_rates .import{float:right;margin-right:0;margin-left:5px}table.wc_input_table span.tips,table.wc_tax_rates span.tips{padding:0 3px}table.wc_input_table .pagination,table.wc_tax_rates .pagination{float:right}table.wc_input_table .pagination .button,table.wc_tax_rates .pagination .button{margin-left:5px;margin-right:0}table.wc_input_table .pagination .current,table.wc_tax_rates .pagination .current{background:#bbb;text-shadow:none}table.wc_input_table tfoot th,table.wc_tax_rates tfoot th{padding-left:20px;padding-right:20px}table.wc_input_table tr:last-child td,table.wc_tax_rates tr:last-child td{border-bottom:0}table.wc_gateways,table.wc_shipping{position:relative}table.wc_gateways td,table.wc_shipping td{vertical-align:middle;cursor:move;padding:7px}table.wc_gateways th,table.wc_shipping th{padding:9px 7px!important;vertical-align:middle}table.wc_gateways td.name,table.wc_shipping td.name{font-weight:700}table.wc_gateways .settings,table.wc_shipping .settings{text-align:right}table.wc_gateways .default,table.wc_gateways .radio,table.wc_gateways .status,table.wc_shipping .default,table.wc_shipping .radio,table.wc_shipping .status{text-align:center}table.wc_gateways .default .tips,table.wc_gateways .radio .tips,table.wc_gateways .status .tips,table.wc_shipping .default .tips,table.wc_shipping .radio .tips,table.wc_shipping .status .tips{margin:0 auto}table.wc_gateways .default input,table.wc_gateways .radio input,table.wc_gateways .status input,table.wc_shipping .default input,table.wc_shipping .radio input,table.wc_shipping .status input{margin:0}img.help_tip{vertical-align:middle;margin:0 0 0 9px}.postbox img.help_tip{margin-top:-4px}.status-disabled,.status-enabled{font-size:1.4em;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}.status-enabled:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#a46497}.woocommerce #template div{margin:0}.woocommerce #template div p .button{float:right;margin-left:10px;margin-top:-4px}.woocommerce #template div .editor textarea{margin-bottom:8px}.woocommerce textarea[disabled=disabled]{background:#DFDFDF!important}.woocommerce table.form-table,.woocommerce table.form-table .forminp-radio ul{margin:0}.woocommerce table.form-table .forminp-radio ul li{line-height:1.4em}.woocommerce table.form-table textarea.input-text{height:100%;min-width:150px;display:block}.woocommerce table.form-table input.regular-input{width:25em}.woocommerce table.form-table textarea.wide-input{width:100%}.woocommerce table.form-table img.help_tip{padding:0;margin:-4px 0 0 5px;vertical-align:middle;cursor:help;line-height:1}.woocommerce table.form-table span.help_tip{cursor:help;color:#2ea2cc}.woocommerce table.form-table th{position:relative;padding-right:24px}.woocommerce table.form-table .chosen-container{vertical-align:top;margin-bottom:3px}.woocommerce table.form-table table.widefat th{padding-right:inherit}.woocommerce table.form-table th img.help_tip{margin:0 -24px 0 0;float:right}.woocommerce table.form-table fieldset{margin-top:4px}.woocommerce table.form-table fieldset img.help_tip{margin:-3px 0 0 5px}.woocommerce table.form-table fieldset p.description{margin-bottom:8px}.woocommerce table.form-table fieldset:first-child{margin-top:0}.woocommerce table.form-table .color_box{border:1px solid #ccc;box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.2);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding:4px 6px;float:left;width:90px;margin:0 10px 0 0}.woocommerce table.form-table .color_box strong{text-align:left;display:block;padding:0 0 2px;font-size:.92em}.woocommerce table.form-table .color_box strong img{float:right;margin:1px 0 0}.woocommerce table.form-table .color_box input.colorpick{width:100%;margin:0;font-family:monospace;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce table.form-table .color_box .iris-picker{margin:15px 0 0 -7px}.woocommerce table.form-table .color_box_clear{display:block;clear:both;padding-bottom:10px}.woocommerce table.form-table .iris-picker{z-index:100;position:absolute;display:none;border:1px solid #ccc;box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.2);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.2);border-radius:3px}.woocommerce table.form-table .iris-picker .ui-slider{border:0!important;background:none!important;margin:0!important;width:auto!important;height:auto!important}.woocommerce table.form-table .iris-picker .ui-slider .ui-slider-handle{margin-bottom:0!important}.woocommerce table.form-table .image_width_settings{vertical-align:middle}.woocommerce table.form-table .image_width_settings label{margin-left:10px}.woocommerce #tabs-wrap table a.remove{margin-left:4px}.woocommerce #tabs-wrap table p{margin:0 0 4px!important;overflow:hidden;zoom:1}.woocommerce #tabs-wrap table p a.add{float:left}#wp-excerpt-editor-container{background:#fff}#product_variation-parent #parent_id{width:100%}#postimagediv img{border:1px solid #d5d5d5;max-width:100%}#woocommerce-product-images .inside{margin:0;padding:0}#woocommerce-product-images .inside .add_product_images{padding:0 12px 12px}#woocommerce-product-images .inside #product_images_container{padding:0 0 0 9px}#woocommerce-product-images .inside #product_images_container ul{margin:0;padding:0}#woocommerce-product-images .inside #product_images_container ul:after,#woocommerce-product-images .inside #product_images_container ul:before{content:" ";display:table}#woocommerce-product-images .inside #product_images_container ul:after{clear:both}#woocommerce-product-images .inside #product_images_container ul li.add,#woocommerce-product-images .inside #product_images_container ul li.image,#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder{width:80px;float:left;cursor:move;border:1px solid #d5d5d5;margin:9px 9px 0 0;background:#f7f7f7;border-radius:2px;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-product-images .inside #product_images_container ul li.add img,#woocommerce-product-images .inside #product_images_container ul li.image img,#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder img{width:100%;height:auto;display:block}#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder{border:3px dashed #ddd;position:relative}#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:2.618em;line-height:72px;color:#ddd}#woocommerce-product-images .inside #product_images_container ul ul.actions{position:absolute;top:-8px;right:-8px;padding:2px;display:none}#woocommerce-product-images .inside #product_images_container ul ul.actions li{float:right;margin:0 0 0 2px}#woocommerce-product-images .inside #product_images_container ul ul.actions li a{width:1em;margin:0;height:0;display:block;overflow:hidden}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.tips{cursor:pointer}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.view{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.4em}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.view:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";background-color:#000;color:#fff}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.4em}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#fff;background-color:#000;border-radius:100%;box-shadow:0 1px 2px rgba(0,0,0,.2)}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete:hover before{background-color:#a00}#woocommerce-product-images .inside #product_images_container ul li:hover ul.actions{display:block}#woocommerce-product-data h3.hndle{padding:10px}#woocommerce-product-data h3.hndle span{display:block;vertical-align:middle;line-height:24px}#woocommerce-product-data h3.hndle span span{display:inline;line-height:inherit;vertical-align:baseline}#woocommerce-product-data h3.hndle label{padding-right:1em;font-size:12px;vertical-align:baseline}#woocommerce-product-data h3.hndle label:first-child{margin-right:1em;border-right:1px solid #dfdfdf}#woocommerce-product-data h3.hndle input,#woocommerce-product-data h3.hndle select{margin:-3px 0 0 .5em;vertical-align:middle}#woocommerce-product-data>.handlediv{margin-top:4px}#woocommerce-product-data .wrap{margin:0}#woocommerce-coupon-description{padding:3px 8px;font-size:1.7em;line-height:1.42em;height:auto;width:100%;outline:0;margin:10px 0;display:block}#woocommerce-coupon-description::-webkit-input-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description::-moz-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description:-ms-input-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description:-moz-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-data .panel-wrap,#woocommerce-product-data .panel-wrap{background:#fff}#woocommerce-coupon-data .wc-metaboxes-wrapper,#woocommerce-coupon-data .woocommerce_options_panel,#woocommerce-product-data .wc-metaboxes-wrapper,#woocommerce-product-data .woocommerce_options_panel{float:left;width:80%}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios,#woocommerce-product-data .woocommerce_options_panel .wc-radios{display:block;float:left;margin:0}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios li,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios li,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios li,#woocommerce-product-data .woocommerce_options_panel .wc-radios li{display:block;padding:0 0 10px}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios li input,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios li input,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios li input,#woocommerce-product-data .woocommerce_options_panel .wc-radios li input{width:auto}#woocommerce-coupon-data .panel-wrap,#woocommerce-product-data .panel-wrap,.woocommerce .panel-wrap{overflow:hidden}#woocommerce-coupon-data ul.wc-tabs,#woocommerce-product-data ul.wc-tabs,.woocommerce ul.wc-tabs{background:#fafafa;line-height:1em;float:left;width:20%;margin:0;position:relative;padding:0 0 10px;border-right:1px solid #eee;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-coupon-data ul.wc-tabs:after,#woocommerce-product-data ul.wc-tabs:after,.woocommerce ul.wc-tabs:after{content:"";display:block;width:100%;height:9999em;position:absolute;bottom:-9999em;left:0;background-color:#fafafa;border-right:1px solid #eee}#woocommerce-coupon-data ul.wc-tabs li,#woocommerce-product-data ul.wc-tabs li,.woocommerce ul.wc-tabs li{display:block;padding:0;margin:0}#woocommerce-coupon-data ul.wc-tabs li a,#woocommerce-product-data ul.wc-tabs li a,.woocommerce ul.wc-tabs li a{padding:10px;line-height:20px!important;margin:0;display:block;text-decoration:none;border-bottom:1px solid #eee}#woocommerce-coupon-data ul.wc-tabs li a:before,#woocommerce-product-data ul.wc-tabs li a:before,.woocommerce ul.wc-tabs li a:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:""}#woocommerce-coupon-data ul.wc-tabs li:first-child a,#woocommerce-product-data ul.wc-tabs li:first-child a,.woocommerce ul.wc-tabs li:first-child a{border-top:0!important}#woocommerce-coupon-data ul.wc-tabs li.general_options a:before,#woocommerce-product-data ul.wc-tabs li.general_options a:before,.woocommerce ul.wc-tabs li.general_options a:before{content:"\e006"}#woocommerce-coupon-data ul.wc-tabs li.inventory_options a:before,#woocommerce-product-data ul.wc-tabs li.inventory_options a:before,.woocommerce ul.wc-tabs li.inventory_options a:before{content:"\e02c"}#woocommerce-coupon-data ul.wc-tabs li.shipping_options a:before,#woocommerce-product-data ul.wc-tabs li.shipping_options a:before,.woocommerce ul.wc-tabs li.shipping_options a:before{content:"\e01a"}#woocommerce-coupon-data ul.wc-tabs li.linked_product_options a:before,#woocommerce-product-data ul.wc-tabs li.linked_product_options a:before,.woocommerce ul.wc-tabs li.linked_product_options a:before{content:"\e00d"}#woocommerce-coupon-data ul.wc-tabs li.attribute_options a:before,#woocommerce-product-data ul.wc-tabs li.attribute_options a:before,.woocommerce ul.wc-tabs li.attribute_options a:before{content:"\e02b"}#woocommerce-coupon-data ul.wc-tabs li.advanced_options a:before,#woocommerce-product-data ul.wc-tabs li.advanced_options a:before,.woocommerce ul.wc-tabs li.advanced_options a:before{content:"\e01c"}#woocommerce-coupon-data ul.wc-tabs li.variation_options a:before,#woocommerce-product-data ul.wc-tabs li.variation_options a:before,.woocommerce ul.wc-tabs li.variation_options a:before{content:"\e003"}#woocommerce-coupon-data ul.wc-tabs li.usage_restriction_options a:before,#woocommerce-product-data ul.wc-tabs li.usage_restriction_options a:before,.woocommerce ul.wc-tabs li.usage_restriction_options a:before{content:"\e602"}#woocommerce-coupon-data ul.wc-tabs li.usage_limit_options a:before,#woocommerce-product-data ul.wc-tabs li.usage_limit_options a:before,.woocommerce ul.wc-tabs li.usage_limit_options a:before{content:"\e601"}#woocommerce-coupon-data ul.wc-tabs li.general_coupon_data a:before,#woocommerce-product-data ul.wc-tabs li.general_coupon_data a:before,.woocommerce ul.wc-tabs li.general_coupon_data a:before{content:"\e600"}#woocommerce-coupon-data ul.wc-tabs li.active a,#woocommerce-product-data ul.wc-tabs li.active a,.woocommerce ul.wc-tabs li.active a{position:relative;background-color:#eee;color:#555}.woocommerce_page_wc-settings .shippingrows th.check-column{padding-top:20px}.woocommerce_page_wc-settings .shippingrows tfoot th{padding-left:10px}.woocommerce_page_wc-settings .shippingrows .add.button:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:""}.woocommerce_page_wc-settings h4.wc-settings-sub-title{font-size:1.2em}#woocommerce-coupon-data .inside,#woocommerce-order-data .inside,#woocommerce-order-downloads .inside,#woocommerce-product-data .inside,#woocommerce-product-type-options .inside{padding:0;margin:0}.panel,.woocommerce_options_panel{padding:9px;color:#555}.panel,.woocommerce_page_settings .woocommerce_options_panel{padding:0}#woocommerce-product-specs .inside,#woocommerce-product-type-options .panel{padding:9px;margin:0}#woocommerce-product-type-options .panel p,.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p{margin:0 0 9px;font-size:12px;padding:5px 9px;line-height:24px}#woocommerce-product-type-options .panel p:after,.woocommerce_options_panel fieldset.form-field:after,.woocommerce_options_panel p:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce_options_panel .checkbox,.woocommerce_variable_attributes .checkbox{width:auto;vertical-align:middle;margin:7px 0}.woocommerce_options_panel .downloadable_files table,.woocommerce_variations .downloadable_files table{width:100%;padding:0!important}.woocommerce_options_panel .downloadable_files table th,.woocommerce_variations .downloadable_files table th{padding:7px 0 7px 7px!important}.woocommerce_options_panel .downloadable_files table td,.woocommerce_variations .downloadable_files table td{vertical-align:middle!important;padding:4px 0 4px 7px!important;position:relative}.woocommerce_options_panel .downloadable_files table td:last-child,.woocommerce_variations .downloadable_files table td:last-child{padding-right:7px!important}.woocommerce_options_panel .downloadable_files table td input.input_text,.woocommerce_variations .downloadable_files table td input.input_text{width:100%;float:none;margin:1px 0;min-width:0}.woocommerce_options_panel .downloadable_files table td .upload_file_button,.woocommerce_variations .downloadable_files table td .upload_file_button{float:right;width:auto;cursor:pointer}.woocommerce_options_panel .downloadable_files table td .delete,.woocommerce_variations .downloadable_files table td .delete{display:block;text-indent:-9999px;position:relative;height:1em;width:1em}.woocommerce_options_panel .downloadable_files table td .delete:before,.woocommerce_variations .downloadable_files table td .delete:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";content:"\e013";color:#999}.woocommerce_options_panel .downloadable_files table td .delete:hover:before,.woocommerce_variations .downloadable_files table td .delete:hover:before{color:#a00}.woocommerce_options_panel .downloadable_files table th.sort,.woocommerce_variations .downloadable_files table th.sort{width:17px;padding:0}.woocommerce_options_panel .downloadable_files table td.sort,.woocommerce_variations .downloadable_files table td.sort{padding:0 8px;cursor:move;background:#f9f9f9;text-align:center;vertical-align:middle}.woocommerce_options_panel .downloadable_files table td.sort:before,.woocommerce_variations .downloadable_files table td.sort:before{content:"\e032";font-family:WooCommerce;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%}.woocommerce_options_panel .downloadable_files table td.sort:hover:before,.woocommerce_variations .downloadable_files table td.sort:hover:before{color:#333}.woocommerce_options_panel{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce_options_panel .downloadable_files{padding:0 9px 0 162px;position:relative;margin:9px 0}.woocommerce_options_panel .downloadable_files label{position:absolute;left:0;margin:0 0 0 12px;line-height:24px}.woocommerce_options_panel p{margin:9px 0}.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p.form-field{padding:5px 20px 5px 162px!important}.woocommerce_options_panel label,.woocommerce_options_panel legend{float:left;width:150px;padding:0;margin:0 0 0 -150px}.woocommerce_options_panel label .req,.woocommerce_options_panel legend .req{font-weight:700;font-style:normal;color:#a00}.woocommerce_options_panel .description{padding:0;margin:0 0 0 7px;clear:none;display:inline}.woocommerce_options_panel .description-block{margin-left:0;display:block}.woocommerce_options_panel input,.woocommerce_options_panel select,.woocommerce_options_panel textarea{margin:0}.woocommerce_options_panel textarea{vertical-align:top;height:3.5em;line-height:1.5em}.woocommerce_options_panel input[type=email],.woocommerce_options_panel input[type=number],.woocommerce_options_panel input[type=text]{width:50%;float:left}.woocommerce_options_panel input.button{width:auto;margin-left:8px}.woocommerce_options_panel select{float:left}.woocommerce_options_panel .short,.woocommerce_options_panel input[type=email].short,.woocommerce_options_panel input[type=number].short,.woocommerce_options_panel input[type=text].short{width:50%}.woocommerce_options_panel .sized{width:auto!important;margin-right:6px}.woocommerce_options_panel .options_group{border-top:1px solid #fff;border-bottom:1px solid #eee}.woocommerce_options_panel .options_group:first-child{border-top:0}.woocommerce_options_panel .options_group:last-child{border-bottom:0}.woocommerce_options_panel .options_group fieldset{margin:9px 0;font-size:12px;padding:5px 9px;line-height:24px}.woocommerce_options_panel .options_group fieldset label{width:auto;float:none}.woocommerce_options_panel .options_group fieldset ul{float:left;width:50%;margin:0;padding:0}.woocommerce_options_panel .options_group fieldset ul li{margin:0;width:auto}.woocommerce_options_panel .options_group fieldset ul li input{width:auto;float:none;margin-right:4px}.woocommerce_options_panel .options_group fieldset ul.wc-radios label{margin-left:0}.woocommerce_options_panel .dimensions_field .wrap{display:block;width:50%}.woocommerce_options_panel .dimensions_field .wrap input{width:30.75%;margin-right:3.8%}.woocommerce_options_panel .dimensions_field .wrap .last{margin-right:0}.woocommerce_options_panel.padded{padding:1em}#woocommerce-product-data input.dp-applied{float:left}#grouped_product_options,#simple_product_options,#virtual_product_options{padding:12px;font-style:italic;color:#666}.wc-metaboxes-wrapper .toolbar{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #eee;padding:9px 12px!important}.wc-metaboxes-wrapper .toolbar:first-child{border-top:0}.wc-metaboxes-wrapper .toolbar:last-child{border-bottom:0}.wc-metaboxes-wrapper .toolbar .add_variation,.wc-metaboxes-wrapper .toolbar .link_all_variations{float:right;margin-left:5px}.wc-metaboxes-wrapper p.toolbar{overflow:hidden;zoom:1}.wc-metaboxes-wrapper .fr,.wc-metaboxes-wrapper button.add_attribute,.wc-metaboxes-wrapper button.add_variable_attribute,.wc-metaboxes-wrapper select.attribute_taxonomy{float:right;margin:0 0 0 6px}.wc-metaboxes-wrapper .wc-metaboxes{border-bottom:1px solid #eee}.wc-metaboxes-wrapper .wc-metabox-sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;margin-bottom:9px;border-width:1px;border-style:dashed}.wc-metaboxes-wrapper .wc-metabox{background:#fff;border-bottom:1px solid #eee;margin:0!important}.wc-metaboxes-wrapper .wc-metabox select{font-weight:400}.wc-metaboxes-wrapper .wc-metabox:last-of-type{border-bottom:0}.wc-metaboxes-wrapper .wc-metabox .handlediv:before{line-height:.5!important}.wc-metaboxes-wrapper .wc-metabox.closed{border-radius:3px}.wc-metaboxes-wrapper .wc-metabox.closed .handlediv:before{content:"\f140"!important}.wc-metaboxes-wrapper .wc-metabox.closed h3{border:0}.wc-metaboxes-wrapper .wc-metabox h3{margin:0!important;padding:.75em .75em .75em 1em!important;font-size:1em!important;overflow:hidden;zoom:1;cursor:move}.wc-metaboxes-wrapper .wc-metabox h3 button{float:right}.wc-metaboxes-wrapper .wc-metabox h3 strong{line-height:24px;font-weight:700}.wc-metaboxes-wrapper .wc-metabox h3 select{font-family:sans-serif}.wc-metaboxes-wrapper .wc-metabox h3 .handlediv{background-position:6px 5px!important;display:none;height:24px}.wc-metaboxes-wrapper .wc-metabox h3.fixed{cursor:pointer!important}.wc-metaboxes-wrapper .wc-metabox h3:hover .handlediv{display:block}.wc-metaboxes-wrapper .wc-metabox table{width:100%;position:relative;background-color:#fdfdfd;padding:1em;border-top:1px solid #eee}.wc-metaboxes-wrapper .wc-metabox table td{text-align:left;padding:0 6px 1em 0;vertical-align:top;border:0}.wc-metaboxes-wrapper .wc-metabox table td label{text-align:left;display:block;line-height:21px}.wc-metaboxes-wrapper .wc-metabox table td input{float:left;min-width:200px}.wc-metaboxes-wrapper .wc-metabox table td input,.wc-metaboxes-wrapper .wc-metabox table td textarea{width:100%;margin:0;display:block;font-size:14px;padding:4px;color:#555}.wc-metaboxes-wrapper .wc-metabox table td .chosen-container,.wc-metaboxes-wrapper .wc-metabox table td select{width:100%!important}.wc-metaboxes-wrapper .wc-metabox table td input.short{width:200px}.wc-metaboxes-wrapper .wc-metabox table td input.checkbox{width:16px;min-width:inherit;vertical-align:text-bottom;display:inline-block;float:none}.wc-metaboxes-wrapper .wc-metabox table td.attribute_name{width:200px}.wc-metaboxes-wrapper .wc-metabox table .minus,.wc-metaboxes-wrapper .wc-metabox table .plus{margin-top:6px}.wc-metaboxes-wrapper .wc-metabox table .fl{float:left}.wc-metaboxes-wrapper .wc-metabox table .fr{float:right}.wc-metaboxes-wrapper .close_all,.wc-metaboxes-wrapper .expand_all{float:right;margin-left:14px;line-height:22px;text-decoration:none}.wc-metaboxes-wrapper .close_all:before,.wc-metaboxes-wrapper .expand_all:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";font-size:.8em;color:#999}.wc-metaboxes-wrapper .expand_all:before{content:"\e035"}.woocommerce_variable_attributes{background-color:#fdfdfd;border-top:1px solid #eee}.woocommerce_variable_attributes .data{padding:1em 2em}.woocommerce_variable_attributes .data:after,.woocommerce_variable_attributes .data:before{content:" ";display:table}.woocommerce_variable_attributes .data:after{clear:both}.woocommerce_variable_attributes .upload_image_button{display:block;width:48px;height:48px;float:left;margin-right:20px;position:relative}.woocommerce_variable_attributes .upload_image_button img{width:100%;height:auto}.woocommerce_variable_attributes .upload_image_button:before{content:"\f317";font-family:Dashicons;display:none;position:absolute;top:0;left:0;right:0;bottom:0;text-align:center;line-height:48px;font-size:2em;font-weight:400;-webkit-font-smoothing:antialiased}.woocommerce_variable_attributes .upload_image_button.remove:before{content:"\f335"}.woocommerce_variable_attributes .upload_image_button:hover:before{display:block}.woocommerce_variable_attributes .options{border:1px solid #eee;border-width:1px 0;padding:.25em 0}.woocommerce_variable_attributes .options label{display:inline-block;padding:4px 1em 2px 0}.woocommerce_variable_attributes .options input[type=checkbox]{margin-top:5px;margin-right:3px}.form-row label{display:block}.form-row input[type=number],.form-row input[type=text],.form-row select{width:100%}.form-row.dimensions_field input{width:25%;float:left;margin-right:1%}.form-row.dimensions_field input:last-of-type{margin-right:0}.form-row-first,.form-row-last{width:48%;float:right}.form-row-first{clear:both;float:left}.form-row-full{clear:both}.tips{cursor:help;text-decoration:none}img.tips{padding:5px 0 0}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#464646}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#464646}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#464646}#tiptip_holder.tip_left{padding-right:5px}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#464646}#tiptip_content,.chart-tooltip,.wc_error_tip{font-size:11px;color:#fff;padding:.5em;background:#464646;border-radius:3px;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.1);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.1);box-shadow:1px 1px 3px rgba(0,0,0,.1);text-align:center;max-width:150px}#tiptip_content code,.chart-tooltip code,.wc_error_tip code{background:#888;padding:1px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}.wc_error_tip{background:#d82223;max-width:20em;white-space:normal;position:absolute;margin:1.5em 1px 0 -1em;z-index:9999999}.wc_error_tip:after{content:"";display:block;border:8px solid #d82223;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;position:absolute;top:-3px;left:50%;margin:-1em 0 0 -3px}img.ui-datepicker-trigger{vertical-align:middle;margin-top:-1px;cursor:pointer}.wc-metabox-content img.ui-datepicker-trigger,.woocommerce_options_panel img.ui-datepicker-trigger{float:left;margin-right:8px;margin-top:4px;margin-left:4px}#ui-datepicker-div{display:none}.woocommerce-reports-wide.woocommerce-reports-wrap,.woocommerce-reports-wrap.woocommerce-reports-wrap{margin-left:300px;padding-top:18px}.woocommerce-reports-wide.halved,.woocommerce-reports-wrap.halved{margin:0;overflow:hidden;zoom:1}.woocommerce-reports-wide .widefat td,.woocommerce-reports-wrap .widefat td{vertical-align:top;padding:7px}.woocommerce-reports-wide .widefat td .description,.woocommerce-reports-wrap .widefat td .description{margin:4px 0 0}.woocommerce-reports-wide .postbox:after,.woocommerce-reports-wrap .postbox:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce-reports-wide .postbox h3,.woocommerce-reports-wrap .postbox h3{cursor:default!important}.woocommerce-reports-wide .postbox .inside,.woocommerce-reports-wrap .postbox .inside{padding:10px;margin:0!important}.woocommerce-reports-wide .postbox h3.stats_range,.woocommerce-reports-wrap .postbox h3.stats_range{padding:0!important;border-bottom-color:#dfdfdf}.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{float:right;line-height:26px;border-left:1px solid #dfdfdf;padding:10px;display:block;text-decoration:none}.woocommerce-reports-wide .postbox h3.stats_range .export_csv:before,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;content:"";margin-right:4px}.woocommerce-reports-wide .postbox h3.stats_range ul,.woocommerce-reports-wrap .postbox h3.stats_range ul{list-style:none;margin:0;padding:0;zoom:1;background:#f5f5f5}.woocommerce-reports-wide .postbox h3.stats_range ul:after,.woocommerce-reports-wide .postbox h3.stats_range ul:before,.woocommerce-reports-wrap .postbox h3.stats_range ul:after,.woocommerce-reports-wrap .postbox h3.stats_range ul:before{content:" ";display:table}.woocommerce-reports-wide .postbox h3.stats_range ul:after,.woocommerce-reports-wrap .postbox h3.stats_range ul:after{clear:both}.woocommerce-reports-wide .postbox h3.stats_range ul li,.woocommerce-reports-wrap .postbox h3.stats_range ul li{float:left;margin:0;padding:0;line-height:26px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li a{border-right:1px solid #dfdfdf;padding:10px;display:block;text-decoration:none}.woocommerce-reports-wide .postbox h3.stats_range ul li.active,.woocommerce-reports-wrap .postbox h3.stats_range ul li.active{background:#fff;-webkit-box-shadow:0 4px 0 0 #fff;box-shadow:0 4px 0 0 #fff}.woocommerce-reports-wide .postbox h3.stats_range ul li.active a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.active a{color:#777}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:9px 10px;vertical-align:middle}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom div,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom form,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom div,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom form{display:inline;margin:0}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom div input.range_datepicker,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom form input.range_datepicker,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom div input.range_datepicker,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom form input.range_datepicker{padding:0;margin:0 10px 0 0;background:0 0;border:0;color:#777;text-align:center;-webkit-box-shadow:none;box-shadow:none}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding:12px 12px 12px 249px;margin:0!important}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{width:225px;margin-left:-237px;float:left}.woocommerce-reports-wide .postbox .chart-widgets,.woocommerce-reports-wrap .postbox .chart-widgets{margin:0;padding:0}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget{margin:0 0 1em;background:#fafafa;border:1px solid #dfdfdf}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget h4,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget h4{background:#fff;border:1px solid #dfdfdf;border-left-width:0;border-right-width:0;padding:10px;margin:0;color:#2ea2cc;border-top-width:0;background:-webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9)) #fff;background:-webkit-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:-moz-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:-o-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:#f9f9f9 #fff}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget h4.section_title:hover,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget h4.section_title:hover{color:#a00}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title{cursor:pointer}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title span,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title span{display:block}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title span:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title span:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin-left:.618em;content:"";float:right;font-size:.9em;line-height:1.618}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title.open,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title.open{color:#333}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title.open span:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title.open span:after{display:none}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section{border-bottom:1px solid #dfdfdf}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section .chosen-container,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section .chosen-container{width:100%!important}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section:last-of-type,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section:last-of-type{border-radius:0 0 3px 3px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table{width:100%}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td{padding:7px 10px;vertical-align:top;border-top:1px solid #e5e5e5;line-height:1.4em}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table tr:first-child td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table tr:first-child td{border-top:0}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.count,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.count{background:#f5f5f5}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.name,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.name{max-width:175px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.name a,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.name a{word-wrap:break-word}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.sparkline,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.sparkline{vertical-align:middle}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table .wc_sparkline,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table .wc_sparkline{width:32px;height:1em;display:block;float:right}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table tr.active td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table tr.active td{background:#f5f5f5}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget form,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget p,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget form,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget p{margin:0;padding:10px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget form .submit,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget p .submit,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget form .submit,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget p .submit{margin-top:10px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget #product_ids,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget #product_ids{width:100%}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .select_all,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .select_none,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .select_all,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .select_none{float:right;color:#999;margin-left:4px;margin-top:10px}.woocommerce-reports-wide .postbox .chart-legend,.woocommerce-reports-wrap .postbox .chart-legend{list-style:none;margin:0 0 1em;padding:0;border:1px solid #dfdfdf;border-right-width:0;border-bottom-width:0;background:#fff}.woocommerce-reports-wide .postbox .chart-legend li,.woocommerce-reports-wrap .postbox .chart-legend li{border-right:5px solid #aaa;color:#aaa;padding:1em;display:block;margin:0;-webkit-transition:all ease .5s;box-shadow:inset 0 -1px 0 0 #dfdfdf}.woocommerce-reports-wide .postbox .chart-legend li strong,.woocommerce-reports-wrap .postbox .chart-legend li strong{font-size:1.618em;line-height:1.2em;color:#464646;font-weight:400;display:block;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif}.woocommerce-reports-wide .postbox .chart-legend li:hover,.woocommerce-reports-wrap .postbox .chart-legend li:hover{box-shadow:inset 0 -1px 0 0 #dfdfdf,inset 300px 0 0 rgba(156,93,144,.1);border-right:5px solid #9c5d90!important;padding-left:1.5em;color:#9c5d90}.woocommerce-reports-wide .postbox .pie-chart-legend,.woocommerce-reports-wrap .postbox .pie-chart-legend{margin:12px 0 0;overflow:hidden}.woocommerce-reports-wide .postbox .pie-chart-legend li,.woocommerce-reports-wrap .postbox .pie-chart-legend li{float:left;margin:0;padding:6px 0 0;border-top:4px solid #999;text-align:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:50%}.woocommerce-reports-wide .postbox .stat,.woocommerce-reports-wrap .postbox .stat{font-size:1.5em!important;font-weight:700;text-align:center}.woocommerce-reports-wide .postbox .chart-placeholder,.woocommerce-reports-wrap .postbox .chart-placeholder{width:100%;height:650px;overflow:hidden;position:relative}.woocommerce-reports-wide .postbox .chart-prompt,.woocommerce-reports-wrap .postbox .chart-prompt{line-height:650px;margin:0;color:#999;font-size:1.2em;font-style:italic;text-align:center}.woocommerce-reports-wide .postbox .chart-container,.woocommerce-reports-wrap .postbox .chart-container{background:#fff;padding:12px;position:relative;border:1px solid #dfdfdf;border-radius:3px}.woocommerce-reports-wide .postbox .main .chart-legend,.woocommerce-reports-wrap .postbox .main .chart-legend{margin-top:12px}.woocommerce-reports-wide .postbox .main .chart-legend li,.woocommerce-reports-wrap .postbox .main .chart-legend li{border-right:0;margin:0 8px 0 0;float:left;border-top:4px solid #aaa}.woocommerce-reports-wide .woocommerce-reports-main,.woocommerce-reports-wrap .woocommerce-reports-main{float:left;min-width:100%}.woocommerce-reports-wide .woocommerce-reports-main table td,.woocommerce-reports-wrap .woocommerce-reports-main table td{padding:9px}.woocommerce-reports-wide .woocommerce-reports-sidebar,.woocommerce-reports-wrap .woocommerce-reports-sidebar{display:inline;width:281px;margin-left:-300px;clear:both;float:left}.woocommerce-reports-wide .woocommerce-reports-left,.woocommerce-reports-wrap .woocommerce-reports-left{width:49.5%;float:left}.woocommerce-reports-wide .woocommerce-reports-right,.woocommerce-reports-wrap .woocommerce-reports-right{width:49.5%;float:right}.woocommerce-reports-wide .column-wc_actions a.edit,.woocommerce-reports-wide .column-wc_actions a.view,.woocommerce-reports-wrap .column-wc_actions a.edit,.woocommerce-reports-wrap .column-wc_actions a.view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.woocommerce-reports-wide .column-wc_actions a.edit:after,.woocommerce-reports-wide .column-wc_actions a.view:after,.woocommerce-reports-wrap .column-wc_actions a.edit:after,.woocommerce-reports-wrap .column-wc_actions a.view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.woocommerce-reports-wide .column-wc_actions a.edit:after,.woocommerce-reports-wrap .column-wc_actions a.edit:after{content:"\e01c"}.woocommerce-reports-wide .column-wc_actions a.view:after,.woocommerce-reports-wrap .column-wc_actions a.view:after{content:"\e010"}.woocommerce-wide-reports-wrap{padding-bottom:11px}.woocommerce-wide-reports-wrap .widefat .export-data{float:right}.woocommerce-wide-reports-wrap .widefat td,.woocommerce-wide-reports-wrap .widefat th{vertical-align:middle;padding:7px}form.report_filters div,form.report_filters input,form.report_filters label,form.report_filters p{vertical-align:middle}.chart-tooltip{position:absolute;display:none;line-height:1}table.bar_chart{width:100%}table.bar_chart thead th{text-align:left;color:#ccc;padding:6px 0}table.bar_chart tbody th{padding:6px 0;width:25%;text-align:left!important;font-weight:400!important;border-bottom:1px solid #fee}table.bar_chart tbody td{text-align:right;line-height:24px;padding:6px 6px 6px 0;border-bottom:1px solid #fee}table.bar_chart tbody td span{color:#8a4b75;display:block}table.bar_chart tbody td span.alt{color:#47a03e;margin-top:6px}table.bar_chart tbody td.bars{position:relative;text-align:left;padding:6px 6px 6px 0;border-bottom:1px solid #fee}table.bar_chart tbody td.bars a,table.bar_chart tbody td.bars span{text-decoration:none;clear:both;background:#8a4b75;float:left;display:block;line-height:24px;height:24px;-moz-border-radius:3px;-webkit-border-radius:3px;-o-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}table.bar_chart tbody td.bars span.alt{clear:both;background:#47a03e}table.bar_chart tbody td.bars span.alt span{margin:0;color:#c5dec2!important;text-shadow:0 1px 0 #47a03e;background:0 0}#profile-page .api-keys-wrapper{float:left;padding-bottom:10px}#profile-page .api-keys-get-qr{float:left;padding-left:10px}.chosen-container-single .chosen-single{height:26px;line-height:26px;margin-top:1px}.chosen-container-single .chosen-single div b{background:url(../images/chosen-sprite.png) 0 4px no-repeat!important}.chosen-container-active .chosen-single-with-drop div b{background-position:-18px 2px!important}.chosen-container-single .chosen-search input{line-height:13px;width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container-multi .chosen-choices .search-field input{height:21px!important}.woocommerce_options_panel .chosen-container-multi{width:50%!important;float:left}.woocommerce_options_panel .chosen-container-multi .search-field{min-width:50%}.woocommerce_options_panel .chosen-container-multi .search-field input{min-width:100%}.chosen-container-single .chosen-single abbr{top:8px}@media only screen and (max-width:1280px){.woocommerce_options_panel .chosen-container-multi{width:80%!important}#order_data .order_data_column{width:48%}#order_data .order_data_column:first-child{width:100%}.woocommerce_options_panel .description{display:block;clear:both;margin-left:0}.woocommerce_options_panel .dimensions_field .wrap,.woocommerce_options_panel .short,.woocommerce_options_panel input[type=email].short,.woocommerce_options_panel input[type=number].short,.woocommerce_options_panel input[type=text].short{width:80%}.woocommerce_options_panel .downloadable_files,.woocommerce_variations .downloadable_files{padding:0;clear:both}.woocommerce_options_panel .downloadable_files label,.woocommerce_variations .downloadable_files label{position:static}.woocommerce_options_panel .downloadable_files table,.woocommerce_variations .downloadable_files table{margin:0 12px 24px;width:94%}.woocommerce_options_panel .downloadable_files table .sort,.woocommerce_variations .downloadable_files table .sort{display:none}.woocommerce_options_panel .woocommerce_variable_attributes .downloadable_files table,.woocommerce_variations .woocommerce_variable_attributes .downloadable_files table{margin:0 0 1em;width:100%}}@media only screen and (max-width:900px){#woocommerce-product-data .wc-tabs-back,#woocommerce-product-data ul.product_data_tabs{width:10%}#woocommerce-coupon-data .wc-metaboxes-wrapper,#woocommerce-coupon-data .woocommerce_options_panel,#woocommerce-product-data .wc-metaboxes-wrapper,#woocommerce-product-data .woocommerce_options_panel{width:90%}#woocommerce-product-data ul.product_data_tabs li a{position:relative;text-indent:-999px;padding:10px}#woocommerce-product-data ul.product_data_tabs li a:before{position:absolute;top:0;right:0;bottom:0;left:0;text-indent:0;text-align:center;line-height:40px;width:100%;height:40px}}@media only screen and (max-width:782px){#wp-excerpt-media-buttons a{font-size:16px;line-height:37px;height:39px;padding:0 20px 0 15px}#wp-excerpt-editor-tools{padding-top:20px;padding-right:15px;overflow:hidden;margin-bottom:-1px}#woocommerce-product-data .checkbox{width:25px}}@media only screen and (max-width:500px){.woocommerce_options_panel label,.woocommerce_options_panel legend{float:none;width:auto;display:block;margin:0}.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p.form-field{padding:5px 20px!important}}.wc-backbone-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:160000}.wc-backbone-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.wc-backbone-modal .wc-backbone-modal-content{position:absolute;top:50%;left:50%;width:500px;background:#fff;margin:-150px 0 0 -250px}.wc-backbone-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.wc-backbone-modal-main{padding-bottom:50px}.wc-backbone-modal-main article,.wc-backbone-modal-main header{display:block;position:relative;padding:4px 16px}.wc-backbone-modal-main header{border-bottom:1px solid #ddd}.wc-backbone-modal-main article{padding:10px 16px}.wc-backbone-modal-main article .pagination{padding:10px 0 0;text-align:center}.wc-backbone-modal-main h1{font-size:22px;font-weight:200;line-height:45px;margin:0}.wc-backbone-modal-main footer{position:absolute;left:0;right:0;bottom:0;height:30px;z-index:100;padding:10px 0;border:0 solid #dfdfdf;border-width:1px 0 0;box-shadow:0 -4px 4px -4px rgba(0,0,0,.1)}.wc-backbone-modal-main footer .inner{padding:0 10px;text-align:right} \ No newline at end of file +@charset "UTF-8";@-moz-keyframes spin{100%{-moz-transform:rotate(360deg)}}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.woocommerce-checkout .form-row .chosen-container{width:100%!important}.woocommerce-checkout .form-row .chosen-container-single .chosen-single{height:28px;line-height:29px}.woocommerce-checkout .form-row .chosen-container-single .chosen-single div b{background:url(../images/chosen-sprite.png) 0 3px no-repeat!important}.woocommerce-checkout .form-row .chosen-container-active .chosen-single-with-drop div b{background-position:-18px 4px!important}.woocommerce-checkout .form-row .chosen-container-single .chosen-search input{line-height:13px;width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce-checkout .form-row .chosen-container .chosen-drop{width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.woocommerce-checkout .form-row .chosen-container-single .chosen-single div b{background-image:url(../images/chosen-sprite@2x.png)!important;background-position:0 5px!important;background-repeat:no-repeat!important;background-size:52px 37px!important}.woocommerce-checkout .form-row .chosen-container-active .chosen-single-with-drop div b{background-position:-18px 5px!important}}.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;border:1px solid #aaa;border-radius:5px;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:0 0,top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%;background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;right:26px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover,.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:url(../images/chosen-sprite.png) 100% -20px no-repeat #fff;background:url(../images/chosen-sprite.png) 100% -20px no-repeat,-o-linear-gradient(#eee 1%,#fff 15%);background:url(../images/chosen-sprite.png) 100% -20px no-repeat,0 0,0 0,#eee 1%,#fff 15%;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.chosen-container .chosen-results{position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear,false,#3875d7 20%,#2a62bc 90%;color:#fff}.chosen-container .chosen-results li.no-results{display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear,false,#eee 1%,#fff 15%;cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:5px;height:15px;outline:0;border:0!important;background:0 0!important;box-shadow:none;color:#666;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-multi .chosen-choices li.search-field .default{color:#999}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 0 3px 5px;padding:3px 20px 3px 5px;border:1px solid #aaa;border-radius:3px;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear,false,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%;background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear,top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%;color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#eee),color-stop(80%,#fff));background-image:-webkit-linear-gradient(#eee 20%,#fff 80%);background-image:-moz-linear-gradient(#eee 20%,#fff 80%);background-image:-o-linear-gradient(#eee 20%,#fff 80%);background-image:linear,false,#eee 20%,#fff 80%;box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#111!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close,.chosen-disabled .chosen-single{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl .chosen-drop,.chosen-rtl.chosen-container-single-nosearch .chosen-search{left:9999px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:url(../images/chosen-sprite.png) -30px -20px no-repeat #fff;background:url(../images/chosen-sprite.png) -30px -20px no-repeat,-o-linear-gradient(#eee 1%,#fff 15%);background:url(../images/chosen-sprite.png) -30px -20px no-repeat,0 0,0 0,#eee 1%,#fff 15%;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-rtl .chosen-search input[type=text]{background-image:url(../images/chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}.blockUI.blockOverlay:before{height:1em;width:1em;position:absolute;top:50%;left:50%;margin-left:-.5em;margin-top:-.5em;display:block;-webkit-animation:spin 2s linear infinite;-moz-animation:spin 2s linear infinite;animation:spin 2s linear infinite;font-family:Dashicons;content:"\f463";line-height:1;text-align:center;font-size:2em;color:rgba(0,0,0,.75);vertical-align:top;-webkit-font-smoothing:antialiased;font-weight:400}.wc_addons_wrap .products{overflow:hidden}.wc_addons_wrap .products li{float:left;margin:0 1em 1em 0!important;padding:0;vertical-align:top;width:300px}.wc_addons_wrap .products li a{text-decoration:none;color:inherit;border:1px solid #ddd;display:block;min-height:220px;overflow:hidden;background:#f5f5f5;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1)}.wc_addons_wrap .products li a img{max-width:258px;max-height:24px;padding:17px 20px;display:block;margin:0;background:#fff;border-right:260px solid #fff}.wc_addons_wrap .products li a .price,.wc_addons_wrap .products li a img.extension-thumb+h3{display:none}.wc_addons_wrap .products li a h3{margin:0!important;padding:20px!important;background:#fff}.wc_addons_wrap .products li a p{padding:20px!important;margin:0!important;border-top:1px solid #f1f1f1}.wc_addons_wrap .products li a:focus,.wc_addons_wrap .products li a:hover{background-color:#fff}.woocommerce-message{position:relative;border-left-color:#cc99c2!important;overflow:hidden}.woocommerce-message a.button-primary,.woocommerce-message button.button-primary{background:#cc99c2;border-color:#b366a4;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none!important}.woocommerce-message a.button-primary:hover,.woocommerce-message button.button-primary:hover{background:#bb77ae;border-color:#aa559a;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15)}.woocommerce-message a.button-primary:active,.woocommerce-message button.button-primary:active{background:#aa559a;border-color:#aa559a}.woocommerce-message a.docs,.woocommerce-message a.skip{opacity:.5}.woocommerce-message .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}#variable_product_options #message{margin:10px}.clear{clear:both}.wrap.woocommerce div.error,.wrap.woocommerce div.updated{margin-top:10px}mark.amount{background:0 0;color:inherit}.postbox,.woocommerce{input:invalid;input-border:1px solid #cc010b;input-background:#ffebe8}.simplify-commerce-banner{overflow:hidden}.simplify-commerce-banner img{float:right;padding:15px 0;margin-left:1em;width:200px}table.wc_status_table{margin-bottom:1em}table.wc_status_table tr:nth-child(2n) td,table.wc_status_table tr:nth-child(2n) th{background:#fcfcfc}table.wc_status_table th{font-weight:700;padding:9px}table.wc_status_table td:first-child{width:33%}table.wc_status_table td.help{width:1em}table.wc_status_table td{padding:9px;font-size:1.1em}table.wc_status_table td mark{background:0 0}table.wc_status_table td mark.yes{color:#7ad03a}table.wc_status_table td mark.no{color:#999}table.wc_status_table td mark.error{color:#a00}table.wc_status_table td ul{margin:0}table.wc_status_table .help_tip{cursor:help}#debug-report{display:none;margin:10px 0;padding:0;position:relative}#debug-report textarea{font-family:monospace;width:100%;margin:0;height:300px;padding:20px;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;resize:none;font-size:12px;line-height:20px;outline:0}#log-viewer-select{padding:10px 0 8px;line-height:180%}#log-viewer textarea{width:100%;resize:vertical}.inline-edit-product.quick-edit-row .inline-edit-col-center,.inline-edit-product.quick-edit-row .inline-edit-col-right{float:right!important}#woocommerce-fields.inline-edit-col{clear:left}#woocommerce-fields.inline-edit-col label.featured,#woocommerce-fields.inline-edit-col label.manage_stock{margin-left:10px}#woocommerce-fields.inline-edit-col .dimensions div{display:block;margin:.2em 0}#woocommerce-fields.inline-edit-col .dimensions div span.title{display:block;float:left;width:5em}#woocommerce-fields.inline-edit-col .dimensions div span.input-text-wrap{display:block;margin-left:5em}#woocommerce-fields.inline-edit-col .text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:99%;float:left;margin:1px 1% 1px 1px}#woocommerce-fields.inline-edit-col .height,#woocommerce-fields.inline-edit-col .length,#woocommerce-fields.inline-edit-col .width{width:32.33%}#woocommerce-fields.inline-edit-col .height{margin-right:0}#woocommerce-fields-bulk.inline-edit-col label{clear:left}#woocommerce-fields-bulk.inline-edit-col .inline-edit-group label{clear:none;width:49%;margin:.2em 0}#woocommerce-fields-bulk.inline-edit-col .inline-edit-group.dimensions label{width:75%;max-width:75%}#woocommerce-fields-bulk.inline-edit-col .length,#woocommerce-fields-bulk.inline-edit-col .regular_price,#woocommerce-fields-bulk.inline-edit-col .sale_price,#woocommerce-fields-bulk.inline-edit-col .stock,#woocommerce-fields-bulk.inline-edit-col .weight{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;margin-left:4.4em}#woocommerce-fields-bulk.inline-edit-col .height,#woocommerce-fields-bulk.inline-edit-col .length,#woocommerce-fields-bulk.inline-edit-col .width{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:25%}.column-coupon_code{line-height:2.25em}.column-coupon_code,ul.wc_coupon_list{margin:0;overflow:hidden;zoom:1;clear:both}ul.wc_coupon_list_block{margin:0;padding-bottom:2px}ul.wc_coupon_list_block li{border-top:1px solid #fff;border-bottom:1px solid #ccc;line-height:2.5em;margin:0;padding:.5em 0}ul.wc_coupon_list_block li:first-child{border-top:0;padding-top:0}ul.wc_coupon_list_block li:last-child{border-bottom:0;padding-bottom:0}.button.wc-reload{text-indent:-9999px;position:relative;padding:0;-webkit-border-radius:100%;border-radius:100%;height:24px;width:24px!important;display:inline-block}.button.wc-reload:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:22px}.tablenav .actions{overflow:visible}.alignleft.actions .chosen-container-single{display:inline-block;vertical-align:middle}#woocommerce-order-data .handlediv,#woocommerce-order-data h3.hndle{display:none}#woocommerce-order-data .inside{display:block!important}#order_data{padding:23px 24px 12px}#order_data h2{margin:0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;font-size:21px;font-weight:400;line-height:1.2;text-shadow:1px 1px 1px #fff;padding:0}#order_data h4{color:#333;margin:1.33em 0 0}#order_data p{color:#777}#order_data p.order_number{margin:0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;font-weight:400;line-height:1.6em;font-size:16px}#order_data .order_data_column_container{clear:both}#order_data .order_data_column{width:32%;padding:0 2% 0 0;float:left}#order_data .order_data_column:last-child{padding-right:0}#order_data .order_data_column p{padding:0!important}#order_data .order_data_column .address strong{display:block}#order_data .order_data_column .form-field{float:left;width:48%;padding:0;margin:9px 0 0}#order_data .order_data_column .form-field label{display:block;padding:0 0 3px}#order_data .order_data_column .form-field input,#order_data .order_data_column .form-field select,#order_data .order_data_column .form-field textarea{width:100%}#order_data .order_data_column .form-field #order_status_chosen .chosen-search{display:none}#order_data .order_data_column .form-field .chosen-container{width:100%!important}#order_data .order_data_column .form-field .date-picker-field{width:50%}#order_data .order_data_column .form-field .hour,#order_data .order_data_column .form-field .minute{width:2.5em}#order_data .order_data_column .form-field small{display:block;margin:5px 0 0;color:#999}#order_data .order_data_column .form-field.last{float:right}#order_data .order_data_column .form-field-wide{width:100%;clear:both}#order_data .order_data_column .form-field-wide input,#order_data .order_data_column .form-field-wide select,#order_data .order_data_column .form-field-wide textarea{width:100%}#order_data .order_data_column p.none_set{color:#999}#order_data .order_data_column ._billing_address_1_field,#order_data .order_data_column ._billing_city_field,#order_data .order_data_column ._billing_country_field,#order_data .order_data_column ._billing_email_field,#order_data .order_data_column ._billing_first_name_field,#order_data .order_data_column ._shipping_address_1_field,#order_data .order_data_column ._shipping_city_field,#order_data .order_data_column ._shipping_country_field,#order_data .order_data_column ._shipping_first_name_field{float:left}#order_data .order_data_column ._billing_address_2_field,#order_data .order_data_column ._billing_last_name_field,#order_data .order_data_column ._billing_phone_field,#order_data .order_data_column ._billing_postcode_field,#order_data .order_data_column ._billing_state_field,#order_data .order_data_column ._shipping_address_2_field,#order_data .order_data_column ._shipping_last_name_field,#order_data .order_data_column ._shipping_postcode_field,#order_data .order_data_column ._shipping_state_field{float:right}#order_data .order_data_column ._billing_company_field,#order_data .order_data_column ._shipping_company_field,#order_data .order_data_column ._transaction_id_field{clear:both;width:100%}#order_data .order_data_column ._billing_email_field{clear:left}#order_data .order_data_column div.edit_address{display:none;zoom:1;padding-right:1px}#order_data a.edit_address{opacity:.4}#order_data a.edit_address:focus,#order_data a.edit_address:hover{opacity:1}.order_actions{margin:0;overflow:hidden;zoom:1}.order_actions li{border-top:1px solid #fff;border-bottom:1px solid #ddd;padding:6px 0;margin:0;line-height:1.6em;float:left;width:50%;text-align:center}.order_actions li a{float:none;text-align:center;text-decoration:underline}.order_actions li.wide{width:auto;float:none;clear:both;padding:6px;text-align:left;overflow:hidden}.order_actions li #delete-action{line-height:25px;vertical-align:middle;text-align:left;float:left}.order_actions li .save_order{float:right}.order_actions li#actions{overflow:hidden}.order_actions li#actions .button{width:24px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:right}.order_actions li#actions select{width:225px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left}#woocommerce-order-items .inside{margin:0;padding:0;background:#fefefe}#woocommerce-order-items .wc-order-data-row{border-bottom:1px solid #DFDFDF;padding:12px;background:#f8f8f8;line-height:2em;text-align:right}#woocommerce-order-items .wc-order-data-row:after,#woocommerce-order-items .wc-order-data-row:before{content:" ";display:table}#woocommerce-order-items .wc-order-data-row:after{clear:both}#woocommerce-order-items .wc-order-data-row p{margin:0;line-height:2em}#woocommerce-order-items .wc-order-bulk-actions{background:#fefefe;vertical-align:top;border-top:0}#woocommerce-order-items .wc-order-bulk-actions select{vertical-align:top}#woocommerce-order-items .wc-order-bulk-actions p.bulk-actions{float:left}#woocommerce-order-items .wc-order-add-item{background:#fff;vertical-align:top;border-top:none}#woocommerce-order-items .wc-order-add-item .add_item_id,#woocommerce-order-items .wc-order-add-item .chosen-container{vertical-align:top}#woocommerce-order-items .wc-order-add-item .add_item_id .search-field input,#woocommerce-order-items .wc-order-add-item .chosen-container .search-field input{min-width:100px}#woocommerce-order-items .wc-order-add-item .chosen-container{width:400px!important;text-align:left}#woocommerce-order-items .wc-order-add-item .calculate-action,#woocommerce-order-items .wc-order-add-item .cancel-action,#woocommerce-order-items .wc-order-add-item .save-action{float:left;margin-right:2px}#woocommerce-order-items .wc-used-coupons{float:left;width:50%}#woocommerce-order-items .wc-order-totals{float:right;width:50%;margin:0;padding:0}#woocommerce-order-items .wc-order-totals .amount{font-weight:700}#woocommerce-order-items .wc-order-totals .label{vertical-align:top}#woocommerce-order-items .wc-order-totals .total{font-size:1em!important;width:10em;margin:0 0 0 .5em;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-order-items .wc-order-totals .total input[type=text]{width:96%;float:right}#woocommerce-order-items .wc-order-totals .refunded-total{color:#a00}#woocommerce-order-items .refund-actions{margin-top:5px;padding-top:12px;border-top:1px solid #DFDFDF}#woocommerce-order-items .refund-actions .button{float:right;margin-left:4px}#woocommerce-order-items .refund-actions .cancel-action{float:left;margin-left:0}#woocommerce-order-items .add_meta{margin-left:0!important}#woocommerce-order-items h3 small{color:#999}#woocommerce-order-items .amount{white-space:nowrap}#woocommerce-order-items .add-items .description{margin-right:10px}.woocommerce_order_items_wrapper{margin:0;overflow:auto}.woocommerce_order_items_wrapper table.woocommerce_order_items{width:100%;background:#fff}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th{background:#f8f8f8;padding:8px;font-size:11px;text-align:left;color:#555;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th:last-child{padding-right:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th:first-child{padding-left:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th.sortable{cursor:pointer}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th,.woocommerce_order_items_wrapper table.woocommerce_order_items td{padding:8px;text-align:left;line-height:26px;vertical-align:top;border-bottom:1px dotted #ececec}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items td textarea{width:100%}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th select,.woocommerce_order_items_wrapper table.woocommerce_order_items td select{width:50%}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th input,.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items td input,.woocommerce_order_items_wrapper table.woocommerce_order_items td textarea{font-size:14px;padding:4px;color:#555}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items td:last-child{padding-right:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th:first-child,.woocommerce_order_items_wrapper table.woocommerce_order_items td:first-child{padding-left:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody tr:last-child td{border-bottom:1px solid #dfdfdf}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody tr:first-child td{border-top:8px solid #f8f8f8}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody#order_line_items tr:first-child td{border-top:none}.woocommerce_order_items_wrapper table.woocommerce_order_items td.check-column{padding:8px 8px 8px 12px;width:1%}.woocommerce_order_items_wrapper table.woocommerce_order_items .item{min-width:200px}.woocommerce_order_items_wrapper table.woocommerce_order_items .center,.woocommerce_order_items_wrapper table.woocommerce_order_items .variation-id{text-align:center}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class{text-align:right}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax label,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity label,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax label,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class label{white-space:nowrap;color:#999;font-size:.833em}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class label input{display:inline}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class input{width:70px;vertical-align:middle;text-align:right}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax select,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity select,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax select,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class select{width:85px;height:26px;vertical-align:middle;font-size:1em}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input{display:block;background:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);margin:1px;width:70px}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input input{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:0;box-shadow:none;margin:0;color:#555;background:0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input input:last-child{color:#bbb;border-top:1px dashed #ddd}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .view{white-space:nowrap}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost del,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost del,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost del,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax del,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity del,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax del,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class del{color:#ccc}.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity{text-align:center}.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity input{text-align:center;width:50px}.woocommerce_order_items_wrapper table.woocommerce_order_items span.subtotal{opacity:.5}.woocommerce_order_items_wrapper table.woocommerce_order_items td.tax_class,.woocommerce_order_items_wrapper table.woocommerce_order_items th.tax_class{text-align:left}.woocommerce_order_items_wrapper table.woocommerce_order_items .calculated{border-color:#ae8ca2;border-style:dotted}.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta{width:100%}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta{margin:.5em 0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr th,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr th{border:0;padding:0 4px .5em 0;line-height:1.5em;width:20%}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td{padding:0 4px .5em 0;border:0;line-height:1.5em}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td input,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td input{width:100%;margin:0;position:relative;border-bottom:0;box-shadow:none}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td textarea{width:100%;height:4em;margin:0;box-shadow:none}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td input:focus+textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td input:focus+textarea{border-top-color:#999}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td p,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td p{margin:0 0 .5em;line-height:1.5em}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td p:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td p:last-child{margin:0}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb{text-align:left;width:27px}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb a{display:block}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb img{padding:1px;margin:0;border:1px solid #dfdfdf;vertical-align:middle;width:21px;height:21px}.woocommerce_order_items_wrapper table.woocommerce_order_items .refund_by{border-bottom:1px dotted #999}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.fee .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.fee .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.refund .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.refund .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.shipping .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.shipping .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax{white-space:nowrap}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax{padding:8px 16px 8px 8px}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:12px;visibility:hidden;float:right;margin:2px -16px 0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax:before,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#fff;background-color:#000;-webkit-border-radius:100%;border-radius:100%;border:1px solid #000;box-shadow:0 1px 2px rgba(0,0,0,.2)}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax:hover:before,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax:hover:before{border-color:#a00;background-color:#a00}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax:hover .delete-order-tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax:hover .delete-order-tax{visibility:visible}.woocommerce_order_items_wrapper table.woocommerce_order_items small.refunded{display:block;color:#a00;white-space:nowrap}.wc-order-items-editable .edit-order-item{text-indent:-9999px;position:relative;height:1em;width:1em;display:inline-block;margin:0 .5em 0 0}.wc-order-items-editable .edit-order-item:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";content:"\e603";color:#999}.wc-order-items-editable .edit-order-item:hover:before{color:#555}.wc-order-items-editable .delete-order-item,.wc-order-items-editable .delete_refund{text-indent:-9999px;position:relative;height:1em;width:1em;display:inline-block;margin:0}.wc-order-items-editable .delete-order-item:before,.wc-order-items-editable .delete_refund:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";content:"\e013";color:#999}.wc-order-items-editable .delete-order-item:hover:before,.wc-order-items-editable .delete_refund:hover:before{color:#a00}.wc-order-items-editable .wc-order-edit-line-item-actions{width:2.5em;text-align:right}.wc-order-items-editable .wc-order-totals .wc-order-edit-line-item-actions{width:1.5em}.wc-order-items-editable .wc-order-totals .edit-order-item{margin:0}#woocommerce-order-downloads .buttons{float:left;padding:0;margin:0;vertical-align:top}#woocommerce-order-downloads .buttons .add_item_id,#woocommerce-order-downloads .buttons .chosen-container{width:400px!important;margin-right:9px;vertical-align:top;float:left}#woocommerce-order-downloads .buttons button{margin:2px 0 0}#woocommerce-order-downloads h3 small{color:#999}#poststuff #woocommerce-order-actions .inside{margin:0;padding:0}#poststuff #woocommerce-order-actions .inside ul.order_actions li{padding:6px 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#poststuff #woocommerce-order-actions .inside ul.order_actions li:last-child{border-bottom:0}#poststuff #woocommerce-order-notes .inside{margin:0;padding:0}#poststuff #woocommerce-order-notes .inside ul.order_notes li{padding:0 10px}#woocommerce_customers p.search-box{margin:6px 0 4px;float:left}#woocommerce_customers .tablenav{float:right;clear:none}.widefat.customers td{vertical-align:middle;padding:4px 7px}.widefat .column-order_title{width:15%}.widefat .column-order_title time{display:block;color:#999;margin:3px 0}.widefat .column-orders,.widefat .column-paying,.widefat .column-spent{text-align:center;width:8%}.widefat .column-last_order{width:11%}.widefat .column-order_actions,.widefat .column-user_actions,.widefat .column-wc_actions{width:110px}.widefat .column-order_actions a.button,.widefat .column-user_actions a.button,.widefat .column-wc_actions a.button{float:left;margin:0 4px 2px 0;cursor:pointer;padding:3px 4px;height:auto}.widefat .column-order_actions a.button img,.widefat .column-user_actions a.button img,.widefat .column-wc_actions a.button img{display:block;width:12px;height:auto}.widefat small.meta{display:block;color:#999;font-size:inherit;margin:3px 0}.widefat .column-order_date,.widefat .column-order_total{width:9%}.widefat .column-order_status{width:45px;text-align:center}.widefat .column-order_status mark{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;background:0 0;font-size:1.4em;margin:0 auto}.widefat .column-order_status mark.cancelled:after,.widefat .column-order_status mark.completed:after,.widefat .column-order_status mark.failed:after,.widefat .column-order_status mark.on-hold:after,.widefat .column-order_status mark.pending:after,.widefat .column-order_status mark.processing:after,.widefat .column-order_status mark.refunded:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}.widefat .column-order_status mark.pending:after{content:"\e012";color:#ffba00}.widefat .column-order_status mark.completed:after{content:"\e015";color:#2ea2cc}.widefat .column-order_status mark.on-hold:after{content:"\e033";color:#999}.widefat .column-order_status mark.failed:after{content:"\e016";color:#d0c21f}.widefat .column-order_status mark.cancelled:after{content:"\e013";color:#a00}.widefat .column-order_status mark.processing:after{content:"\e011";color:#73a724}.widefat .column-order_status mark.refunded:after{content:"\e014";color:#999}.widefat td.column-order_status{padding-top:9px}.column-customer_message .note-on{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto;color:#999}.column-customer_message .note-on:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:16px}.column-order_notes .note-on{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto;color:#999}.column-order_notes .note-on:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:16px}.order_actions .complete,.order_actions .processing,.order_actions .view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.order_actions .complete:after,.order_actions .processing:after,.order_actions .view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.order_actions .processing:after{content:"\e00f"}.order_actions .complete:after{content:"\e017"}.order_actions .view:after{content:"\e010"}.user_actions .edit,.user_actions .link,.user_actions .refresh,.user_actions .view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.user_actions .edit:after,.user_actions .link:after,.user_actions .refresh:after,.user_actions .view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.user_actions .edit:after{content:"\e603"}.user_actions .link:after{content:"\e00d"}.user_actions .view:after{content:"\e010"}.user_actions .refresh:after{content:"\e031"}.attributes-table td,.attributes-table th{width:15%;vertical-align:top}.attributes-table .attribute-terms{width:32%}.attributes-table .attribute-actions{width:2em}.attributes-table .attribute-actions .configure-terms{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.attributes-table .attribute-actions .configure-terms:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:1.85}ul.order_notes{padding:2px 0 0}ul.order_notes li{.note_content:after;.note_content-content:"";.note_content-display:block;.note_content-position:absolute;.note_content-bottom:-10px;.note_content-left:20px;.note_content-width:0;.note_content-height:0;.note_content-border-width:10px 10px 0 0;.note_content-border-style:solid;.note_content-border-color:#efefef transparent}ul.order_notes li .note_content{padding:10px;background:#efefef;position:relative}ul.order_notes li .note_content p{margin:0;padding:0;word-wrap:break-word}ul.order_notes li p.meta{padding:10px;color:#999;margin:0;font-size:11px}ul.order_notes li p.meta .exact-date{border-bottom:1px dotted #999}ul.order_notes li a.delete_note{color:#a00}ul.order_notes li.customer-note{.note_content:after;.note_content-border-color:#d7cad2 transparent}ul.order_notes li.customer-note .note_content{background:#d7cad2}.add_note{border-top:1px solid #ddd;padding:10px 10px 0}.add_note h4{margin-top:5px!important}.add_note #add_order_note{width:100%;height:50px}table.wp-list-table .column-thumb{width:52px;text-align:center;white-space:nowrap}table.wp-list-table .column-name{width:22%}table.wp-list-table .column-product_cat,table.wp-list-table .column-product_tag{width:11%!important}table.wp-list-table .column-featured,table.wp-list-table .column-product_type{width:48px;text-align:left!important}table.wp-list-table .column-customer_message,table.wp-list-table .column-order_notes{width:48px;text-align:center}table.wp-list-table .column-customer_message img,table.wp-list-table .column-order_notes img{margin:0 auto;padding-top:0!important}table.wp-list-table .manage-column.column-featured img,table.wp-list-table .manage-column.column-product_type img{padding-left:2px}table.wp-list-table .column-price .woocommerce-price-suffix{display:none}table.wp-list-table img{margin:1px 2px}table.wp-list-table .row-actions{color:#999}table.wp-list-table td.column-thumb img{margin:0;vertical-align:middle;width:auto;height:auto;max-width:40px;max-height:40px}table.wp-list-table span.na{color:#999}table.wp-list-table .column-is_in_stock{text-align:left!important}table.wp-list-table span.wc-featured,table.wp-list-table span.wc-image,table.wp-list-table span.wc-type{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto}table.wp-list-table span.wc-featured:before,table.wp-list-table span.wc-image:before,table.wp-list-table span.wc-type:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:""}table.wp-list-table span.wc-featured{margin:0;cursor:pointer}table.wp-list-table span.wc-featured:before{content:"\e020"}table.wp-list-table span.wc-featured.not-featured:before{content:"\e021"}table.wp-list-table td.column-featured span.wc-featured{font-size:1.2em}table.wp-list-table span.wc-type{margin:0}table.wp-list-table span.wc-type:before{content:"\e01d"}table.wp-list-table span.product-type{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.2em}table.wp-list-table span.product-type:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:""}table.wp-list-table span.product-type.grouped:before{content:"\e002"}table.wp-list-table span.product-type.external:before{content:"\e034"}table.wp-list-table span.product-type.variable:before{content:"\e003"}table.wp-list-table span.product-type.downloadable:before{content:"\e001"}table.wp-list-table span.product-type.virtual:before{content:"\e000"}table.wp-list-table mark.instock{font-weight:700;color:#7ad03a;background:0 0;line-height:1}table.wp-list-table mark.outofstock{font-weight:700;color:#a44;background:0 0;line-height:1}table.wp-list-table .notes_head,table.wp-list-table .order-notes_head,table.wp-list-table .status_head{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto}table.wp-list-table .notes_head:after,table.wp-list-table .order-notes_head:after,table.wp-list-table .status_head:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}table.wp-list-table .order-notes_head:after{content:"\e028"}table.wp-list-table .notes_head:after{content:"\e026"}table.wp-list-table .status_head:after{content:"\e011"}table.wp-list-table .column-order_items{width:12%}table.wp-list-table .column-order_items table.order_items{width:100%;margin:3px 0 0;padding:0;display:none}table.wp-list-table .column-order_items table.order_items td{border:0;margin:0;padding:0 0 3px}table.wp-list-table .column-order_items table.order_items td.qty{color:#999;padding-right:6px;text-align:left}mark.notice{background:#fff;color:#a00;margin:0 0 0 10px}a.export_rates,a.import_rates{float:right;margin-left:9px;margin-top:-2px;margin-bottom:0}table.wc_input_table,table.wc_tax_rates{width:100%}table.wc_input_table span.tips,table.wc_tax_rates span.tips{color:#2ea2cc}table.wc_input_table td,table.wc_tax_rates td{padding:0;border-right:1px solid #DFDFDF;border-bottom:1px solid #DFDFDF;border-top:0;background:#fff}table.wc_input_table td input[type=number],table.wc_input_table td input[type=text],table.wc_tax_rates td input[type=number],table.wc_tax_rates td input[type=text]{width:100%;padding:5px 7px;margin:0;border:0;background:0 0}table.wc_input_table td.apply_to_shipping,table.wc_input_table td.compound,table.wc_tax_rates td.apply_to_shipping,table.wc_tax_rates td.compound{padding:5px 7px;vertical-align:middle}table.wc_input_table td.apply_to_shipping input,table.wc_input_table td.compound input,table.wc_tax_rates td.apply_to_shipping input,table.wc_tax_rates td.compound input{width:auto;padding:0}table.wc_input_table td:last-child,table.wc_tax_rates td:last-child{border-right:0}table.wc_input_table tr.current td,table.wc_tax_rates tr.current td{background-color:#fefbcc}table.wc_input_table .cost,table.wc_input_table .cost input,table.wc_input_table .item_cost,table.wc_input_table .item_cost input,table.wc_tax_rates .cost,table.wc_tax_rates .cost input,table.wc_tax_rates .item_cost,table.wc_tax_rates .item_cost input{text-align:right}table.wc_input_table th.sort,table.wc_tax_rates th.sort{width:17px;padding:0}table.wc_input_table td.sort,table.wc_tax_rates td.sort{padding:0 4px;cursor:move;background:#f9f9f9;text-align:center;vertical-align:middle}table.wc_input_table td.sort:before,table.wc_tax_rates td.sort:before{content:"\e032";font-family:WooCommerce;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%}table.wc_input_table td.sort:hover:before,table.wc_tax_rates td.sort:hover:before{color:#333}table.wc_input_table .button,table.wc_tax_rates .button{float:left;margin-right:5px}table.wc_input_table .export,table.wc_input_table .import,table.wc_tax_rates .export,table.wc_tax_rates .import{float:right;margin-right:0;margin-left:5px}table.wc_input_table span.tips,table.wc_tax_rates span.tips{padding:0 3px}table.wc_input_table .pagination,table.wc_tax_rates .pagination{float:right}table.wc_input_table .pagination .button,table.wc_tax_rates .pagination .button{margin-left:5px;margin-right:0}table.wc_input_table .pagination .current,table.wc_tax_rates .pagination .current{background:#bbb;text-shadow:none}table.wc_input_table tfoot th,table.wc_tax_rates tfoot th{padding-left:20px;padding-right:20px}table.wc_input_table tr:last-child td,table.wc_tax_rates tr:last-child td{border-bottom:0}table.wc_gateways,table.wc_shipping{position:relative}table.wc_gateways td,table.wc_shipping td{vertical-align:middle;cursor:move;padding:7px}table.wc_gateways th,table.wc_shipping th{padding:9px 7px!important;vertical-align:middle}table.wc_gateways td.name,table.wc_shipping td.name{font-weight:700}table.wc_gateways .settings,table.wc_shipping .settings{text-align:right}table.wc_gateways .default,table.wc_gateways .radio,table.wc_gateways .status,table.wc_shipping .default,table.wc_shipping .radio,table.wc_shipping .status{text-align:center}table.wc_gateways .default .tips,table.wc_gateways .radio .tips,table.wc_gateways .status .tips,table.wc_shipping .default .tips,table.wc_shipping .radio .tips,table.wc_shipping .status .tips{margin:0 auto}table.wc_gateways .default input,table.wc_gateways .radio input,table.wc_gateways .status input,table.wc_shipping .default input,table.wc_shipping .radio input,table.wc_shipping .status input{margin:0}img.help_tip{vertical-align:middle;margin:0 0 0 9px}.postbox img.help_tip{margin-top:-4px}.status-disabled,.status-enabled{font-size:1.4em;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}.status-enabled:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#a46497}.woocommerce #template div{margin:0}.woocommerce #template div p .button{float:right;margin-left:10px;margin-top:-4px}.woocommerce #template div .editor textarea{margin-bottom:8px}.woocommerce textarea[disabled=disabled]{background:#DFDFDF!important}.woocommerce table.form-table,.woocommerce table.form-table .forminp-radio ul{margin:0}.woocommerce table.form-table .forminp-radio ul li{line-height:1.4em}.woocommerce table.form-table textarea.input-text{height:100%;min-width:150px;display:block}.woocommerce table.form-table input.regular-input{width:25em}.woocommerce table.form-table textarea.wide-input{width:100%}.woocommerce table.form-table img.help_tip{padding:0;margin:-4px 0 0 5px;vertical-align:middle;cursor:help;line-height:1}.woocommerce table.form-table span.help_tip{cursor:help;color:#2ea2cc}.woocommerce table.form-table th{position:relative;padding-right:24px}.woocommerce table.form-table .chosen-container{vertical-align:top;margin-bottom:3px}.woocommerce table.form-table table.widefat th{padding-right:inherit}.woocommerce table.form-table th img.help_tip{margin:0 -24px 0 0;float:right}.woocommerce table.form-table fieldset{margin-top:4px}.woocommerce table.form-table fieldset img.help_tip{margin:-3px 0 0 5px}.woocommerce table.form-table fieldset p.description{margin-bottom:8px}.woocommerce table.form-table fieldset:first-child{margin-top:0}.woocommerce table.form-table .color_box{border:1px solid #ccc;box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.2);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding:4px 6px;float:left;width:90px;margin:0 10px 0 0}.woocommerce table.form-table .color_box strong{text-align:left;display:block;padding:0 0 2px;font-size:.92em}.woocommerce table.form-table .color_box strong img{float:right;margin:1px 0 0}.woocommerce table.form-table .color_box input.colorpick{width:100%;margin:0;font-family:monospace;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce table.form-table .color_box .iris-picker{margin:15px 0 0 -7px}.woocommerce table.form-table .color_box_clear{display:block;clear:both;padding-bottom:10px}.woocommerce table.form-table .iris-picker{z-index:100;position:absolute;display:none;border:1px solid #ccc;box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.2);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.2);border-radius:3px}.woocommerce table.form-table .iris-picker .ui-slider{border:0!important;background:none!important;margin:0!important;width:auto!important;height:auto!important}.woocommerce table.form-table .iris-picker .ui-slider .ui-slider-handle{margin-bottom:0!important}.woocommerce table.form-table .image_width_settings{vertical-align:middle}.woocommerce table.form-table .image_width_settings label{margin-left:10px}.woocommerce #tabs-wrap table a.remove{margin-left:4px}.woocommerce #tabs-wrap table p{margin:0 0 4px!important;overflow:hidden;zoom:1}.woocommerce #tabs-wrap table p a.add{float:left}#wp-excerpt-editor-container{background:#fff}#product_variation-parent #parent_id{width:100%}#postimagediv img{border:1px solid #d5d5d5;max-width:100%}#woocommerce-product-images .inside{margin:0;padding:0}#woocommerce-product-images .inside .add_product_images{padding:0 12px 12px}#woocommerce-product-images .inside #product_images_container{padding:0 0 0 9px}#woocommerce-product-images .inside #product_images_container ul{margin:0;padding:0}#woocommerce-product-images .inside #product_images_container ul:after,#woocommerce-product-images .inside #product_images_container ul:before{content:" ";display:table}#woocommerce-product-images .inside #product_images_container ul:after{clear:both}#woocommerce-product-images .inside #product_images_container ul li.add,#woocommerce-product-images .inside #product_images_container ul li.image,#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder{width:80px;float:left;cursor:move;border:1px solid #d5d5d5;margin:9px 9px 0 0;background:#f7f7f7;border-radius:2px;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-product-images .inside #product_images_container ul li.add img,#woocommerce-product-images .inside #product_images_container ul li.image img,#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder img{width:100%;height:auto;display:block}#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder{border:3px dashed #ddd;position:relative}#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:2.618em;line-height:72px;color:#ddd}#woocommerce-product-images .inside #product_images_container ul ul.actions{position:absolute;top:-8px;right:-8px;padding:2px;display:none}#woocommerce-product-images .inside #product_images_container ul ul.actions li{float:right;margin:0 0 0 2px}#woocommerce-product-images .inside #product_images_container ul ul.actions li a{width:1em;margin:0;height:0;display:block;overflow:hidden}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.tips{cursor:pointer}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.view{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.4em}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.view:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";background-color:#000;color:#fff}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.4em}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#fff;background-color:#000;border-radius:100%;box-shadow:0 1px 2px rgba(0,0,0,.2)}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete:hover before{background-color:#a00}#woocommerce-product-images .inside #product_images_container ul li:hover ul.actions{display:block}#woocommerce-product-data h3.hndle{padding:10px}#woocommerce-product-data h3.hndle span{display:block;vertical-align:middle;line-height:24px}#woocommerce-product-data h3.hndle span span{display:inline;line-height:inherit;vertical-align:baseline}#woocommerce-product-data h3.hndle label{padding-right:1em;font-size:12px;vertical-align:baseline}#woocommerce-product-data h3.hndle label:first-child{margin-right:1em;border-right:1px solid #dfdfdf}#woocommerce-product-data h3.hndle input,#woocommerce-product-data h3.hndle select{margin:-3px 0 0 .5em;vertical-align:middle}#woocommerce-product-data>.handlediv{margin-top:4px}#woocommerce-product-data .wrap{margin:0}#woocommerce-coupon-description{padding:3px 8px;font-size:1.7em;line-height:1.42em;height:auto;width:100%;outline:0;margin:10px 0;display:block}#woocommerce-coupon-description::-webkit-input-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description::-moz-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description:-ms-input-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description:-moz-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-data .panel-wrap,#woocommerce-product-data .panel-wrap{background:#fff}#woocommerce-coupon-data .wc-metaboxes-wrapper,#woocommerce-coupon-data .woocommerce_options_panel,#woocommerce-product-data .wc-metaboxes-wrapper,#woocommerce-product-data .woocommerce_options_panel{float:left;width:80%}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios,#woocommerce-product-data .woocommerce_options_panel .wc-radios{display:block;float:left;margin:0}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios li,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios li,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios li,#woocommerce-product-data .woocommerce_options_panel .wc-radios li{display:block;padding:0 0 10px}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios li input,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios li input,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios li input,#woocommerce-product-data .woocommerce_options_panel .wc-radios li input{width:auto}#woocommerce-coupon-data .panel-wrap,#woocommerce-product-data .panel-wrap,.woocommerce .panel-wrap{overflow:hidden}#woocommerce-coupon-data ul.wc-tabs,#woocommerce-product-data ul.wc-tabs,.woocommerce ul.wc-tabs{background:#fafafa;line-height:1em;float:left;width:20%;margin:0;position:relative;padding:0 0 10px;border-right:1px solid #eee;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-coupon-data ul.wc-tabs:after,#woocommerce-product-data ul.wc-tabs:after,.woocommerce ul.wc-tabs:after{content:"";display:block;width:100%;height:9999em;position:absolute;bottom:-9999em;left:0;background-color:#fafafa;border-right:1px solid #eee}#woocommerce-coupon-data ul.wc-tabs li,#woocommerce-product-data ul.wc-tabs li,.woocommerce ul.wc-tabs li{display:block;padding:0;margin:0}#woocommerce-coupon-data ul.wc-tabs li a,#woocommerce-product-data ul.wc-tabs li a,.woocommerce ul.wc-tabs li a{padding:10px;line-height:20px!important;margin:0;display:block;text-decoration:none;border-bottom:1px solid #eee}#woocommerce-coupon-data ul.wc-tabs li a:before,#woocommerce-product-data ul.wc-tabs li a:before,.woocommerce ul.wc-tabs li a:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:""}#woocommerce-coupon-data ul.wc-tabs li:first-child a,#woocommerce-product-data ul.wc-tabs li:first-child a,.woocommerce ul.wc-tabs li:first-child a{border-top:0!important}#woocommerce-coupon-data ul.wc-tabs li.general_options a:before,#woocommerce-product-data ul.wc-tabs li.general_options a:before,.woocommerce ul.wc-tabs li.general_options a:before{content:"\e006"}#woocommerce-coupon-data ul.wc-tabs li.inventory_options a:before,#woocommerce-product-data ul.wc-tabs li.inventory_options a:before,.woocommerce ul.wc-tabs li.inventory_options a:before{content:"\e02c"}#woocommerce-coupon-data ul.wc-tabs li.shipping_options a:before,#woocommerce-product-data ul.wc-tabs li.shipping_options a:before,.woocommerce ul.wc-tabs li.shipping_options a:before{content:"\e01a"}#woocommerce-coupon-data ul.wc-tabs li.linked_product_options a:before,#woocommerce-product-data ul.wc-tabs li.linked_product_options a:before,.woocommerce ul.wc-tabs li.linked_product_options a:before{content:"\e00d"}#woocommerce-coupon-data ul.wc-tabs li.attribute_options a:before,#woocommerce-product-data ul.wc-tabs li.attribute_options a:before,.woocommerce ul.wc-tabs li.attribute_options a:before{content:"\e02b"}#woocommerce-coupon-data ul.wc-tabs li.advanced_options a:before,#woocommerce-product-data ul.wc-tabs li.advanced_options a:before,.woocommerce ul.wc-tabs li.advanced_options a:before{content:"\e01c"}#woocommerce-coupon-data ul.wc-tabs li.variation_options a:before,#woocommerce-product-data ul.wc-tabs li.variation_options a:before,.woocommerce ul.wc-tabs li.variation_options a:before{content:"\e003"}#woocommerce-coupon-data ul.wc-tabs li.usage_restriction_options a:before,#woocommerce-product-data ul.wc-tabs li.usage_restriction_options a:before,.woocommerce ul.wc-tabs li.usage_restriction_options a:before{content:"\e602"}#woocommerce-coupon-data ul.wc-tabs li.usage_limit_options a:before,#woocommerce-product-data ul.wc-tabs li.usage_limit_options a:before,.woocommerce ul.wc-tabs li.usage_limit_options a:before{content:"\e601"}#woocommerce-coupon-data ul.wc-tabs li.general_coupon_data a:before,#woocommerce-product-data ul.wc-tabs li.general_coupon_data a:before,.woocommerce ul.wc-tabs li.general_coupon_data a:before{content:"\e600"}#woocommerce-coupon-data ul.wc-tabs li.active a,#woocommerce-product-data ul.wc-tabs li.active a,.woocommerce ul.wc-tabs li.active a{position:relative;background-color:#eee;color:#555}.woocommerce_page_wc-settings .shippingrows th.check-column{padding-top:20px}.woocommerce_page_wc-settings .shippingrows tfoot th{padding-left:10px}.woocommerce_page_wc-settings .shippingrows .add.button:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:""}.woocommerce_page_wc-settings h4.wc-settings-sub-title{font-size:1.2em}#woocommerce-coupon-data .inside,#woocommerce-order-data .inside,#woocommerce-order-downloads .inside,#woocommerce-product-data .inside,#woocommerce-product-type-options .inside{padding:0;margin:0}.panel,.woocommerce_options_panel{padding:9px;color:#555}.panel,.woocommerce_page_settings .woocommerce_options_panel{padding:0}#woocommerce-product-specs .inside,#woocommerce-product-type-options .panel{padding:9px;margin:0}#woocommerce-product-type-options .panel p,.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p{margin:0 0 9px;font-size:12px;padding:5px 9px;line-height:24px}#woocommerce-product-type-options .panel p:after,.woocommerce_options_panel fieldset.form-field:after,.woocommerce_options_panel p:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce_options_panel .checkbox,.woocommerce_variable_attributes .checkbox{width:auto;vertical-align:middle;margin:7px 0}.woocommerce_options_panel .downloadable_files table,.woocommerce_variations .downloadable_files table{width:100%;padding:0!important}.woocommerce_options_panel .downloadable_files table th,.woocommerce_variations .downloadable_files table th{padding:7px 0 7px 7px!important}.woocommerce_options_panel .downloadable_files table td,.woocommerce_variations .downloadable_files table td{vertical-align:middle!important;padding:4px 0 4px 7px!important;position:relative}.woocommerce_options_panel .downloadable_files table td:last-child,.woocommerce_variations .downloadable_files table td:last-child{padding-right:7px!important}.woocommerce_options_panel .downloadable_files table td input.input_text,.woocommerce_variations .downloadable_files table td input.input_text{width:100%;float:none;margin:1px 0;min-width:0}.woocommerce_options_panel .downloadable_files table td .upload_file_button,.woocommerce_variations .downloadable_files table td .upload_file_button{float:right;width:auto;cursor:pointer}.woocommerce_options_panel .downloadable_files table td .delete,.woocommerce_variations .downloadable_files table td .delete{display:block;text-indent:-9999px;position:relative;height:1em;width:1em}.woocommerce_options_panel .downloadable_files table td .delete:before,.woocommerce_variations .downloadable_files table td .delete:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";content:"\e013";color:#999}.woocommerce_options_panel .downloadable_files table td .delete:hover:before,.woocommerce_variations .downloadable_files table td .delete:hover:before{color:#a00}.woocommerce_options_panel .downloadable_files table th.sort,.woocommerce_variations .downloadable_files table th.sort{width:17px;padding:0}.woocommerce_options_panel .downloadable_files table td.sort,.woocommerce_variations .downloadable_files table td.sort{padding:0 8px;cursor:move;background:#f9f9f9;text-align:center;vertical-align:middle}.woocommerce_options_panel .downloadable_files table td.sort:before,.woocommerce_variations .downloadable_files table td.sort:before{content:"\e032";font-family:WooCommerce;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%}.woocommerce_options_panel .downloadable_files table td.sort:hover:before,.woocommerce_variations .downloadable_files table td.sort:hover:before{color:#333}.woocommerce_options_panel{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce_options_panel .downloadable_files{padding:0 9px 0 162px;position:relative;margin:9px 0}.woocommerce_options_panel .downloadable_files label{position:absolute;left:0;margin:0 0 0 12px;line-height:24px}.woocommerce_options_panel p{margin:9px 0}.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p.form-field{padding:5px 20px 5px 162px!important}.woocommerce_options_panel label,.woocommerce_options_panel legend{float:left;width:150px;padding:0;margin:0 0 0 -150px}.woocommerce_options_panel label .req,.woocommerce_options_panel legend .req{font-weight:700;font-style:normal;color:#a00}.woocommerce_options_panel .description{padding:0;margin:0 0 0 7px;clear:none;display:inline}.woocommerce_options_panel .description-block{margin-left:0;display:block}.woocommerce_options_panel input,.woocommerce_options_panel select,.woocommerce_options_panel textarea{margin:0}.woocommerce_options_panel textarea{vertical-align:top;height:3.5em;line-height:1.5em}.woocommerce_options_panel input[type=email],.woocommerce_options_panel input[type=number],.woocommerce_options_panel input[type=text]{width:50%;float:left}.woocommerce_options_panel input.button{width:auto;margin-left:8px}.woocommerce_options_panel select{float:left}.woocommerce_options_panel .short,.woocommerce_options_panel input[type=email].short,.woocommerce_options_panel input[type=number].short,.woocommerce_options_panel input[type=text].short{width:50%}.woocommerce_options_panel .sized{width:auto!important;margin-right:6px}.woocommerce_options_panel .options_group{border-top:1px solid #fff;border-bottom:1px solid #eee}.woocommerce_options_panel .options_group:first-child{border-top:0}.woocommerce_options_panel .options_group:last-child{border-bottom:0}.woocommerce_options_panel .options_group fieldset{margin:9px 0;font-size:12px;padding:5px 9px;line-height:24px}.woocommerce_options_panel .options_group fieldset label{width:auto;float:none}.woocommerce_options_panel .options_group fieldset ul{float:left;width:50%;margin:0;padding:0}.woocommerce_options_panel .options_group fieldset ul li{margin:0;width:auto}.woocommerce_options_panel .options_group fieldset ul li input{width:auto;float:none;margin-right:4px}.woocommerce_options_panel .options_group fieldset ul.wc-radios label{margin-left:0}.woocommerce_options_panel .dimensions_field .wrap{display:block;width:50%}.woocommerce_options_panel .dimensions_field .wrap input{width:30.75%;margin-right:3.8%}.woocommerce_options_panel .dimensions_field .wrap .last{margin-right:0}.woocommerce_options_panel.padded{padding:1em}#woocommerce-product-data input.dp-applied{float:left}#grouped_product_options,#simple_product_options,#virtual_product_options{padding:12px;font-style:italic;color:#666}.wc-metaboxes-wrapper .toolbar{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #eee;padding:9px 12px!important}.wc-metaboxes-wrapper .toolbar:first-child{border-top:0}.wc-metaboxes-wrapper .toolbar:last-child{border-bottom:0}.wc-metaboxes-wrapper .toolbar .add_variation,.wc-metaboxes-wrapper .toolbar .link_all_variations{float:right;margin-left:5px}.wc-metaboxes-wrapper p.toolbar{overflow:hidden;zoom:1}.wc-metaboxes-wrapper .fr,.wc-metaboxes-wrapper button.add_attribute,.wc-metaboxes-wrapper button.add_variable_attribute,.wc-metaboxes-wrapper select.attribute_taxonomy{float:right;margin:0 0 0 6px}.wc-metaboxes-wrapper .wc-metaboxes{border-bottom:1px solid #eee}.wc-metaboxes-wrapper .wc-metabox-sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;margin-bottom:9px;border-width:1px;border-style:dashed}.wc-metaboxes-wrapper .wc-metabox{background:#fff;border-bottom:1px solid #eee;margin:0!important}.wc-metaboxes-wrapper .wc-metabox select{font-weight:400}.wc-metaboxes-wrapper .wc-metabox:last-of-type{border-bottom:0}.wc-metaboxes-wrapper .wc-metabox .handlediv:before{line-height:.5!important}.wc-metaboxes-wrapper .wc-metabox.closed{border-radius:3px}.wc-metaboxes-wrapper .wc-metabox.closed .handlediv:before{content:"\f140"!important}.wc-metaboxes-wrapper .wc-metabox.closed h3{border:0}.wc-metaboxes-wrapper .wc-metabox h3{margin:0!important;padding:.75em .75em .75em 1em!important;font-size:1em!important;overflow:hidden;zoom:1;cursor:move}.wc-metaboxes-wrapper .wc-metabox h3 button{float:right}.wc-metaboxes-wrapper .wc-metabox h3 strong{line-height:24px;font-weight:700}.wc-metaboxes-wrapper .wc-metabox h3 select{font-family:sans-serif}.wc-metaboxes-wrapper .wc-metabox h3 .handlediv{background-position:6px 5px!important;display:none;height:24px}.wc-metaboxes-wrapper .wc-metabox h3.fixed{cursor:pointer!important}.wc-metaboxes-wrapper .wc-metabox h3:hover .handlediv{display:block}.wc-metaboxes-wrapper .wc-metabox table{width:100%;position:relative;background-color:#fdfdfd;padding:1em;border-top:1px solid #eee}.wc-metaboxes-wrapper .wc-metabox table td{text-align:left;padding:0 6px 1em 0;vertical-align:top;border:0}.wc-metaboxes-wrapper .wc-metabox table td label{text-align:left;display:block;line-height:21px}.wc-metaboxes-wrapper .wc-metabox table td input{float:left;min-width:200px}.wc-metaboxes-wrapper .wc-metabox table td input,.wc-metaboxes-wrapper .wc-metabox table td textarea{width:100%;margin:0;display:block;font-size:14px;padding:4px;color:#555}.wc-metaboxes-wrapper .wc-metabox table td .chosen-container,.wc-metaboxes-wrapper .wc-metabox table td select{width:100%!important}.wc-metaboxes-wrapper .wc-metabox table td input.short{width:200px}.wc-metaboxes-wrapper .wc-metabox table td input.checkbox{width:16px;min-width:inherit;vertical-align:text-bottom;display:inline-block;float:none}.wc-metaboxes-wrapper .wc-metabox table td.attribute_name{width:200px}.wc-metaboxes-wrapper .wc-metabox table .minus,.wc-metaboxes-wrapper .wc-metabox table .plus{margin-top:6px}.wc-metaboxes-wrapper .wc-metabox table .fl{float:left}.wc-metaboxes-wrapper .wc-metabox table .fr{float:right}.wc-metaboxes-wrapper .close_all,.wc-metaboxes-wrapper .expand_all{float:right;margin-left:14px;line-height:22px;text-decoration:none}.wc-metaboxes-wrapper .close_all:before,.wc-metaboxes-wrapper .expand_all:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";font-size:.8em;color:#999}.wc-metaboxes-wrapper .expand_all:before{content:"\e035"}.woocommerce_variable_attributes{background-color:#fdfdfd;border-top:1px solid #eee}.woocommerce_variable_attributes .data{padding:1em 2em}.woocommerce_variable_attributes .data:after,.woocommerce_variable_attributes .data:before{content:" ";display:table}.woocommerce_variable_attributes .data:after{clear:both}.woocommerce_variable_attributes .upload_image_button{display:block;width:48px;height:48px;float:left;margin-right:20px;position:relative}.woocommerce_variable_attributes .upload_image_button img{width:100%;height:auto}.woocommerce_variable_attributes .upload_image_button:before{content:"\f317";font-family:Dashicons;display:none;position:absolute;top:0;left:0;right:0;bottom:0;text-align:center;line-height:48px;font-size:2em;font-weight:400;-webkit-font-smoothing:antialiased}.woocommerce_variable_attributes .upload_image_button.remove:before{content:"\f335"}.woocommerce_variable_attributes .upload_image_button:hover:before{display:block}.woocommerce_variable_attributes .options{border:1px solid #eee;border-width:1px 0;padding:.25em 0}.woocommerce_variable_attributes .options label{display:inline-block;padding:4px 1em 2px 0}.woocommerce_variable_attributes .options input[type=checkbox]{margin-top:5px;margin-right:3px}.form-row label{display:block}.form-row input[type=number],.form-row input[type=text],.form-row select{width:100%}.form-row.dimensions_field input{width:25%;float:left;margin-right:1%}.form-row.dimensions_field input:last-of-type{margin-right:0}.form-row-first,.form-row-last{width:48%;float:right}.form-row-first{clear:both;float:left}.form-row-full{clear:both}.tips{cursor:help;text-decoration:none}img.tips{padding:5px 0 0}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#464646}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#464646}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#464646}#tiptip_holder.tip_left{padding-right:5px}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#464646}#tiptip_content,.chart-tooltip,.wc_error_tip{font-size:11px;color:#fff;padding:.5em;background:#464646;border-radius:3px;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.1);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.1);box-shadow:1px 1px 3px rgba(0,0,0,.1);text-align:center;max-width:150px}#tiptip_content code,.chart-tooltip code,.wc_error_tip code{background:#888;padding:1px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}.wc_error_tip{background:#d82223;max-width:20em;white-space:normal;position:absolute;margin:1.5em 1px 0 -1em;z-index:9999999}.wc_error_tip:after{content:"";display:block;border:8px solid #d82223;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;position:absolute;top:-3px;left:50%;margin:-1em 0 0 -3px}img.ui-datepicker-trigger{vertical-align:middle;margin-top:-1px;cursor:pointer}.wc-metabox-content img.ui-datepicker-trigger,.woocommerce_options_panel img.ui-datepicker-trigger{float:left;margin-right:8px;margin-top:4px;margin-left:4px}#ui-datepicker-div{display:none}.woocommerce-reports-wide.woocommerce-reports-wrap,.woocommerce-reports-wrap.woocommerce-reports-wrap{margin-left:300px;padding-top:18px}.woocommerce-reports-wide.halved,.woocommerce-reports-wrap.halved{margin:0;overflow:hidden;zoom:1}.woocommerce-reports-wide .widefat td,.woocommerce-reports-wrap .widefat td{vertical-align:top;padding:7px}.woocommerce-reports-wide .widefat td .description,.woocommerce-reports-wrap .widefat td .description{margin:4px 0 0}.woocommerce-reports-wide .postbox:after,.woocommerce-reports-wrap .postbox:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce-reports-wide .postbox h3,.woocommerce-reports-wrap .postbox h3{cursor:default!important}.woocommerce-reports-wide .postbox .inside,.woocommerce-reports-wrap .postbox .inside{padding:10px;margin:0!important}.woocommerce-reports-wide .postbox h3.stats_range,.woocommerce-reports-wrap .postbox h3.stats_range{padding:0!important;border-bottom-color:#dfdfdf}.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{float:right;line-height:26px;border-left:1px solid #dfdfdf;padding:10px;display:block;text-decoration:none}.woocommerce-reports-wide .postbox h3.stats_range .export_csv:before,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;content:"";margin-right:4px}.woocommerce-reports-wide .postbox h3.stats_range ul,.woocommerce-reports-wrap .postbox h3.stats_range ul{list-style:none;margin:0;padding:0;zoom:1;background:#f5f5f5}.woocommerce-reports-wide .postbox h3.stats_range ul:after,.woocommerce-reports-wide .postbox h3.stats_range ul:before,.woocommerce-reports-wrap .postbox h3.stats_range ul:after,.woocommerce-reports-wrap .postbox h3.stats_range ul:before{content:" ";display:table}.woocommerce-reports-wide .postbox h3.stats_range ul:after,.woocommerce-reports-wrap .postbox h3.stats_range ul:after{clear:both}.woocommerce-reports-wide .postbox h3.stats_range ul li,.woocommerce-reports-wrap .postbox h3.stats_range ul li{float:left;margin:0;padding:0;line-height:26px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li a{border-right:1px solid #dfdfdf;padding:10px;display:block;text-decoration:none}.woocommerce-reports-wide .postbox h3.stats_range ul li.active,.woocommerce-reports-wrap .postbox h3.stats_range ul li.active{background:#fff;-webkit-box-shadow:0 4px 0 0 #fff;box-shadow:0 4px 0 0 #fff}.woocommerce-reports-wide .postbox h3.stats_range ul li.active a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.active a{color:#777}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:9px 10px;vertical-align:middle}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom div,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom form,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom div,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom form{display:inline;margin:0}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom div input.range_datepicker,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom form input.range_datepicker,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom div input.range_datepicker,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom form input.range_datepicker{padding:0;margin:0 10px 0 0;background:0 0;border:0;color:#777;text-align:center;-webkit-box-shadow:none;box-shadow:none}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding:12px 12px 12px 249px;margin:0!important}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{width:225px;margin-left:-237px;float:left}.woocommerce-reports-wide .postbox .chart-widgets,.woocommerce-reports-wrap .postbox .chart-widgets{margin:0;padding:0}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget{margin:0 0 1em;background:#fafafa;border:1px solid #dfdfdf}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget h4,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget h4{background:#fff;border:1px solid #dfdfdf;border-left-width:0;border-right-width:0;padding:10px;margin:0;color:#2ea2cc;border-top-width:0;background:-webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9)) #fff;background:-webkit-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:-moz-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:-o-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:#f9f9f9 #fff}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget h4.section_title:hover,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget h4.section_title:hover{color:#a00}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title{cursor:pointer}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title span,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title span{display:block}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title span:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title span:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin-left:.618em;content:"";float:right;font-size:.9em;line-height:1.618}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title.open,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title.open{color:#333}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title.open span:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title.open span:after{display:none}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section{border-bottom:1px solid #dfdfdf}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section .chosen-container,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section .chosen-container{width:100%!important}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section:last-of-type,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section:last-of-type{border-radius:0 0 3px 3px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table{width:100%}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td{padding:7px 10px;vertical-align:top;border-top:1px solid #e5e5e5;line-height:1.4em}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table tr:first-child td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table tr:first-child td{border-top:0}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.count,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.count{background:#f5f5f5}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.name,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.name{max-width:175px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.name a,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.name a{word-wrap:break-word}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.sparkline,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.sparkline{vertical-align:middle}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table .wc_sparkline,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table .wc_sparkline{width:32px;height:1em;display:block;float:right}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table tr.active td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table tr.active td{background:#f5f5f5}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget form,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget p,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget form,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget p{margin:0;padding:10px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget form .submit,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget p .submit,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget form .submit,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget p .submit{margin-top:10px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget #product_ids,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget #product_ids{width:100%}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .select_all,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .select_none,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .select_all,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .select_none{float:right;color:#999;margin-left:4px;margin-top:10px}.woocommerce-reports-wide .postbox .chart-legend,.woocommerce-reports-wrap .postbox .chart-legend{list-style:none;margin:0 0 1em;padding:0;border:1px solid #dfdfdf;border-right-width:0;border-bottom-width:0;background:#fff}.woocommerce-reports-wide .postbox .chart-legend li,.woocommerce-reports-wrap .postbox .chart-legend li{border-right:5px solid #aaa;color:#aaa;padding:1em;display:block;margin:0;-webkit-transition:all ease .5s;box-shadow:inset 0 -1px 0 0 #dfdfdf}.woocommerce-reports-wide .postbox .chart-legend li strong,.woocommerce-reports-wrap .postbox .chart-legend li strong{font-size:1.618em;line-height:1.2em;color:#464646;font-weight:400;display:block;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif}.woocommerce-reports-wide .postbox .chart-legend li:hover,.woocommerce-reports-wrap .postbox .chart-legend li:hover{box-shadow:inset 0 -1px 0 0 #dfdfdf,inset 300px 0 0 rgba(156,93,144,.1);border-right:5px solid #9c5d90!important;padding-left:1.5em;color:#9c5d90}.woocommerce-reports-wide .postbox .pie-chart-legend,.woocommerce-reports-wrap .postbox .pie-chart-legend{margin:12px 0 0;overflow:hidden}.woocommerce-reports-wide .postbox .pie-chart-legend li,.woocommerce-reports-wrap .postbox .pie-chart-legend li{float:left;margin:0;padding:6px 0 0;border-top:4px solid #999;text-align:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:50%}.woocommerce-reports-wide .postbox .stat,.woocommerce-reports-wrap .postbox .stat{font-size:1.5em!important;font-weight:700;text-align:center}.woocommerce-reports-wide .postbox .chart-placeholder,.woocommerce-reports-wrap .postbox .chart-placeholder{width:100%;height:650px;overflow:hidden;position:relative}.woocommerce-reports-wide .postbox .chart-prompt,.woocommerce-reports-wrap .postbox .chart-prompt{line-height:650px;margin:0;color:#999;font-size:1.2em;font-style:italic;text-align:center}.woocommerce-reports-wide .postbox .chart-container,.woocommerce-reports-wrap .postbox .chart-container{background:#fff;padding:12px;position:relative;border:1px solid #dfdfdf;border-radius:3px}.woocommerce-reports-wide .postbox .main .chart-legend,.woocommerce-reports-wrap .postbox .main .chart-legend{margin-top:12px}.woocommerce-reports-wide .postbox .main .chart-legend li,.woocommerce-reports-wrap .postbox .main .chart-legend li{border-right:0;margin:0 8px 0 0;float:left;border-top:4px solid #aaa}.woocommerce-reports-wide .woocommerce-reports-main,.woocommerce-reports-wrap .woocommerce-reports-main{float:left;min-width:100%}.woocommerce-reports-wide .woocommerce-reports-main table td,.woocommerce-reports-wrap .woocommerce-reports-main table td{padding:9px}.woocommerce-reports-wide .woocommerce-reports-sidebar,.woocommerce-reports-wrap .woocommerce-reports-sidebar{display:inline;width:281px;margin-left:-300px;clear:both;float:left}.woocommerce-reports-wide .woocommerce-reports-left,.woocommerce-reports-wrap .woocommerce-reports-left{width:49.5%;float:left}.woocommerce-reports-wide .woocommerce-reports-right,.woocommerce-reports-wrap .woocommerce-reports-right{width:49.5%;float:right}.woocommerce-reports-wide .column-wc_actions a.edit,.woocommerce-reports-wide .column-wc_actions a.view,.woocommerce-reports-wrap .column-wc_actions a.edit,.woocommerce-reports-wrap .column-wc_actions a.view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.woocommerce-reports-wide .column-wc_actions a.edit:after,.woocommerce-reports-wide .column-wc_actions a.view:after,.woocommerce-reports-wrap .column-wc_actions a.edit:after,.woocommerce-reports-wrap .column-wc_actions a.view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.woocommerce-reports-wide .column-wc_actions a.edit:after,.woocommerce-reports-wrap .column-wc_actions a.edit:after{content:"\e01c"}.woocommerce-reports-wide .column-wc_actions a.view:after,.woocommerce-reports-wrap .column-wc_actions a.view:after{content:"\e010"}.woocommerce-wide-reports-wrap{padding-bottom:11px}.woocommerce-wide-reports-wrap .widefat .export-data{float:right}.woocommerce-wide-reports-wrap .widefat td,.woocommerce-wide-reports-wrap .widefat th{vertical-align:middle;padding:7px}form.report_filters div,form.report_filters input,form.report_filters label,form.report_filters p{vertical-align:middle}.chart-tooltip{position:absolute;display:none;line-height:1}table.bar_chart{width:100%}table.bar_chart thead th{text-align:left;color:#ccc;padding:6px 0}table.bar_chart tbody th{padding:6px 0;width:25%;text-align:left!important;font-weight:400!important;border-bottom:1px solid #fee}table.bar_chart tbody td{text-align:right;line-height:24px;padding:6px 6px 6px 0;border-bottom:1px solid #fee}table.bar_chart tbody td span{color:#8a4b75;display:block}table.bar_chart tbody td span.alt{color:#47a03e;margin-top:6px}table.bar_chart tbody td.bars{position:relative;text-align:left;padding:6px 6px 6px 0;border-bottom:1px solid #fee}table.bar_chart tbody td.bars a,table.bar_chart tbody td.bars span{text-decoration:none;clear:both;background:#8a4b75;float:left;display:block;line-height:24px;height:24px;-moz-border-radius:3px;-webkit-border-radius:3px;-o-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}table.bar_chart tbody td.bars span.alt{clear:both;background:#47a03e}table.bar_chart tbody td.bars span.alt span{margin:0;color:#c5dec2!important;text-shadow:0 1px 0 #47a03e;background:0 0}#profile-page .api-keys-wrapper{float:left;padding-bottom:10px}#profile-page .api-keys-get-qr{float:left;padding-left:10px}.chosen-container-single .chosen-single{height:26px;line-height:26px;margin-top:1px}.chosen-container-single .chosen-single div b{background:url(../images/chosen-sprite.png) 0 4px no-repeat!important}.chosen-container-active .chosen-single-with-drop div b{background-position:-18px 2px!important}.chosen-container-single .chosen-search input{line-height:13px;width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container-multi .chosen-choices .search-field input{height:21px!important}.woocommerce_options_panel .chosen-container-multi{width:50%!important;float:left}.woocommerce_options_panel .chosen-container-multi .search-field{min-width:50%}.woocommerce_options_panel .chosen-container-multi .search-field input{min-width:100%}.chosen-container-single .chosen-single abbr{top:8px}@media only screen and (max-width:1280px){.woocommerce_options_panel .chosen-container-multi{width:80%!important}#order_data .order_data_column{width:48%}#order_data .order_data_column:first-child{width:100%}.woocommerce_options_panel .description{display:block;clear:both;margin-left:0}.woocommerce_options_panel .dimensions_field .wrap,.woocommerce_options_panel .short,.woocommerce_options_panel input[type=email].short,.woocommerce_options_panel input[type=number].short,.woocommerce_options_panel input[type=text].short{width:80%}.woocommerce_options_panel .downloadable_files,.woocommerce_variations .downloadable_files{padding:0;clear:both}.woocommerce_options_panel .downloadable_files label,.woocommerce_variations .downloadable_files label{position:static}.woocommerce_options_panel .downloadable_files table,.woocommerce_variations .downloadable_files table{margin:0 12px 24px;width:94%}.woocommerce_options_panel .downloadable_files table .sort,.woocommerce_variations .downloadable_files table .sort{display:none}.woocommerce_options_panel .woocommerce_variable_attributes .downloadable_files table,.woocommerce_variations .woocommerce_variable_attributes .downloadable_files table{margin:0 0 1em;width:100%}}@media only screen and (max-width:900px){#woocommerce-product-data .wc-tabs-back,#woocommerce-product-data ul.product_data_tabs{width:10%}#woocommerce-coupon-data .wc-metaboxes-wrapper,#woocommerce-coupon-data .woocommerce_options_panel,#woocommerce-product-data .wc-metaboxes-wrapper,#woocommerce-product-data .woocommerce_options_panel{width:90%}#woocommerce-product-data ul.product_data_tabs li a{position:relative;text-indent:-999px;padding:10px}#woocommerce-product-data ul.product_data_tabs li a:before{position:absolute;top:0;right:0;bottom:0;left:0;text-indent:0;text-align:center;line-height:40px;width:100%;height:40px}}@media only screen and (max-width:782px){#wp-excerpt-media-buttons a{font-size:16px;line-height:37px;height:39px;padding:0 20px 0 15px}#wp-excerpt-editor-tools{padding-top:20px;padding-right:15px;overflow:hidden;margin-bottom:-1px}#woocommerce-product-data .checkbox{width:25px}}@media only screen and (max-width:500px){.woocommerce_options_panel label,.woocommerce_options_panel legend{float:none;width:auto;display:block;margin:0}.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p.form-field{padding:5px 20px!important}}.wc-backbone-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:160000}.wc-backbone-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.wc-backbone-modal .wc-backbone-modal-content{position:absolute;top:50%;left:50%;width:500px;background:#fff;margin:-150px 0 0 -250px}.wc-backbone-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.wc-backbone-modal-main{padding-bottom:50px}.wc-backbone-modal-main article,.wc-backbone-modal-main header{display:block;position:relative;padding:4px 16px}.wc-backbone-modal-main header{border-bottom:1px solid #ddd}.wc-backbone-modal-main article{padding:10px 16px}.wc-backbone-modal-main article .pagination{padding:10px 0 0;text-align:center}.wc-backbone-modal-main h1{font-size:22px;font-weight:200;line-height:45px;margin:0}.wc-backbone-modal-main footer{position:absolute;left:0;right:0;bottom:0;height:30px;z-index:100;padding:10px 0;border:0 solid #dfdfdf;border-width:1px 0 0;box-shadow:0 -4px 4px -4px rgba(0,0,0,.1)}.wc-backbone-modal-main footer .inner{padding:0 10px;text-align:right} \ No newline at end of file diff --git a/assets/css/admin.scss b/assets/css/admin.scss index 60da28f18de..a2ef248ce8f 100644 --- a/assets/css/admin.scss +++ b/assets/css/admin.scss @@ -784,7 +784,13 @@ ul.wc_coupon_list_block { padding: 8px; font-size: 11px; text-align: left; - + color: #555; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; &:last-child { padding-right: 12px; } @@ -792,6 +798,9 @@ ul.wc_coupon_list_block { &:first-child { padding-left: 12px; } + &.sortable { + cursor: pointer; + } } tbody th, td { diff --git a/assets/js/admin/meta-boxes-order.js b/assets/js/admin/meta-boxes-order.js index c269cbe48f2..9a1c8bbd264 100644 --- a/assets/js/admin/meta-boxes-order.js +++ b/assets/js/admin/meta-boxes-order.js @@ -1163,4 +1163,6 @@ jQuery( function ( $ ) { return false; }); + + $('.woocommerce_order_items').stupidtable(); }); diff --git a/assets/js/admin/meta-boxes-order.min.js b/assets/js/admin/meta-boxes-order.min.js index b64e0a776ee..14a154a7169 100644 --- a/assets/js/admin/meta-boxes-order.min.js +++ b/assets/js/admin/meta-boxes-order.min.js @@ -1 +1 @@ -jQuery(function(a){function b(){a("#woocommerce-order-items").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}function c(){a("#woocommerce-order-items").unblock()}function d(){a("#tiptip_holder").removeAttr("style"),a("#tiptip_arrow").removeAttr("style"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}function e(){var e={order_id:woocommerce_admin_meta_boxes.post_id,action:"woocommerce_load_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}a("#woocommerce-order-actions input, #woocommerce-order-actions a").click(function(){window.onbeforeunload=""}),a("a.edit_address").click(function(b){b.preventDefault(),a(this).hide(),a(this).closest(".order_data_column").find("div.address").hide(),a(this).closest(".order_data_column").find("div.edit_address").show()});var f=null,g={};"undefined"!=typeof woocommerce_admin_meta_boxes_order&&"undefined"!=typeof woocommerce_admin_meta_boxes_order.countries&&(f=a.parseJSON(woocommerce_admin_meta_boxes_order.countries.replace(/"/g,'"'))),a(".js_field-country").chosen(g).change(function(b,c){if("undefined"==typeof c&&(c=!1),null!==f){var d=a(this),e=d.val(),h=d.parents(".edit_address").find(".js_field-state"),i=h.parent(),j=h.attr("name"),k=h.attr("id"),l=d.data("woocommerce.stickState-"+e)?d.data("woocommerce.stickState-"+e):h.val(),m=h.attr("placeholder");if(c&&d.data("woocommerce.stickState-"+e,l),i.show().find(".chosen-container").remove(),f[e]){var n=a(''),o=f[e];n.append(a('")),a.each(o,function(b){n.append(a('"))}),n.val(l),h.replaceWith(n),n.show().chosen(g).hide().trigger("chosen:updated")}else h.replaceWith('');a("body").trigger("contry-change.woocommerce",[e,a(this).closest("div")])}}).trigger("change",[!0]),a("body").on("change","select.js_field-state",function(){var b=a(this),c=b.val(),d=b.parents(".edit_address").find(".js_field-country"),e=d.val();d.data("woocommerce.stickState-"+e,c)}).on("click","a.edit-order-item",function(){return a(this).closest("tr").find(".view").hide(),a(this).closest("tr").find(".edit").show(),a(this).hide(),a("button.add-line-item").click(),a("button.cancel-action").attr("data-reload",!0),!1}).on("click",".woocommerce_order_items a.delete-order-item",function(){var d=window.confirm(woocommerce_admin_meta_boxes.remove_item_notice);if(d){var e=a(this).closest("tr.item, tr.fee, tr.shipping"),f=e.attr("data-order_item_id");b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){e.remove(),c()}})}return!1}).on("click","#order_refunds .delete_refund",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_refund)){var c=a(this).closest("tr.refund"),d=c.attr("data-order_refund_id");b();var f={action:"woocommerce_delete_refund",refund_id:d,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(){e()}})}return!1}).on("change",".woocommerce_order_items input.quantity",function(){var b=a(this).closest("tr.item"),c=a(this).val(),d=a(this).attr("data-qty"),e=a("input.line_total",b),f=a("input.line_subtotal",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/d;e.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var h=accounting.unformat(f.attr("data-subtotal"),woocommerce_admin.mon_decimal_point)/d;f.val(parseFloat(accounting.formatNumber(h*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/d;e>0&&b.val(parseFloat(accounting.formatNumber(e*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var f=a("input.line_subtotal_tax",a(this)),g=accounting.unformat(f.attr("data-subtotal_tax"),woocommerce_admin.mon_decimal_point)/d;g>0&&f.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("quantity_changed")}).on("change",".woocommerce_order_items input.refund_order_item_qty",function(){var b=a(this).closest("tr.item"),c=b.find("input.quantity").val(),d=a(this).val(),e=a("input.line_total",b),f=a("input.refund_line_total",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/c;f.val(parseFloat(accounting.formatNumber(g*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=a("input.refund_line_tax",a(this)),f=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/c;f>0&&e.val(parseFloat(accounting.formatNumber(f*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("refund_quantity_changed")}).on("change",".woocommerce_order_items .refund input",function(){var b=0,c=a(".woocommerce_order_items").find("tr.item, tr.fee, tr.shipping");c.each(function(){var c=a(this),d=c.find(".refund input:not(.refund_order_item_qty)");d.each(function(c,d){b+=parseFloat(accounting.unformat(a(d).val()||0,woocommerce_admin.mon_decimal_point))})}),a("#refund_amount").val(accounting.formatNumber(b,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change()}).on("click",".woocommerce_order_items button.add_order_item_meta",function(){var d=a(this),e=d.closest("tr.item"),f={order_item_id:e.attr("data-order_item_id"),action:"woocommerce_add_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(a){e.find("tbody.meta_items").append(a),c()}}),!1}).on("click",".woocommerce_order_items button.remove_order_item_meta",function(){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_meta)){var d=a(this).closest("tr"),e={meta_id:d.attr("data-meta_id"),action:"woocommerce_remove_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(){d.hide(),c()}})}return!1}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){var b=a(this).next();(""===b.val()||b.is(".match-total"))&&b.val(a(this).val()).addClass("match-total")}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){a(this).removeClass("match-total")}),a("#woocommerce-order-items").on("click","button.add-line-item",function(){return a("div.wc-order-add-item").slideDown(),a("div.wc-order-bulk-actions").slideUp(),!1}).on("click","button.refund-items",function(){return a("div.wc-order-refund-items").slideDown(),a("div.wc-order-bulk-actions").slideUp(),a("div.wc-order-totals-items").slideUp(),a("#woocommerce-order-items div.refund").show(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").hide(),!1}).on("click",".cancel-action",function(){return a(this).closest("div.wc-order-data-row").slideUp(),a("div.wc-order-bulk-actions").slideDown(),a("div.wc-order-totals-items").slideDown(),a("#woocommerce-order-items div.refund").hide(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").show(),"true"===a(this).attr("data-reload")&&e(),!1}).on("click","button.add-order-item",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-products"}),!1}).on("click","button.add-order-fee",function(){b();var d={action:"woocommerce_add_order_fee",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_fee_line_items").append(b),c()}),!1}).on("click","button.add-order-shipping",function(){b();var d={action:"woocommerce_add_order_shipping",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_shipping_line_items").append(b),c()}),!1}).on("click","button.add-order-tax",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-tax"}),!1}).on("click","input.check-column",function(){a(this).is(":checked")?a("#woocommerce-order-items").find(".check-column input").attr("checked","checked"):a("#woocommerce-order-items").find(".check-column input").removeAttr("checked")}).on("click",".do_bulk_action",function(){var d=a(this).closest(".bulk-actions").find("select").val(),e=a("#woocommerce-order-items").find(".check-column input:checked"),f=[];if(a(e).each(function(){var b=a(this).closest("tr");b.attr("data-order_item_id")&&f.push(b.attr("data-order_item_id"))}),0===f.length)return void window.alert(woocommerce_admin_meta_boxes.i18n_select_items);if("delete"===d){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_notice)){b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){a(e).each(function(){a(this).closest("tr").remove()}),c()}})}}else if("reduce_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_reduce_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}else if("increase_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_increase_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}return!1}).on("click","button.calculate-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_totals)){b();var c=0,d=0,e=0,f=a("#_order_discount").val()||"0";f=accounting.unformat(f.replace(",",".")),a(".woocommerce_order_items tr.shipping input.line_total").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),e+=parseFloat(b)}),a(".woocommerce_order_items input.line_tax").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),d+=parseFloat(b)}),a(".woocommerce_order_items tr.item, .woocommerce_order_items tr.fee").each(function(){var b=a(this).find("input.line_total").val()||"0";c+=accounting.unformat(b.replace(",","."))}),"yes"===woocommerce_admin_meta_boxes.round_at_subtotal&&(d=parseFloat(accounting.toFixed(d,woocommerce_admin_meta_boxes.rounding_precision))),a("#_order_total").val(accounting.formatNumber(c+d+e-f,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change(),a("button.save-action").click()}return!1}).on("click","button.save-action",function(){var e={order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),action:"woocommerce_save_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}}),a(this).trigger("items_saved"),!1}).on("click","a.delete-order-tax",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_tax)){b();var e={action:"woocommerce_remove_order_tax",rate_id:a(this).attr("data-rate_id"),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}).on("click","button.calculate-tax-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_line_taxes)){b();var e=a("#_shipping_country").val(),f=a("#_billing_country").val(),g=woocommerce_admin_meta_boxes.base_country,h="",i="",j="";e?(g=e,h=a("#_shipping_state").val(),i=a("#_shipping_postcode").val(),j=a("#_shipping_city").val()):f&&(g=f,h=a("#_billing_state").val(),i=a("#_billing_postcode").val(),j=a("#_billing_city").val());var k={action:"woocommerce_calc_line_taxes",order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),country:g,state:h,postcode:i,city:j,security:woocommerce_admin_meta_boxes.calc_totals_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:k,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}),a("body").on("change keyup",".wc-order-refund-items #refund_amount",function(){var b=accounting.unformat(a(this).val(),woocommerce_admin.mon_decimal_point);a("button .wc-order-refund-amount .amount").text(accounting.formatMoney(b,{symbol:woocommerce_admin_meta_boxes.currency_format_symbol,decimal:woocommerce_admin_meta_boxes.currency_format_decimal_sep,thousand:woocommerce_admin_meta_boxes.currency_format_thousand_sep,precision:woocommerce_admin_meta_boxes.currency_format_num_decimals,format:woocommerce_admin_meta_boxes.currency_format}))}).on("click",".wc-order-refund-items button.do-api-refund, .wc-order-refund-items button.do-manual-refund",function(){if(b(),window.confirm(woocommerce_admin_meta_boxes.i18n_do_refund)){var d=a("input#refund_amount").val(),f=a("input#refund_reason").val(),g={},h={},i={};a(".refund input.refund_order_item_qty").each(function(b,c){a(c).closest("tr").data("order_item_id")&&c.value&&(g[a(c).closest("tr").data("order_item_id")]=c.value)}),a(".refund input.refund_line_total").each(function(b,c){a(c).closest("tr").data("order_item_id")&&(h[a(c).closest("tr").data("order_item_id")]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point))}),a(".refund input.refund_line_tax").each(function(b,c){if(a(c).closest("tr").data("order_item_id")){var d=a(c).data("tax_id");i[a(c).closest("tr").data("order_item_id")]||(i[a(c).closest("tr").data("order_item_id")]={}),i[a(c).closest("tr").data("order_item_id")][d]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point)}});var j={action:"woocommerce_refund_line_items",order_id:woocommerce_admin_meta_boxes.post_id,refund_amount:d,refund_reason:f,line_item_qtys:JSON.stringify(g,null,""),line_item_totals:JSON.stringify(h,null,""),line_item_tax_totals:JSON.stringify(i,null,""),api_refund:a(this).is(".do-api-refund"),restock_refunded_items:a("#restock_refunded_items:checked").size()?"true":"false",security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,j,function(a){a===!0?e():a.error?(window.alert(a.error),c()):console.log(a)})}else c()}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-products"===f){var g=a("select#add_item_id").val();if(g){var h=g.length;b(),a.each(g,function(b,e){var f={action:"woocommerce_add_order_item",item_to_add:e,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,f,function(b){a("table.woocommerce_order_items tbody#order_line_items").append(b),--h||(a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","").val(""),d(),a("select#add_item_id").trigger("chosen:updated"),c())})})}else a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","red")}}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-tax"===f){var g=a("#manual_tax_rate_id").val(),h=a("input[name=add_order_tax]:checked").val();if(g&&(h=g),!h)return!1;var i=a(".order-tax-id").map(function(){return a(this).val()}).get();if(-1===a.inArray(h,i)){b();var j={action:"woocommerce_add_order_tax",rate_id:h,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:j,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}else window.alert(woocommerce_admin_meta_boxes.i18n_tax_rate_already_exists)}}),a("span.inline_total").closest(".totals_group").find("input").change(),a(".order_download_permissions").on("click","button.grant_access",function(){var b=a("select#grant_access_id").val();if(b){a(".order_download_permissions").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_grant_access_to_download",product_ids:b,loop:a(".order_download_permissions .wc-metabox").size(),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.grant_access_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(b){b?a(".order_download_permissions .wc-metaboxes").append(b):window.alert(woocommerce_admin_meta_boxes.i18n_download_permission_fail),a(".date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,showOn:"button",buttonImage:woocommerce_admin_meta_boxes.calendar_image,buttonImageOnly:!0}),a("#grant_access_id").val("").trigger("chosen:updated"),a(".order_download_permissions").unblock()}),!1}}).on("click","button.revoke_access",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_permission_revoke)){var b=a(this).parent().parent(),c=a(this).attr("rel").split(",")[0],d=a(this).attr("rel").split(",")[1];if(c>0){a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var e={action:"woocommerce_revoke_access_to_download",product_id:c,download_id:d,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.revoke_access_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,e,function(){a(b).fadeOut("300",function(){a(b).remove()})})}else a(b).fadeOut("300",function(){a(b).remove()})}return!1}),a("button.load_customer_billing").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_billing)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"billing",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_billing_first_name").val(c.billing_first_name).change(),a("input#_billing_last_name").val(c.billing_last_name).change(),a("input#_billing_company").val(c.billing_company).change(),a("input#_billing_address_1").val(c.billing_address_1).change(),a("input#_billing_address_2").val(c.billing_address_2).change(),a("input#_billing_city").val(c.billing_city).change(),a("input#_billing_postcode").val(c.billing_postcode).change(),a("#_billing_country").val(c.billing_country).change().trigger("chosen:updated"),a("#_billing_state").val(c.billing_state).change().trigger("chosen:updated"),a("input#_billing_email").val(c.billing_email).change(),a("input#_billing_phone").val(c.billing_phone).change()),a(".edit_address").unblock()}})}return!1}),a("button.load_customer_shipping").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_shipping)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"shipping",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_shipping_first_name").val(c.shipping_first_name).change(),a("input#_shipping_last_name").val(c.shipping_last_name).change(),a("input#_shipping_company").val(c.shipping_company).change(),a("input#_shipping_address_1").val(c.shipping_address_1).change(),a("input#_shipping_address_2").val(c.shipping_address_2).change(),a("input#_shipping_city").val(c.shipping_city).change(),a("input#_shipping_postcode").val(c.shipping_postcode).change(),a("#_shipping_country").val(c.shipping_country).change().trigger("chosen:updated"),a("#_shipping_state").val(c.shipping_state).change().trigger("chosen:updated")),a(".edit_address").unblock()}})}return!1}),a("button.billing-same-as-shipping").on("click",function(){return window.confirm(woocommerce_admin_meta_boxes.copy_billing)&&(a("input#_shipping_first_name").val(a("input#_billing_first_name").val()).change(),a("input#_shipping_last_name").val(a("input#_billing_last_name").val()).change(),a("input#_shipping_company").val(a("input#_billing_company").val()).change(),a("input#_shipping_address_1").val(a("input#_billing_address_1").val()).change(),a("input#_shipping_address_2").val(a("input#_billing_address_2").val()).change(),a("input#_shipping_city").val(a("input#_billing_city").val()).change(),a("input#_shipping_postcode").val(a("input#_billing_postcode").val()).change(),a("#_shipping_country").val(a("#_billing_country").val()).change().trigger("chosen:updated"),a("#_shipping_state").val(a("#_billing_state").val()).change().trigger("chosen:updated")),!1}),a(".totals_group").on("click","a.add_total_row",function(){return a(this).closest(".totals_group").find(".total_rows").append(a(this).data("row")),!1}),a(".total_rows").on("click","a.delete_total_row",function(){var b=a(this).closest(".total_row"),c=b.attr("data-order_item_id");return c?b.append('').hide():b.remove(),!1}),a("#woocommerce-order-notes").on("click","a.add_note",function(){if(a("textarea#add_order_note").val()){a("#woocommerce-order-notes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b={action:"woocommerce_add_order_note",post_id:woocommerce_admin_meta_boxes.post_id,note:a("textarea#add_order_note").val(),note_type:a("select#order_note_type").val(),security:woocommerce_admin_meta_boxes.add_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,b,function(b){a("ul.order_notes").prepend(b),a("#woocommerce-order-notes").unblock(),a("#add_order_note").val("")}),!1}}).on("click","a.delete_note",function(){var b=a(this).closest("li.note");a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_delete_order_note",note_id:a(b).attr("rel"),security:woocommerce_admin_meta_boxes.delete_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(){a(b).remove()}),!1})}); \ No newline at end of file +jQuery(function(a){function b(){a("#woocommerce-order-items").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}function c(){a("#woocommerce-order-items").unblock()}function d(){a("#tiptip_holder").removeAttr("style"),a("#tiptip_arrow").removeAttr("style"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}function e(){var e={order_id:woocommerce_admin_meta_boxes.post_id,action:"woocommerce_load_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}a("#woocommerce-order-actions input, #woocommerce-order-actions a").click(function(){window.onbeforeunload=""}),a("a.edit_address").click(function(b){b.preventDefault(),a(this).hide(),a(this).closest(".order_data_column").find("div.address").hide(),a(this).closest(".order_data_column").find("div.edit_address").show()});var f=null,g={};"undefined"!=typeof woocommerce_admin_meta_boxes_order&&"undefined"!=typeof woocommerce_admin_meta_boxes_order.countries&&(f=a.parseJSON(woocommerce_admin_meta_boxes_order.countries.replace(/"/g,'"'))),a(".js_field-country").chosen(g).change(function(b,c){if("undefined"==typeof c&&(c=!1),null!==f){var d=a(this),e=d.val(),h=d.parents(".edit_address").find(".js_field-state"),i=h.parent(),j=h.attr("name"),k=h.attr("id"),l=d.data("woocommerce.stickState-"+e)?d.data("woocommerce.stickState-"+e):h.val(),m=h.attr("placeholder");if(c&&d.data("woocommerce.stickState-"+e,l),i.show().find(".chosen-container").remove(),f[e]){var n=a(''),o=f[e];n.append(a('")),a.each(o,function(b){n.append(a('"))}),n.val(l),h.replaceWith(n),n.show().chosen(g).hide().trigger("chosen:updated")}else h.replaceWith('');a("body").trigger("contry-change.woocommerce",[e,a(this).closest("div")])}}).trigger("change",[!0]),a("body").on("change","select.js_field-state",function(){var b=a(this),c=b.val(),d=b.parents(".edit_address").find(".js_field-country"),e=d.val();d.data("woocommerce.stickState-"+e,c)}).on("click","a.edit-order-item",function(){return a(this).closest("tr").find(".view").hide(),a(this).closest("tr").find(".edit").show(),a(this).hide(),a("button.add-line-item").click(),a("button.cancel-action").attr("data-reload",!0),!1}).on("click",".woocommerce_order_items a.delete-order-item",function(){var d=window.confirm(woocommerce_admin_meta_boxes.remove_item_notice);if(d){var e=a(this).closest("tr.item, tr.fee, tr.shipping"),f=e.attr("data-order_item_id");b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){e.remove(),c()}})}return!1}).on("click","#order_refunds .delete_refund",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_refund)){var c=a(this).closest("tr.refund"),d=c.attr("data-order_refund_id");b();var f={action:"woocommerce_delete_refund",refund_id:d,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(){e()}})}return!1}).on("change",".woocommerce_order_items input.quantity",function(){var b=a(this).closest("tr.item"),c=a(this).val(),d=a(this).attr("data-qty"),e=a("input.line_total",b),f=a("input.line_subtotal",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/d;e.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var h=accounting.unformat(f.attr("data-subtotal"),woocommerce_admin.mon_decimal_point)/d;f.val(parseFloat(accounting.formatNumber(h*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/d;e>0&&b.val(parseFloat(accounting.formatNumber(e*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var f=a("input.line_subtotal_tax",a(this)),g=accounting.unformat(f.attr("data-subtotal_tax"),woocommerce_admin.mon_decimal_point)/d;g>0&&f.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("quantity_changed")}).on("change",".woocommerce_order_items input.refund_order_item_qty",function(){var b=a(this).closest("tr.item"),c=b.find("input.quantity").val(),d=a(this).val(),e=a("input.line_total",b),f=a("input.refund_line_total",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/c;f.val(parseFloat(accounting.formatNumber(g*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=a("input.refund_line_tax",a(this)),f=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/c;f>0&&e.val(parseFloat(accounting.formatNumber(f*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("refund_quantity_changed")}).on("change",".woocommerce_order_items .refund input",function(){var b=0,c=a(".woocommerce_order_items").find("tr.item, tr.fee, tr.shipping");c.each(function(){var c=a(this),d=c.find(".refund input:not(.refund_order_item_qty)");d.each(function(c,d){b+=parseFloat(accounting.unformat(a(d).val()||0,woocommerce_admin.mon_decimal_point))})}),a("#refund_amount").val(accounting.formatNumber(b,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change()}).on("click",".woocommerce_order_items button.add_order_item_meta",function(){var d=a(this),e=d.closest("tr.item"),f={order_item_id:e.attr("data-order_item_id"),action:"woocommerce_add_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(a){e.find("tbody.meta_items").append(a),c()}}),!1}).on("click",".woocommerce_order_items button.remove_order_item_meta",function(){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_meta)){var d=a(this).closest("tr"),e={meta_id:d.attr("data-meta_id"),action:"woocommerce_remove_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(){d.hide(),c()}})}return!1}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){var b=a(this).next();(""===b.val()||b.is(".match-total"))&&b.val(a(this).val()).addClass("match-total")}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){a(this).removeClass("match-total")}),a("#woocommerce-order-items").on("click","button.add-line-item",function(){return a("div.wc-order-add-item").slideDown(),a("div.wc-order-bulk-actions").slideUp(),!1}).on("click","button.refund-items",function(){return a("div.wc-order-refund-items").slideDown(),a("div.wc-order-bulk-actions").slideUp(),a("div.wc-order-totals-items").slideUp(),a("#woocommerce-order-items div.refund").show(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").hide(),!1}).on("click",".cancel-action",function(){return a(this).closest("div.wc-order-data-row").slideUp(),a("div.wc-order-bulk-actions").slideDown(),a("div.wc-order-totals-items").slideDown(),a("#woocommerce-order-items div.refund").hide(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").show(),"true"===a(this).attr("data-reload")&&e(),!1}).on("click","button.add-order-item",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-products"}),!1}).on("click","button.add-order-fee",function(){b();var d={action:"woocommerce_add_order_fee",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_fee_line_items").append(b),c()}),!1}).on("click","button.add-order-shipping",function(){b();var d={action:"woocommerce_add_order_shipping",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_shipping_line_items").append(b),c()}),!1}).on("click","button.add-order-tax",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-tax"}),!1}).on("click","input.check-column",function(){a(this).is(":checked")?a("#woocommerce-order-items").find(".check-column input").attr("checked","checked"):a("#woocommerce-order-items").find(".check-column input").removeAttr("checked")}).on("click",".do_bulk_action",function(){var d=a(this).closest(".bulk-actions").find("select").val(),e=a("#woocommerce-order-items").find(".check-column input:checked"),f=[];if(a(e).each(function(){var b=a(this).closest("tr");b.attr("data-order_item_id")&&f.push(b.attr("data-order_item_id"))}),0===f.length)return void window.alert(woocommerce_admin_meta_boxes.i18n_select_items);if("delete"===d){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_notice)){b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){a(e).each(function(){a(this).closest("tr").remove()}),c()}})}}else if("reduce_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_reduce_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}else if("increase_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_increase_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}return!1}).on("click","button.calculate-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_totals)){b();var c=0,d=0,e=0,f=a("#_order_discount").val()||"0";f=accounting.unformat(f.replace(",",".")),a(".woocommerce_order_items tr.shipping input.line_total").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),e+=parseFloat(b)}),a(".woocommerce_order_items input.line_tax").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),d+=parseFloat(b)}),a(".woocommerce_order_items tr.item, .woocommerce_order_items tr.fee").each(function(){var b=a(this).find("input.line_total").val()||"0";c+=accounting.unformat(b.replace(",","."))}),"yes"===woocommerce_admin_meta_boxes.round_at_subtotal&&(d=parseFloat(accounting.toFixed(d,woocommerce_admin_meta_boxes.rounding_precision))),a("#_order_total").val(accounting.formatNumber(c+d+e-f,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change(),a("button.save-action").click()}return!1}).on("click","button.save-action",function(){var e={order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),action:"woocommerce_save_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}}),a(this).trigger("items_saved"),!1}).on("click","a.delete-order-tax",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_tax)){b();var e={action:"woocommerce_remove_order_tax",rate_id:a(this).attr("data-rate_id"),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}).on("click","button.calculate-tax-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_line_taxes)){b();var e=a("#_shipping_country").val(),f=a("#_billing_country").val(),g=woocommerce_admin_meta_boxes.base_country,h="",i="",j="";e?(g=e,h=a("#_shipping_state").val(),i=a("#_shipping_postcode").val(),j=a("#_shipping_city").val()):f&&(g=f,h=a("#_billing_state").val(),i=a("#_billing_postcode").val(),j=a("#_billing_city").val());var k={action:"woocommerce_calc_line_taxes",order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),country:g,state:h,postcode:i,city:j,security:woocommerce_admin_meta_boxes.calc_totals_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:k,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}),a("body").on("change keyup",".wc-order-refund-items #refund_amount",function(){var b=accounting.unformat(a(this).val(),woocommerce_admin.mon_decimal_point);a("button .wc-order-refund-amount .amount").text(accounting.formatMoney(b,{symbol:woocommerce_admin_meta_boxes.currency_format_symbol,decimal:woocommerce_admin_meta_boxes.currency_format_decimal_sep,thousand:woocommerce_admin_meta_boxes.currency_format_thousand_sep,precision:woocommerce_admin_meta_boxes.currency_format_num_decimals,format:woocommerce_admin_meta_boxes.currency_format}))}).on("click",".wc-order-refund-items button.do-api-refund, .wc-order-refund-items button.do-manual-refund",function(){if(b(),window.confirm(woocommerce_admin_meta_boxes.i18n_do_refund)){var d=a("input#refund_amount").val(),f=a("input#refund_reason").val(),g={},h={},i={};a(".refund input.refund_order_item_qty").each(function(b,c){a(c).closest("tr").data("order_item_id")&&c.value&&(g[a(c).closest("tr").data("order_item_id")]=c.value)}),a(".refund input.refund_line_total").each(function(b,c){a(c).closest("tr").data("order_item_id")&&(h[a(c).closest("tr").data("order_item_id")]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point))}),a(".refund input.refund_line_tax").each(function(b,c){if(a(c).closest("tr").data("order_item_id")){var d=a(c).data("tax_id");i[a(c).closest("tr").data("order_item_id")]||(i[a(c).closest("tr").data("order_item_id")]={}),i[a(c).closest("tr").data("order_item_id")][d]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point)}});var j={action:"woocommerce_refund_line_items",order_id:woocommerce_admin_meta_boxes.post_id,refund_amount:d,refund_reason:f,line_item_qtys:JSON.stringify(g,null,""),line_item_totals:JSON.stringify(h,null,""),line_item_tax_totals:JSON.stringify(i,null,""),api_refund:a(this).is(".do-api-refund"),restock_refunded_items:a("#restock_refunded_items:checked").size()?"true":"false",security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,j,function(a){a===!0?e():a.error?(window.alert(a.error),c()):console.log(a)})}else c()}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-products"===f){var g=a("select#add_item_id").val();if(g){var h=g.length;b(),a.each(g,function(b,e){var f={action:"woocommerce_add_order_item",item_to_add:e,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,f,function(b){a("table.woocommerce_order_items tbody#order_line_items").append(b),--h||(a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","").val(""),d(),a("select#add_item_id").trigger("chosen:updated"),c())})})}else a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","red")}}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-tax"===f){var g=a("#manual_tax_rate_id").val(),h=a("input[name=add_order_tax]:checked").val();if(g&&(h=g),!h)return!1;var i=a(".order-tax-id").map(function(){return a(this).val()}).get();if(-1===a.inArray(h,i)){b();var j={action:"woocommerce_add_order_tax",rate_id:h,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:j,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}else window.alert(woocommerce_admin_meta_boxes.i18n_tax_rate_already_exists)}}),a("span.inline_total").closest(".totals_group").find("input").change(),a(".order_download_permissions").on("click","button.grant_access",function(){var b=a("select#grant_access_id").val();if(b){a(".order_download_permissions").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_grant_access_to_download",product_ids:b,loop:a(".order_download_permissions .wc-metabox").size(),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.grant_access_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(b){b?a(".order_download_permissions .wc-metaboxes").append(b):window.alert(woocommerce_admin_meta_boxes.i18n_download_permission_fail),a(".date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,showOn:"button",buttonImage:woocommerce_admin_meta_boxes.calendar_image,buttonImageOnly:!0}),a("#grant_access_id").val("").trigger("chosen:updated"),a(".order_download_permissions").unblock()}),!1}}).on("click","button.revoke_access",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_permission_revoke)){var b=a(this).parent().parent(),c=a(this).attr("rel").split(",")[0],d=a(this).attr("rel").split(",")[1];if(c>0){a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var e={action:"woocommerce_revoke_access_to_download",product_id:c,download_id:d,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.revoke_access_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,e,function(){a(b).fadeOut("300",function(){a(b).remove()})})}else a(b).fadeOut("300",function(){a(b).remove()})}return!1}),a("button.load_customer_billing").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_billing)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"billing",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_billing_first_name").val(c.billing_first_name).change(),a("input#_billing_last_name").val(c.billing_last_name).change(),a("input#_billing_company").val(c.billing_company).change(),a("input#_billing_address_1").val(c.billing_address_1).change(),a("input#_billing_address_2").val(c.billing_address_2).change(),a("input#_billing_city").val(c.billing_city).change(),a("input#_billing_postcode").val(c.billing_postcode).change(),a("#_billing_country").val(c.billing_country).change().trigger("chosen:updated"),a("#_billing_state").val(c.billing_state).change().trigger("chosen:updated"),a("input#_billing_email").val(c.billing_email).change(),a("input#_billing_phone").val(c.billing_phone).change()),a(".edit_address").unblock()}})}return!1}),a("button.load_customer_shipping").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_shipping)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"shipping",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_shipping_first_name").val(c.shipping_first_name).change(),a("input#_shipping_last_name").val(c.shipping_last_name).change(),a("input#_shipping_company").val(c.shipping_company).change(),a("input#_shipping_address_1").val(c.shipping_address_1).change(),a("input#_shipping_address_2").val(c.shipping_address_2).change(),a("input#_shipping_city").val(c.shipping_city).change(),a("input#_shipping_postcode").val(c.shipping_postcode).change(),a("#_shipping_country").val(c.shipping_country).change().trigger("chosen:updated"),a("#_shipping_state").val(c.shipping_state).change().trigger("chosen:updated")),a(".edit_address").unblock()}})}return!1}),a("button.billing-same-as-shipping").on("click",function(){return window.confirm(woocommerce_admin_meta_boxes.copy_billing)&&(a("input#_shipping_first_name").val(a("input#_billing_first_name").val()).change(),a("input#_shipping_last_name").val(a("input#_billing_last_name").val()).change(),a("input#_shipping_company").val(a("input#_billing_company").val()).change(),a("input#_shipping_address_1").val(a("input#_billing_address_1").val()).change(),a("input#_shipping_address_2").val(a("input#_billing_address_2").val()).change(),a("input#_shipping_city").val(a("input#_billing_city").val()).change(),a("input#_shipping_postcode").val(a("input#_billing_postcode").val()).change(),a("#_shipping_country").val(a("#_billing_country").val()).change().trigger("chosen:updated"),a("#_shipping_state").val(a("#_billing_state").val()).change().trigger("chosen:updated")),!1}),a(".totals_group").on("click","a.add_total_row",function(){return a(this).closest(".totals_group").find(".total_rows").append(a(this).data("row")),!1}),a(".total_rows").on("click","a.delete_total_row",function(){var b=a(this).closest(".total_row"),c=b.attr("data-order_item_id");return c?b.append('').hide():b.remove(),!1}),a("#woocommerce-order-notes").on("click","a.add_note",function(){if(a("textarea#add_order_note").val()){a("#woocommerce-order-notes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b={action:"woocommerce_add_order_note",post_id:woocommerce_admin_meta_boxes.post_id,note:a("textarea#add_order_note").val(),note_type:a("select#order_note_type").val(),security:woocommerce_admin_meta_boxes.add_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,b,function(b){a("ul.order_notes").prepend(b),a("#woocommerce-order-notes").unblock(),a("#add_order_note").val("")}),!1}}).on("click","a.delete_note",function(){var b=a(this).closest("li.note");a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_delete_order_note",note_id:a(b).attr("rel"),security:woocommerce_admin_meta_boxes.delete_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(){a(b).remove()}),!1}),a(".woocommerce_order_items").stupidtable()}); \ No newline at end of file diff --git a/assets/js/stupidtable/stupidtable.js b/assets/js/stupidtable/stupidtable.js new file mode 100644 index 00000000000..a0bd5db6fcf --- /dev/null +++ b/assets/js/stupidtable/stupidtable.js @@ -0,0 +1,115 @@ +// Stupid jQuery table plugin. + +// Call on a table +// sortFns: Sort functions for your datatypes. +(function($) { + + $.fn.stupidtable = function(sortFns) { + return this.each(function() { + var $table = $(this); + sortFns = sortFns || {}; + + // Merge sort functions with some default sort functions. + sortFns = $.extend({}, $.fn.stupidtable.default_sort_fns, sortFns); + + + // ==================================================== // + // Begin execution! // + // ==================================================== // + + // Do sorting when THs are clicked + $table.on("click.stupidtable", "thead th", function() { + var $this = $(this); + var th_index = 0; + var dir = $.fn.stupidtable.dir; + + // Account for colspans + $this.parents("tr").find("th").slice(0, $this.index()).each(function() { + var cols = $(this).attr("colspan") || 1; + th_index += parseInt(cols,10); + }); + + // Determine (and/or reverse) sorting direction, default `asc` + var sort_dir = $this.data("sort-default") || dir.ASC; + if ($this.data("sort-dir")) + sort_dir = $this.data("sort-dir") === dir.ASC ? dir.DESC : dir.ASC; + + // Choose appropriate sorting function. + var type = $this.data("sort") || null; + + // Prevent sorting if no type defined + if (type === null) { + return; + } + + // Trigger `beforetablesort` event that calling scripts can hook into; + // pass parameters for sorted column index and sorting direction + $table.trigger("beforetablesort", {column: th_index, direction: sort_dir}); + // More reliable method of forcing a redraw + $table.css("display"); + + // Run sorting asynchronously on a timeout to force browser redraw after + // `beforetablesort` callback. Also avoids locking up the browser too much. + setTimeout(function() { + // Gather the elements for this column + var sortMethod = sortFns[type]; + + $table.children("tbody").each(function(index,tbody){ + var column = []; + var $tbody = $(tbody); + var trs = $tbody.children("tr").not('[data-sort-ignore]'); + + // Extract the data for the column that needs to be sorted and pair it up + // with the TR itself into a tuple + trs.each(function(index,tr) { + var $e = $(tr).children().eq(th_index); + var sort_val = $e.data("sort-value"); + var order_by = typeof(sort_val) !== "undefined" ? sort_val : $e.text(); + column.push([order_by, tr]); + }); + + // Sort by the data-order-by value + column.sort(function(a, b) { return sortMethod(a[0], b[0]); }); + if (sort_dir != dir.ASC) + column.reverse(); + + // Replace the content of tbody with the sorted rows. Strangely (and + // conveniently!) enough, .append accomplishes this for us. + trs = $.map(column, function(kv) { return kv[1]; }); + $tbody.append(trs); + }); + + // Reset siblings + $table.find("th").data("sort-dir", null).removeClass("sorting-desc sorting-asc"); + $this.data("sort-dir", sort_dir).addClass("sorting-"+sort_dir); + + // Trigger `aftertablesort` event. Similar to `beforetablesort` + $table.trigger("aftertablesort", {column: th_index, direction: sort_dir}); + // More reliable method of forcing a redraw + $table.css("display"); + }, 10); + }); + }); + }; + + // Enum containing sorting directions + $.fn.stupidtable.dir = {ASC: "asc", DESC: "desc"}; + + $.fn.stupidtable.default_sort_fns = { + "int": function(a, b) { + return parseInt(a, 10) - parseInt(b, 10); + }, + "float": function(a, b) { + return parseFloat(a) - parseFloat(b); + }, + "string": function(a, b) { + return a.localeCompare(b); + }, + "string-ins": function(a, b) { + a = a.toLocaleLowerCase(); + b = b.toLocaleLowerCase(); + return a.localeCompare(b); + } + }; + +})(jQuery); diff --git a/includes/admin/class-wc-admin-assets.php b/includes/admin/class-wc-admin-assets.php index e000050911a..c3e32d83a1d 100644 --- a/includes/admin/class-wc-admin-assets.php +++ b/includes/admin/class-wc-admin-assets.php @@ -73,7 +73,7 @@ class WC_Admin_Assets { */ public function admin_scripts() { global $wp_query, $post, $current_user; - + get_currentuserinfo(); $screen = get_current_screen(); @@ -91,7 +91,7 @@ class WC_Admin_Assets { wp_register_script( 'round', WC()->plugin_url() . '/assets/js/admin/round' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); - wp_register_script( 'wc-admin-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'accounting', 'round', 'ajax-chosen', 'chosen', 'plupload-all' ), WC_VERSION ); + wp_register_script( 'wc-admin-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'accounting', 'round', 'ajax-chosen', 'chosen', 'plupload-all', 'stupidtable' ), WC_VERSION ); wp_register_script( 'ajax-chosen', WC()->plugin_url() . '/assets/js/chosen/ajax-chosen.jquery' . $suffix . '.js', array('jquery', 'chosen'), WC_VERSION ); @@ -99,6 +99,8 @@ class WC_Admin_Assets { wp_register_script( 'qrcode', WC()->plugin_url() . '/assets/js/admin/jquery.qrcode.min.js', array('jquery'), WC_VERSION ); + wp_register_script( 'stupidtable', WC()->plugin_url() . '/assets/js/stupidtable/stupidtable.js', array('jquery'), WC_VERSION ); + // Accounting $params = array( 'mon_decimal_point' => get_option( 'woocommerce_price_decimal_sep' ) diff --git a/includes/admin/meta-boxes/views/html-order-item.php b/includes/admin/meta-boxes/views/html-order-item.php index e7bd7cbf335..29caa9f0960 100644 --- a/includes/admin/meta-boxes/views/html-order-item.php +++ b/includes/admin/meta-boxes/views/html-order-item.php @@ -32,7 +32,7 @@ if ( ! defined( 'ABSPATH' ) ) { - + get_sku() ) ? esc_html( $_product->get_sku() ) . ' – ' : ''; ?> @@ -155,7 +155,7 @@ if ( ! defined( 'ABSPATH' ) ) { - +
    - +
    - + - - - + + + -   diff --git a/readme.txt b/readme.txt index b31ddb83868..0535db863cb 100644 --- a/readme.txt +++ b/readme.txt @@ -157,6 +157,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Tweak - Removed quantity increment/decrement buttons. * Tweak - Moved 'Proceed to checkout' button on cart to beneath totals. * Tweak - Improved 'responsiveness' of product data tabs on add/edit product screen. +* Tweak - Added 'stupidtable' script to allow order item sorting on the order screen (by name, cost, qty). * Dev - Made template debug mode set WC_TEMPLATE_DEBUG_MODE constant and remove all overrides for all template loading functions. * Dev - Switched to .scss from .less for all styles. * Dev - Included bourbon for scss mixins. From 8f89ef9c0bc374d68dce54b589cb901d451f0055 Mon Sep 17 00:00:00 2001 From: Bryce Date: Wed, 26 Nov 2014 23:03:48 +0700 Subject: [PATCH 288/743] Remove locales with 'Sort Code' Wrong swamp --- includes/gateways/bacs/class-wc-gateway-bacs.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/includes/gateways/bacs/class-wc-gateway-bacs.php b/includes/gateways/bacs/class-wc-gateway-bacs.php index bbfb4fd6240..cabe19e40d9 100644 --- a/includes/gateways/bacs/class-wc-gateway-bacs.php +++ b/includes/gateways/bacs/class-wc-gateway-bacs.php @@ -357,7 +357,7 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { if ( ! $this->locale ) { - // Locale information to be used + // Locale information to be used - only those that are not 'Sort Code' $this->locale = apply_filters( 'woocommerce_get_bacs_locale', array( 'AU' => array( 'sortcode' => array( @@ -369,16 +369,6 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { 'label' => __( 'Bank Transit Number', 'woocommerce' ), ), ), - 'GB' => array( - 'sortcode' => array( - 'label' => __( 'Sort Code', 'woocommerce' ), - ), - ), - 'IE' => array( - 'sortcode' => array( - 'label' => __( 'Sort Code', 'woocommerce' ), - ), - ), 'IN' => array( 'sortcode' => array( 'label' => __( 'IFSC', 'woocommerce' ), From 4ab54ee140b391620f0c61d8ded2a12f8d2e4146 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 26 Nov 2014 16:50:02 +0000 Subject: [PATCH 289/743] re-run stupid table on save --- assets/js/admin/meta-boxes-order.js | 1 + assets/js/admin/meta-boxes-order.min.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/js/admin/meta-boxes-order.js b/assets/js/admin/meta-boxes-order.js index 9a1c8bbd264..2624fd5e4fe 100644 --- a/assets/js/admin/meta-boxes-order.js +++ b/assets/js/admin/meta-boxes-order.js @@ -628,6 +628,7 @@ jQuery( function ( $ ) { $( '#woocommerce-order-items .inside' ).append( response ); runTipTip(); removeOrderItemsLoading(); + $('.woocommerce_order_items').stupidtable(); } }); diff --git a/assets/js/admin/meta-boxes-order.min.js b/assets/js/admin/meta-boxes-order.min.js index 14a154a7169..d1e4a283a58 100644 --- a/assets/js/admin/meta-boxes-order.min.js +++ b/assets/js/admin/meta-boxes-order.min.js @@ -1 +1 @@ -jQuery(function(a){function b(){a("#woocommerce-order-items").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}function c(){a("#woocommerce-order-items").unblock()}function d(){a("#tiptip_holder").removeAttr("style"),a("#tiptip_arrow").removeAttr("style"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}function e(){var e={order_id:woocommerce_admin_meta_boxes.post_id,action:"woocommerce_load_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}a("#woocommerce-order-actions input, #woocommerce-order-actions a").click(function(){window.onbeforeunload=""}),a("a.edit_address").click(function(b){b.preventDefault(),a(this).hide(),a(this).closest(".order_data_column").find("div.address").hide(),a(this).closest(".order_data_column").find("div.edit_address").show()});var f=null,g={};"undefined"!=typeof woocommerce_admin_meta_boxes_order&&"undefined"!=typeof woocommerce_admin_meta_boxes_order.countries&&(f=a.parseJSON(woocommerce_admin_meta_boxes_order.countries.replace(/"/g,'"'))),a(".js_field-country").chosen(g).change(function(b,c){if("undefined"==typeof c&&(c=!1),null!==f){var d=a(this),e=d.val(),h=d.parents(".edit_address").find(".js_field-state"),i=h.parent(),j=h.attr("name"),k=h.attr("id"),l=d.data("woocommerce.stickState-"+e)?d.data("woocommerce.stickState-"+e):h.val(),m=h.attr("placeholder");if(c&&d.data("woocommerce.stickState-"+e,l),i.show().find(".chosen-container").remove(),f[e]){var n=a(''),o=f[e];n.append(a('")),a.each(o,function(b){n.append(a('"))}),n.val(l),h.replaceWith(n),n.show().chosen(g).hide().trigger("chosen:updated")}else h.replaceWith('');a("body").trigger("contry-change.woocommerce",[e,a(this).closest("div")])}}).trigger("change",[!0]),a("body").on("change","select.js_field-state",function(){var b=a(this),c=b.val(),d=b.parents(".edit_address").find(".js_field-country"),e=d.val();d.data("woocommerce.stickState-"+e,c)}).on("click","a.edit-order-item",function(){return a(this).closest("tr").find(".view").hide(),a(this).closest("tr").find(".edit").show(),a(this).hide(),a("button.add-line-item").click(),a("button.cancel-action").attr("data-reload",!0),!1}).on("click",".woocommerce_order_items a.delete-order-item",function(){var d=window.confirm(woocommerce_admin_meta_boxes.remove_item_notice);if(d){var e=a(this).closest("tr.item, tr.fee, tr.shipping"),f=e.attr("data-order_item_id");b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){e.remove(),c()}})}return!1}).on("click","#order_refunds .delete_refund",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_refund)){var c=a(this).closest("tr.refund"),d=c.attr("data-order_refund_id");b();var f={action:"woocommerce_delete_refund",refund_id:d,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(){e()}})}return!1}).on("change",".woocommerce_order_items input.quantity",function(){var b=a(this).closest("tr.item"),c=a(this).val(),d=a(this).attr("data-qty"),e=a("input.line_total",b),f=a("input.line_subtotal",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/d;e.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var h=accounting.unformat(f.attr("data-subtotal"),woocommerce_admin.mon_decimal_point)/d;f.val(parseFloat(accounting.formatNumber(h*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/d;e>0&&b.val(parseFloat(accounting.formatNumber(e*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var f=a("input.line_subtotal_tax",a(this)),g=accounting.unformat(f.attr("data-subtotal_tax"),woocommerce_admin.mon_decimal_point)/d;g>0&&f.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("quantity_changed")}).on("change",".woocommerce_order_items input.refund_order_item_qty",function(){var b=a(this).closest("tr.item"),c=b.find("input.quantity").val(),d=a(this).val(),e=a("input.line_total",b),f=a("input.refund_line_total",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/c;f.val(parseFloat(accounting.formatNumber(g*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=a("input.refund_line_tax",a(this)),f=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/c;f>0&&e.val(parseFloat(accounting.formatNumber(f*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("refund_quantity_changed")}).on("change",".woocommerce_order_items .refund input",function(){var b=0,c=a(".woocommerce_order_items").find("tr.item, tr.fee, tr.shipping");c.each(function(){var c=a(this),d=c.find(".refund input:not(.refund_order_item_qty)");d.each(function(c,d){b+=parseFloat(accounting.unformat(a(d).val()||0,woocommerce_admin.mon_decimal_point))})}),a("#refund_amount").val(accounting.formatNumber(b,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change()}).on("click",".woocommerce_order_items button.add_order_item_meta",function(){var d=a(this),e=d.closest("tr.item"),f={order_item_id:e.attr("data-order_item_id"),action:"woocommerce_add_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(a){e.find("tbody.meta_items").append(a),c()}}),!1}).on("click",".woocommerce_order_items button.remove_order_item_meta",function(){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_meta)){var d=a(this).closest("tr"),e={meta_id:d.attr("data-meta_id"),action:"woocommerce_remove_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(){d.hide(),c()}})}return!1}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){var b=a(this).next();(""===b.val()||b.is(".match-total"))&&b.val(a(this).val()).addClass("match-total")}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){a(this).removeClass("match-total")}),a("#woocommerce-order-items").on("click","button.add-line-item",function(){return a("div.wc-order-add-item").slideDown(),a("div.wc-order-bulk-actions").slideUp(),!1}).on("click","button.refund-items",function(){return a("div.wc-order-refund-items").slideDown(),a("div.wc-order-bulk-actions").slideUp(),a("div.wc-order-totals-items").slideUp(),a("#woocommerce-order-items div.refund").show(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").hide(),!1}).on("click",".cancel-action",function(){return a(this).closest("div.wc-order-data-row").slideUp(),a("div.wc-order-bulk-actions").slideDown(),a("div.wc-order-totals-items").slideDown(),a("#woocommerce-order-items div.refund").hide(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").show(),"true"===a(this).attr("data-reload")&&e(),!1}).on("click","button.add-order-item",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-products"}),!1}).on("click","button.add-order-fee",function(){b();var d={action:"woocommerce_add_order_fee",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_fee_line_items").append(b),c()}),!1}).on("click","button.add-order-shipping",function(){b();var d={action:"woocommerce_add_order_shipping",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_shipping_line_items").append(b),c()}),!1}).on("click","button.add-order-tax",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-tax"}),!1}).on("click","input.check-column",function(){a(this).is(":checked")?a("#woocommerce-order-items").find(".check-column input").attr("checked","checked"):a("#woocommerce-order-items").find(".check-column input").removeAttr("checked")}).on("click",".do_bulk_action",function(){var d=a(this).closest(".bulk-actions").find("select").val(),e=a("#woocommerce-order-items").find(".check-column input:checked"),f=[];if(a(e).each(function(){var b=a(this).closest("tr");b.attr("data-order_item_id")&&f.push(b.attr("data-order_item_id"))}),0===f.length)return void window.alert(woocommerce_admin_meta_boxes.i18n_select_items);if("delete"===d){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_notice)){b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){a(e).each(function(){a(this).closest("tr").remove()}),c()}})}}else if("reduce_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_reduce_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}else if("increase_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_increase_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}return!1}).on("click","button.calculate-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_totals)){b();var c=0,d=0,e=0,f=a("#_order_discount").val()||"0";f=accounting.unformat(f.replace(",",".")),a(".woocommerce_order_items tr.shipping input.line_total").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),e+=parseFloat(b)}),a(".woocommerce_order_items input.line_tax").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),d+=parseFloat(b)}),a(".woocommerce_order_items tr.item, .woocommerce_order_items tr.fee").each(function(){var b=a(this).find("input.line_total").val()||"0";c+=accounting.unformat(b.replace(",","."))}),"yes"===woocommerce_admin_meta_boxes.round_at_subtotal&&(d=parseFloat(accounting.toFixed(d,woocommerce_admin_meta_boxes.rounding_precision))),a("#_order_total").val(accounting.formatNumber(c+d+e-f,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change(),a("button.save-action").click()}return!1}).on("click","button.save-action",function(){var e={order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),action:"woocommerce_save_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}}),a(this).trigger("items_saved"),!1}).on("click","a.delete-order-tax",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_tax)){b();var e={action:"woocommerce_remove_order_tax",rate_id:a(this).attr("data-rate_id"),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}).on("click","button.calculate-tax-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_line_taxes)){b();var e=a("#_shipping_country").val(),f=a("#_billing_country").val(),g=woocommerce_admin_meta_boxes.base_country,h="",i="",j="";e?(g=e,h=a("#_shipping_state").val(),i=a("#_shipping_postcode").val(),j=a("#_shipping_city").val()):f&&(g=f,h=a("#_billing_state").val(),i=a("#_billing_postcode").val(),j=a("#_billing_city").val());var k={action:"woocommerce_calc_line_taxes",order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),country:g,state:h,postcode:i,city:j,security:woocommerce_admin_meta_boxes.calc_totals_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:k,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}),a("body").on("change keyup",".wc-order-refund-items #refund_amount",function(){var b=accounting.unformat(a(this).val(),woocommerce_admin.mon_decimal_point);a("button .wc-order-refund-amount .amount").text(accounting.formatMoney(b,{symbol:woocommerce_admin_meta_boxes.currency_format_symbol,decimal:woocommerce_admin_meta_boxes.currency_format_decimal_sep,thousand:woocommerce_admin_meta_boxes.currency_format_thousand_sep,precision:woocommerce_admin_meta_boxes.currency_format_num_decimals,format:woocommerce_admin_meta_boxes.currency_format}))}).on("click",".wc-order-refund-items button.do-api-refund, .wc-order-refund-items button.do-manual-refund",function(){if(b(),window.confirm(woocommerce_admin_meta_boxes.i18n_do_refund)){var d=a("input#refund_amount").val(),f=a("input#refund_reason").val(),g={},h={},i={};a(".refund input.refund_order_item_qty").each(function(b,c){a(c).closest("tr").data("order_item_id")&&c.value&&(g[a(c).closest("tr").data("order_item_id")]=c.value)}),a(".refund input.refund_line_total").each(function(b,c){a(c).closest("tr").data("order_item_id")&&(h[a(c).closest("tr").data("order_item_id")]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point))}),a(".refund input.refund_line_tax").each(function(b,c){if(a(c).closest("tr").data("order_item_id")){var d=a(c).data("tax_id");i[a(c).closest("tr").data("order_item_id")]||(i[a(c).closest("tr").data("order_item_id")]={}),i[a(c).closest("tr").data("order_item_id")][d]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point)}});var j={action:"woocommerce_refund_line_items",order_id:woocommerce_admin_meta_boxes.post_id,refund_amount:d,refund_reason:f,line_item_qtys:JSON.stringify(g,null,""),line_item_totals:JSON.stringify(h,null,""),line_item_tax_totals:JSON.stringify(i,null,""),api_refund:a(this).is(".do-api-refund"),restock_refunded_items:a("#restock_refunded_items:checked").size()?"true":"false",security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,j,function(a){a===!0?e():a.error?(window.alert(a.error),c()):console.log(a)})}else c()}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-products"===f){var g=a("select#add_item_id").val();if(g){var h=g.length;b(),a.each(g,function(b,e){var f={action:"woocommerce_add_order_item",item_to_add:e,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,f,function(b){a("table.woocommerce_order_items tbody#order_line_items").append(b),--h||(a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","").val(""),d(),a("select#add_item_id").trigger("chosen:updated"),c())})})}else a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","red")}}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-tax"===f){var g=a("#manual_tax_rate_id").val(),h=a("input[name=add_order_tax]:checked").val();if(g&&(h=g),!h)return!1;var i=a(".order-tax-id").map(function(){return a(this).val()}).get();if(-1===a.inArray(h,i)){b();var j={action:"woocommerce_add_order_tax",rate_id:h,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:j,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}else window.alert(woocommerce_admin_meta_boxes.i18n_tax_rate_already_exists)}}),a("span.inline_total").closest(".totals_group").find("input").change(),a(".order_download_permissions").on("click","button.grant_access",function(){var b=a("select#grant_access_id").val();if(b){a(".order_download_permissions").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_grant_access_to_download",product_ids:b,loop:a(".order_download_permissions .wc-metabox").size(),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.grant_access_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(b){b?a(".order_download_permissions .wc-metaboxes").append(b):window.alert(woocommerce_admin_meta_boxes.i18n_download_permission_fail),a(".date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,showOn:"button",buttonImage:woocommerce_admin_meta_boxes.calendar_image,buttonImageOnly:!0}),a("#grant_access_id").val("").trigger("chosen:updated"),a(".order_download_permissions").unblock()}),!1}}).on("click","button.revoke_access",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_permission_revoke)){var b=a(this).parent().parent(),c=a(this).attr("rel").split(",")[0],d=a(this).attr("rel").split(",")[1];if(c>0){a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var e={action:"woocommerce_revoke_access_to_download",product_id:c,download_id:d,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.revoke_access_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,e,function(){a(b).fadeOut("300",function(){a(b).remove()})})}else a(b).fadeOut("300",function(){a(b).remove()})}return!1}),a("button.load_customer_billing").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_billing)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"billing",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_billing_first_name").val(c.billing_first_name).change(),a("input#_billing_last_name").val(c.billing_last_name).change(),a("input#_billing_company").val(c.billing_company).change(),a("input#_billing_address_1").val(c.billing_address_1).change(),a("input#_billing_address_2").val(c.billing_address_2).change(),a("input#_billing_city").val(c.billing_city).change(),a("input#_billing_postcode").val(c.billing_postcode).change(),a("#_billing_country").val(c.billing_country).change().trigger("chosen:updated"),a("#_billing_state").val(c.billing_state).change().trigger("chosen:updated"),a("input#_billing_email").val(c.billing_email).change(),a("input#_billing_phone").val(c.billing_phone).change()),a(".edit_address").unblock()}})}return!1}),a("button.load_customer_shipping").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_shipping)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"shipping",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_shipping_first_name").val(c.shipping_first_name).change(),a("input#_shipping_last_name").val(c.shipping_last_name).change(),a("input#_shipping_company").val(c.shipping_company).change(),a("input#_shipping_address_1").val(c.shipping_address_1).change(),a("input#_shipping_address_2").val(c.shipping_address_2).change(),a("input#_shipping_city").val(c.shipping_city).change(),a("input#_shipping_postcode").val(c.shipping_postcode).change(),a("#_shipping_country").val(c.shipping_country).change().trigger("chosen:updated"),a("#_shipping_state").val(c.shipping_state).change().trigger("chosen:updated")),a(".edit_address").unblock()}})}return!1}),a("button.billing-same-as-shipping").on("click",function(){return window.confirm(woocommerce_admin_meta_boxes.copy_billing)&&(a("input#_shipping_first_name").val(a("input#_billing_first_name").val()).change(),a("input#_shipping_last_name").val(a("input#_billing_last_name").val()).change(),a("input#_shipping_company").val(a("input#_billing_company").val()).change(),a("input#_shipping_address_1").val(a("input#_billing_address_1").val()).change(),a("input#_shipping_address_2").val(a("input#_billing_address_2").val()).change(),a("input#_shipping_city").val(a("input#_billing_city").val()).change(),a("input#_shipping_postcode").val(a("input#_billing_postcode").val()).change(),a("#_shipping_country").val(a("#_billing_country").val()).change().trigger("chosen:updated"),a("#_shipping_state").val(a("#_billing_state").val()).change().trigger("chosen:updated")),!1}),a(".totals_group").on("click","a.add_total_row",function(){return a(this).closest(".totals_group").find(".total_rows").append(a(this).data("row")),!1}),a(".total_rows").on("click","a.delete_total_row",function(){var b=a(this).closest(".total_row"),c=b.attr("data-order_item_id");return c?b.append('').hide():b.remove(),!1}),a("#woocommerce-order-notes").on("click","a.add_note",function(){if(a("textarea#add_order_note").val()){a("#woocommerce-order-notes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b={action:"woocommerce_add_order_note",post_id:woocommerce_admin_meta_boxes.post_id,note:a("textarea#add_order_note").val(),note_type:a("select#order_note_type").val(),security:woocommerce_admin_meta_boxes.add_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,b,function(b){a("ul.order_notes").prepend(b),a("#woocommerce-order-notes").unblock(),a("#add_order_note").val("")}),!1}}).on("click","a.delete_note",function(){var b=a(this).closest("li.note");a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_delete_order_note",note_id:a(b).attr("rel"),security:woocommerce_admin_meta_boxes.delete_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(){a(b).remove()}),!1}),a(".woocommerce_order_items").stupidtable()}); \ No newline at end of file +jQuery(function(a){function b(){a("#woocommerce-order-items").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}function c(){a("#woocommerce-order-items").unblock()}function d(){a("#tiptip_holder").removeAttr("style"),a("#tiptip_arrow").removeAttr("style"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}function e(){var e={order_id:woocommerce_admin_meta_boxes.post_id,action:"woocommerce_load_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}a("#woocommerce-order-actions input, #woocommerce-order-actions a").click(function(){window.onbeforeunload=""}),a("a.edit_address").click(function(b){b.preventDefault(),a(this).hide(),a(this).closest(".order_data_column").find("div.address").hide(),a(this).closest(".order_data_column").find("div.edit_address").show()});var f=null,g={};"undefined"!=typeof woocommerce_admin_meta_boxes_order&&"undefined"!=typeof woocommerce_admin_meta_boxes_order.countries&&(f=a.parseJSON(woocommerce_admin_meta_boxes_order.countries.replace(/"/g,'"'))),a(".js_field-country").chosen(g).change(function(b,c){if("undefined"==typeof c&&(c=!1),null!==f){var d=a(this),e=d.val(),h=d.parents(".edit_address").find(".js_field-state"),i=h.parent(),j=h.attr("name"),k=h.attr("id"),l=d.data("woocommerce.stickState-"+e)?d.data("woocommerce.stickState-"+e):h.val(),m=h.attr("placeholder");if(c&&d.data("woocommerce.stickState-"+e,l),i.show().find(".chosen-container").remove(),f[e]){var n=a(''),o=f[e];n.append(a('")),a.each(o,function(b){n.append(a('"))}),n.val(l),h.replaceWith(n),n.show().chosen(g).hide().trigger("chosen:updated")}else h.replaceWith('');a("body").trigger("contry-change.woocommerce",[e,a(this).closest("div")])}}).trigger("change",[!0]),a("body").on("change","select.js_field-state",function(){var b=a(this),c=b.val(),d=b.parents(".edit_address").find(".js_field-country"),e=d.val();d.data("woocommerce.stickState-"+e,c)}).on("click","a.edit-order-item",function(){return a(this).closest("tr").find(".view").hide(),a(this).closest("tr").find(".edit").show(),a(this).hide(),a("button.add-line-item").click(),a("button.cancel-action").attr("data-reload",!0),!1}).on("click",".woocommerce_order_items a.delete-order-item",function(){var d=window.confirm(woocommerce_admin_meta_boxes.remove_item_notice);if(d){var e=a(this).closest("tr.item, tr.fee, tr.shipping"),f=e.attr("data-order_item_id");b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){e.remove(),c()}})}return!1}).on("click","#order_refunds .delete_refund",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_refund)){var c=a(this).closest("tr.refund"),d=c.attr("data-order_refund_id");b();var f={action:"woocommerce_delete_refund",refund_id:d,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(){e()}})}return!1}).on("change",".woocommerce_order_items input.quantity",function(){var b=a(this).closest("tr.item"),c=a(this).val(),d=a(this).attr("data-qty"),e=a("input.line_total",b),f=a("input.line_subtotal",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/d;e.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var h=accounting.unformat(f.attr("data-subtotal"),woocommerce_admin.mon_decimal_point)/d;f.val(parseFloat(accounting.formatNumber(h*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/d;e>0&&b.val(parseFloat(accounting.formatNumber(e*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var f=a("input.line_subtotal_tax",a(this)),g=accounting.unformat(f.attr("data-subtotal_tax"),woocommerce_admin.mon_decimal_point)/d;g>0&&f.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("quantity_changed")}).on("change",".woocommerce_order_items input.refund_order_item_qty",function(){var b=a(this).closest("tr.item"),c=b.find("input.quantity").val(),d=a(this).val(),e=a("input.line_total",b),f=a("input.refund_line_total",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/c;f.val(parseFloat(accounting.formatNumber(g*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=a("input.refund_line_tax",a(this)),f=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/c;f>0&&e.val(parseFloat(accounting.formatNumber(f*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("refund_quantity_changed")}).on("change",".woocommerce_order_items .refund input",function(){var b=0,c=a(".woocommerce_order_items").find("tr.item, tr.fee, tr.shipping");c.each(function(){var c=a(this),d=c.find(".refund input:not(.refund_order_item_qty)");d.each(function(c,d){b+=parseFloat(accounting.unformat(a(d).val()||0,woocommerce_admin.mon_decimal_point))})}),a("#refund_amount").val(accounting.formatNumber(b,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change()}).on("click",".woocommerce_order_items button.add_order_item_meta",function(){var d=a(this),e=d.closest("tr.item"),f={order_item_id:e.attr("data-order_item_id"),action:"woocommerce_add_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(a){e.find("tbody.meta_items").append(a),c()}}),!1}).on("click",".woocommerce_order_items button.remove_order_item_meta",function(){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_meta)){var d=a(this).closest("tr"),e={meta_id:d.attr("data-meta_id"),action:"woocommerce_remove_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(){d.hide(),c()}})}return!1}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){var b=a(this).next();(""===b.val()||b.is(".match-total"))&&b.val(a(this).val()).addClass("match-total")}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){a(this).removeClass("match-total")}),a("#woocommerce-order-items").on("click","button.add-line-item",function(){return a("div.wc-order-add-item").slideDown(),a("div.wc-order-bulk-actions").slideUp(),!1}).on("click","button.refund-items",function(){return a("div.wc-order-refund-items").slideDown(),a("div.wc-order-bulk-actions").slideUp(),a("div.wc-order-totals-items").slideUp(),a("#woocommerce-order-items div.refund").show(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").hide(),!1}).on("click",".cancel-action",function(){return a(this).closest("div.wc-order-data-row").slideUp(),a("div.wc-order-bulk-actions").slideDown(),a("div.wc-order-totals-items").slideDown(),a("#woocommerce-order-items div.refund").hide(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").show(),"true"===a(this).attr("data-reload")&&e(),!1}).on("click","button.add-order-item",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-products"}),!1}).on("click","button.add-order-fee",function(){b();var d={action:"woocommerce_add_order_fee",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_fee_line_items").append(b),c()}),!1}).on("click","button.add-order-shipping",function(){b();var d={action:"woocommerce_add_order_shipping",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_shipping_line_items").append(b),c()}),!1}).on("click","button.add-order-tax",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-tax"}),!1}).on("click","input.check-column",function(){a(this).is(":checked")?a("#woocommerce-order-items").find(".check-column input").attr("checked","checked"):a("#woocommerce-order-items").find(".check-column input").removeAttr("checked")}).on("click",".do_bulk_action",function(){var d=a(this).closest(".bulk-actions").find("select").val(),e=a("#woocommerce-order-items").find(".check-column input:checked"),f=[];if(a(e).each(function(){var b=a(this).closest("tr");b.attr("data-order_item_id")&&f.push(b.attr("data-order_item_id"))}),0===f.length)return void window.alert(woocommerce_admin_meta_boxes.i18n_select_items);if("delete"===d){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_notice)){b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){a(e).each(function(){a(this).closest("tr").remove()}),c()}})}}else if("reduce_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_reduce_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}else if("increase_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_increase_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}return!1}).on("click","button.calculate-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_totals)){b();var c=0,d=0,e=0,f=a("#_order_discount").val()||"0";f=accounting.unformat(f.replace(",",".")),a(".woocommerce_order_items tr.shipping input.line_total").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),e+=parseFloat(b)}),a(".woocommerce_order_items input.line_tax").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),d+=parseFloat(b)}),a(".woocommerce_order_items tr.item, .woocommerce_order_items tr.fee").each(function(){var b=a(this).find("input.line_total").val()||"0";c+=accounting.unformat(b.replace(",","."))}),"yes"===woocommerce_admin_meta_boxes.round_at_subtotal&&(d=parseFloat(accounting.toFixed(d,woocommerce_admin_meta_boxes.rounding_precision))),a("#_order_total").val(accounting.formatNumber(c+d+e-f,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change(),a("button.save-action").click()}return!1}).on("click","button.save-action",function(){var e={order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),action:"woocommerce_save_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c(),a(".woocommerce_order_items").stupidtable()}}),a(this).trigger("items_saved"),!1}).on("click","a.delete-order-tax",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_tax)){b();var e={action:"woocommerce_remove_order_tax",rate_id:a(this).attr("data-rate_id"),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}).on("click","button.calculate-tax-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_line_taxes)){b();var e=a("#_shipping_country").val(),f=a("#_billing_country").val(),g=woocommerce_admin_meta_boxes.base_country,h="",i="",j="";e?(g=e,h=a("#_shipping_state").val(),i=a("#_shipping_postcode").val(),j=a("#_shipping_city").val()):f&&(g=f,h=a("#_billing_state").val(),i=a("#_billing_postcode").val(),j=a("#_billing_city").val());var k={action:"woocommerce_calc_line_taxes",order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),country:g,state:h,postcode:i,city:j,security:woocommerce_admin_meta_boxes.calc_totals_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:k,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}),a("body").on("change keyup",".wc-order-refund-items #refund_amount",function(){var b=accounting.unformat(a(this).val(),woocommerce_admin.mon_decimal_point);a("button .wc-order-refund-amount .amount").text(accounting.formatMoney(b,{symbol:woocommerce_admin_meta_boxes.currency_format_symbol,decimal:woocommerce_admin_meta_boxes.currency_format_decimal_sep,thousand:woocommerce_admin_meta_boxes.currency_format_thousand_sep,precision:woocommerce_admin_meta_boxes.currency_format_num_decimals,format:woocommerce_admin_meta_boxes.currency_format}))}).on("click",".wc-order-refund-items button.do-api-refund, .wc-order-refund-items button.do-manual-refund",function(){if(b(),window.confirm(woocommerce_admin_meta_boxes.i18n_do_refund)){var d=a("input#refund_amount").val(),f=a("input#refund_reason").val(),g={},h={},i={};a(".refund input.refund_order_item_qty").each(function(b,c){a(c).closest("tr").data("order_item_id")&&c.value&&(g[a(c).closest("tr").data("order_item_id")]=c.value)}),a(".refund input.refund_line_total").each(function(b,c){a(c).closest("tr").data("order_item_id")&&(h[a(c).closest("tr").data("order_item_id")]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point))}),a(".refund input.refund_line_tax").each(function(b,c){if(a(c).closest("tr").data("order_item_id")){var d=a(c).data("tax_id");i[a(c).closest("tr").data("order_item_id")]||(i[a(c).closest("tr").data("order_item_id")]={}),i[a(c).closest("tr").data("order_item_id")][d]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point)}});var j={action:"woocommerce_refund_line_items",order_id:woocommerce_admin_meta_boxes.post_id,refund_amount:d,refund_reason:f,line_item_qtys:JSON.stringify(g,null,""),line_item_totals:JSON.stringify(h,null,""),line_item_tax_totals:JSON.stringify(i,null,""),api_refund:a(this).is(".do-api-refund"),restock_refunded_items:a("#restock_refunded_items:checked").size()?"true":"false",security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,j,function(a){a===!0?e():a.error?(window.alert(a.error),c()):console.log(a)})}else c()}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-products"===f){var g=a("select#add_item_id").val();if(g){var h=g.length;b(),a.each(g,function(b,e){var f={action:"woocommerce_add_order_item",item_to_add:e,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,f,function(b){a("table.woocommerce_order_items tbody#order_line_items").append(b),--h||(a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","").val(""),d(),a("select#add_item_id").trigger("chosen:updated"),c())})})}else a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","red")}}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-tax"===f){var g=a("#manual_tax_rate_id").val(),h=a("input[name=add_order_tax]:checked").val();if(g&&(h=g),!h)return!1;var i=a(".order-tax-id").map(function(){return a(this).val()}).get();if(-1===a.inArray(h,i)){b();var j={action:"woocommerce_add_order_tax",rate_id:h,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:j,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}else window.alert(woocommerce_admin_meta_boxes.i18n_tax_rate_already_exists)}}),a("span.inline_total").closest(".totals_group").find("input").change(),a(".order_download_permissions").on("click","button.grant_access",function(){var b=a("select#grant_access_id").val();if(b){a(".order_download_permissions").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_grant_access_to_download",product_ids:b,loop:a(".order_download_permissions .wc-metabox").size(),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.grant_access_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(b){b?a(".order_download_permissions .wc-metaboxes").append(b):window.alert(woocommerce_admin_meta_boxes.i18n_download_permission_fail),a(".date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,showOn:"button",buttonImage:woocommerce_admin_meta_boxes.calendar_image,buttonImageOnly:!0}),a("#grant_access_id").val("").trigger("chosen:updated"),a(".order_download_permissions").unblock()}),!1}}).on("click","button.revoke_access",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_permission_revoke)){var b=a(this).parent().parent(),c=a(this).attr("rel").split(",")[0],d=a(this).attr("rel").split(",")[1];if(c>0){a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var e={action:"woocommerce_revoke_access_to_download",product_id:c,download_id:d,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.revoke_access_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,e,function(){a(b).fadeOut("300",function(){a(b).remove()})})}else a(b).fadeOut("300",function(){a(b).remove()})}return!1}),a("button.load_customer_billing").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_billing)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"billing",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_billing_first_name").val(c.billing_first_name).change(),a("input#_billing_last_name").val(c.billing_last_name).change(),a("input#_billing_company").val(c.billing_company).change(),a("input#_billing_address_1").val(c.billing_address_1).change(),a("input#_billing_address_2").val(c.billing_address_2).change(),a("input#_billing_city").val(c.billing_city).change(),a("input#_billing_postcode").val(c.billing_postcode).change(),a("#_billing_country").val(c.billing_country).change().trigger("chosen:updated"),a("#_billing_state").val(c.billing_state).change().trigger("chosen:updated"),a("input#_billing_email").val(c.billing_email).change(),a("input#_billing_phone").val(c.billing_phone).change()),a(".edit_address").unblock()}})}return!1}),a("button.load_customer_shipping").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_shipping)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"shipping",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_shipping_first_name").val(c.shipping_first_name).change(),a("input#_shipping_last_name").val(c.shipping_last_name).change(),a("input#_shipping_company").val(c.shipping_company).change(),a("input#_shipping_address_1").val(c.shipping_address_1).change(),a("input#_shipping_address_2").val(c.shipping_address_2).change(),a("input#_shipping_city").val(c.shipping_city).change(),a("input#_shipping_postcode").val(c.shipping_postcode).change(),a("#_shipping_country").val(c.shipping_country).change().trigger("chosen:updated"),a("#_shipping_state").val(c.shipping_state).change().trigger("chosen:updated")),a(".edit_address").unblock()}})}return!1}),a("button.billing-same-as-shipping").on("click",function(){return window.confirm(woocommerce_admin_meta_boxes.copy_billing)&&(a("input#_shipping_first_name").val(a("input#_billing_first_name").val()).change(),a("input#_shipping_last_name").val(a("input#_billing_last_name").val()).change(),a("input#_shipping_company").val(a("input#_billing_company").val()).change(),a("input#_shipping_address_1").val(a("input#_billing_address_1").val()).change(),a("input#_shipping_address_2").val(a("input#_billing_address_2").val()).change(),a("input#_shipping_city").val(a("input#_billing_city").val()).change(),a("input#_shipping_postcode").val(a("input#_billing_postcode").val()).change(),a("#_shipping_country").val(a("#_billing_country").val()).change().trigger("chosen:updated"),a("#_shipping_state").val(a("#_billing_state").val()).change().trigger("chosen:updated")),!1}),a(".totals_group").on("click","a.add_total_row",function(){return a(this).closest(".totals_group").find(".total_rows").append(a(this).data("row")),!1}),a(".total_rows").on("click","a.delete_total_row",function(){var b=a(this).closest(".total_row"),c=b.attr("data-order_item_id");return c?b.append('').hide():b.remove(),!1}),a("#woocommerce-order-notes").on("click","a.add_note",function(){if(a("textarea#add_order_note").val()){a("#woocommerce-order-notes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b={action:"woocommerce_add_order_note",post_id:woocommerce_admin_meta_boxes.post_id,note:a("textarea#add_order_note").val(),note_type:a("select#order_note_type").val(),security:woocommerce_admin_meta_boxes.add_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,b,function(b){a("ul.order_notes").prepend(b),a("#woocommerce-order-notes").unblock(),a("#add_order_note").val("")}),!1}}).on("click","a.delete_note",function(){var b=a(this).closest("li.note");a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_delete_order_note",note_id:a(b).attr("rel"),security:woocommerce_admin_meta_boxes.delete_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(){a(b).remove()}),!1}),a(".woocommerce_order_items").stupidtable()}); \ No newline at end of file From b074f63a7ec897104b370064bb0429f0e42a0637 Mon Sep 17 00:00:00 2001 From: Nicola Mustone Date: Wed, 26 Nov 2014 19:07:13 +0100 Subject: [PATCH 290/743] Typo itme -> item --- includes/class-wc-cart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index fa72e7518a3..cd6db88420f 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -709,7 +709,7 @@ class WC_Cart { } /** - * Returns a specific itme in the cart + * Returns a specific item in the cart * * @return array item data */ From 7c42b66a0224b3727ec32a8dfcccac9f787da8d4 Mon Sep 17 00:00:00 2001 From: Harrison DeStefano Date: Wed, 26 Nov 2014 15:51:04 -0500 Subject: [PATCH 291/743] product by sku --- includes/api/class-wc-api-products.php | 69 ++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/includes/api/class-wc-api-products.php b/includes/api/class-wc-api-products.php index 4a1472ab010..045c8f9229d 100644 --- a/includes/api/class-wc-api-products.php +++ b/includes/api/class-wc-api-products.php @@ -66,6 +66,11 @@ class WC_API_Products extends WC_API_Resource { array( array( $this, 'get_product_category' ), WC_API_Server::READABLE ), ); + # GET /products/sku/ + $routes[ $this->base . '/sku/(?P\d+)' ] = array( + array( array( $this, 'get_product_by_sku' ), WC_API_Server::READABLE ), + ); + return $routes; } @@ -1808,4 +1813,68 @@ class WC_API_Products extends WC_API_Resource { */ } + /** + * Get the product for a given sku + * + * @since 2.2.8 + * @param int $sku the product sku + * @param string $fields + * @return array + */ + public function get_product_by_sku( $sku, $fields = null, $filter = array(), $page = 1 ) { + + // get all products + $filter['page'] = $page; + + $query = $this->query_products( $filter ); + + $products = array(); + + // itterate over product collection + foreach ( $query->posts as $product_id ) { + + if ( ! $this->is_readable( $product_id ) ) { + continue; + } + + // temp variable to hold the current product in memory + $tmp_product = $this->get_product( $product_id, $fields ); + + // match product sku with user defined sku + if( (int) $sku == (int) $tmp_product['product']['sku'] ){ + + // validate the id + $id = $this->validate_request( $tmp_product['product']['id'], 'product', 'read' ); + + if ( is_wp_error($id) ) { + + $products[] = current( $id ); + } + + else { + + $products[] = current( $this->get_product( $product_id, $fields ) ); + + } + + } + + } + + // check sku was found, do not return empty results + switch ( sizeof($products) ) { + case 0 : + return new WP_Error( 'woocommerce_api_invalid_sku', "Error - sku {$id} not found", array( 'status' => 404 ) ); + + break; + + default: + + return array( 'products' => $products ); + + break; + } + + } + } From 83a457b29cd33cc555a7ecb66a9db024e2321d41 Mon Sep 17 00:00:00 2001 From: Bryce Date: Thu, 27 Nov 2014 14:32:09 +0700 Subject: [PATCH 292/743] improve get_rating_count() for rating-less reviews Should close #6839. According to `woocommerce_enable_review_rating` & `woocommerce_review_rating_required`, it will do a different DB query, so that when reviews without ratings are allowed, it will do a query that counts those comments as reviews. --- includes/abstracts/abstract-wc-product.php | 27 ++++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/includes/abstracts/abstract-wc-product.php b/includes/abstracts/abstract-wc-product.php index 8846a32a0bd..34a8e6b7e51 100644 --- a/includes/abstracts/abstract-wc-product.php +++ b/includes/abstracts/abstract-wc-product.php @@ -994,13 +994,26 @@ class WC_Product { $where_meta_value = $value ? $wpdb->prepare( " AND meta_value = %d", $value ) : " AND meta_value > 0"; - $count = $wpdb->get_var( $wpdb->prepare(" - SELECT COUNT(meta_value) FROM $wpdb->commentmeta - LEFT JOIN $wpdb->comments ON $wpdb->commentmeta.comment_id = $wpdb->comments.comment_ID - WHERE meta_key = 'rating' - AND comment_post_ID = %d - AND comment_approved = '1' - ", $this->id ) . $where_meta_value ); + if ( get_option( 'woocommerce_enable_review_rating' ) == 'yes' && get_option( 'woocommerce_review_rating_required' ) == 'yes' ) { + + $count = $wpdb->get_var( $wpdb->prepare(" + SELECT COUNT(meta_value) FROM $wpdb->commentmeta + LEFT JOIN $wpdb->comments ON $wpdb->commentmeta.comment_id = $wpdb->comments.comment_ID + WHERE meta_key = 'rating' + AND comment_post_ID = %d + AND comment_approved = '1' + ", $this->id ) . $where_meta_value ); + + } else { + + $count = $wpdb->get_var( $wpdb->prepare(" + SELECT COUNT(*) FROM $wpdb->comments + WHERE comment_parent = 0 + AND comment_post_ID = %d + AND comment_approved = '1' + ", $this->id ) ); + + } set_transient( 'wc_rating_count_' . $this->id . $value_suffix, $count, YEAR_IN_SECONDS ); } From 6df4c143cc3bbd9b81b67b8dc42e251e67a2b1cd Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 27 Nov 2014 10:04:14 +0000 Subject: [PATCH 293/743] Adjust total for partially refunded order totals Closes #6666 --- includes/admin/class-wc-admin-post-types.php | 6 +++++- includes/admin/meta-boxes/views/html-order-items.php | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 3afd014b71a..9a9ae501444 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -545,7 +545,11 @@ class WC_Admin_Post_Types { break; case 'order_total' : - echo esc_html( strip_tags( $the_order->get_formatted_order_total() ) ); + if ( $the_order->get_total_refunded() > 0 ) { + echo '' . strip_tags( $the_order->get_formatted_order_total() ) . ' ' . wc_price( $the_order->get_total() - $the_order->get_total_refunded(), array( 'currency' => $the_order->get_order_currency() ) ) . ''; + } else { + echo esc_html( strip_tags( $the_order->get_formatted_order_total() ) ); + } if ( $the_order->payment_method_title ) { echo '' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $the_order->payment_method_title ) . ''; diff --git a/includes/admin/meta-boxes/views/html-order-items.php b/includes/admin/meta-boxes/views/html-order-items.php index 046284dd9c3..540639fa6d3 100644 --- a/includes/admin/meta-boxes/views/html-order-items.php +++ b/includes/admin/meta-boxes/views/html-order-items.php @@ -172,7 +172,13 @@ if ( wc_tax_enabled() ) { : -
    get_total(), array( 'currency' => $order->get_order_currency() ) ); ?>
    +
    get_total_refunded() > 0 ) { + echo '' . strip_tags( $order->get_formatted_order_total() ) . ' ' . wc_price( $order->get_total() - $order->get_total_refunded(), array( 'currency' => $order->get_order_currency() ) ) . ''; + } else { + echo esc_html( strip_tags( $order->get_formatted_order_total() ) ); + } + ?>
    +

    +
    + + get_order_report_data( array( + 'data' => array( + '_product_id' => array( + 'type' => 'order_item_meta', + 'order_item_type' => 'line_item', + 'function' => '', + 'name' => 'product_id' + ), + '_qty' => array( + 'type' => 'order_item_meta', + 'order_item_type' => 'line_item', + 'function' => 'SUM', + 'name' => 'order_item_qty' + ) + ), + 'where_meta' => array( + array( + 'type' => 'order_item_meta', + 'meta_key' => '_line_subtotal', + 'meta_value' => '0', + 'operator' => '=' + ) + ), + 'order_by' => 'order_item_qty DESC', + 'group_by' => 'product_id', + 'limit' => 12, + 'query_type' => 'get_results', + 'filter_range' => true, + 'order_types' => wc_get_order_types( 'order-count' ), + 'nocache' => true + ) ); + + if ( $top_freebies ) { + foreach ( $top_freebies as $product ) { + echo ' + + + + '; + } + } else { + echo ''; + } + ?> +
    ' . $product->order_item_qty . '' . get_the_title( $product->product_id ) . '' . $this->sales_sparkline( $product->product_id, 7, 'count' ) . '
    ' . __( 'No products found in range', 'woocommerce' ) . '
    +

    diff --git a/readme.txt b/readme.txt index 0535db863cb..39aacfa11f6 100644 --- a/readme.txt +++ b/readme.txt @@ -138,6 +138,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Feature - Fresh new frontend design. * Feature - Undo link in message when removing products from the cart. * Feature - Compatibility with Twenty Fifteen default theme. +* Feature - Added 'top freebies' to product report. * Refactor - Removed deprecated methods from WC_Frontend_Scripts and rewrote script registration and localization to run once. * Refactor - Routing all email functionality through one send() method. * Refactor - Replaced existing email css inliner with Emogrifier. From 313ec0fbd98a661c285dbdf9898ddeafc79fe6ed Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 27 Nov 2014 11:05:09 +0000 Subject: [PATCH 295/743] Readme for #6847 --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 39aacfa11f6..3dde5562a09 100644 --- a/readme.txt +++ b/readme.txt @@ -159,6 +159,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Tweak - Moved 'Proceed to checkout' button on cart to beneath totals. * Tweak - Improved 'responsiveness' of product data tabs on add/edit product screen. * Tweak - Added 'stupidtable' script to allow order item sorting on the order screen (by name, cost, qty). +* Dev - API - Look up product by sku. * Dev - Made template debug mode set WC_TEMPLATE_DEBUG_MODE constant and remove all overrides for all template loading functions. * Dev - Switched to .scss from .less for all styles. * Dev - Included bourbon for scss mixins. From 7a62f75ecaa58892349e89a6ded4d6951bb8bdf5 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Thu, 27 Nov 2014 10:06:28 -0200 Subject: [PATCH 296/743] Revert "Look up product by sku" --- includes/api/class-wc-api-products.php | 69 -------------------------- 1 file changed, 69 deletions(-) diff --git a/includes/api/class-wc-api-products.php b/includes/api/class-wc-api-products.php index 045c8f9229d..4a1472ab010 100644 --- a/includes/api/class-wc-api-products.php +++ b/includes/api/class-wc-api-products.php @@ -66,11 +66,6 @@ class WC_API_Products extends WC_API_Resource { array( array( $this, 'get_product_category' ), WC_API_Server::READABLE ), ); - # GET /products/sku/ - $routes[ $this->base . '/sku/(?P\d+)' ] = array( - array( array( $this, 'get_product_by_sku' ), WC_API_Server::READABLE ), - ); - return $routes; } @@ -1813,68 +1808,4 @@ class WC_API_Products extends WC_API_Resource { */ } - /** - * Get the product for a given sku - * - * @since 2.2.8 - * @param int $sku the product sku - * @param string $fields - * @return array - */ - public function get_product_by_sku( $sku, $fields = null, $filter = array(), $page = 1 ) { - - // get all products - $filter['page'] = $page; - - $query = $this->query_products( $filter ); - - $products = array(); - - // itterate over product collection - foreach ( $query->posts as $product_id ) { - - if ( ! $this->is_readable( $product_id ) ) { - continue; - } - - // temp variable to hold the current product in memory - $tmp_product = $this->get_product( $product_id, $fields ); - - // match product sku with user defined sku - if( (int) $sku == (int) $tmp_product['product']['sku'] ){ - - // validate the id - $id = $this->validate_request( $tmp_product['product']['id'], 'product', 'read' ); - - if ( is_wp_error($id) ) { - - $products[] = current( $id ); - } - - else { - - $products[] = current( $this->get_product( $product_id, $fields ) ); - - } - - } - - } - - // check sku was found, do not return empty results - switch ( sizeof($products) ) { - case 0 : - return new WP_Error( 'woocommerce_api_invalid_sku', "Error - sku {$id} not found", array( 'status' => 404 ) ); - - break; - - default: - - return array( 'products' => $products ); - - break; - } - - } - } From 15996a1dee4370202fa86e2900b37207be18e360 Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Thu, 27 Nov 2014 10:31:56 -0200 Subject: [PATCH 297/743] Created the wc_get_product_id_by_sku() function --- includes/class-wc-shortcodes.php | 4 ++-- includes/wc-product-functions.php | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/includes/class-wc-shortcodes.php b/includes/class-wc-shortcodes.php index e311645af22..8b01ea1a55a 100644 --- a/includes/class-wc-shortcodes.php +++ b/includes/class-wc-shortcodes.php @@ -500,7 +500,7 @@ class WC_Shortcodes { if ( ! empty( $atts['id'] ) ) { $product_data = get_post( $atts['id'] ); } elseif ( ! empty( $atts['sku'] ) ) { - $product_id = $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_sku' AND meta_value='%s' LIMIT 1", $atts['sku'] ) ); + $product_id = wc_get_product_id_by_sku( $atts['sku'] ); $product_data = get_post( $product_id ); } else { return ''; @@ -546,7 +546,7 @@ class WC_Shortcodes { if ( isset( $atts['id'] ) ) { $product_data = get_post( $atts['id'] ); } elseif ( isset( $atts['sku'] ) ) { - $product_id = $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_sku' AND meta_value='%s' LIMIT 1", $atts['sku'] ) ); + $product_id = wc_get_product_id_by_sku( $atts['sku'] ); $product_data = get_post( $product_id ); } else { return ''; diff --git a/includes/wc-product-functions.php b/includes/wc-product-functions.php index ba6dffcd84e..8d39ad6f773 100644 --- a/includes/wc-product-functions.php +++ b/includes/wc-product-functions.php @@ -523,3 +523,18 @@ function wc_product_has_unique_sku( $product_id, $sku ) { return true; } } + +/** + * Get product ID by SKU. + * + * @since 2.3.0 + * @param string $sku + * @return int + */ +function wc_get_product_id_by_sku( $sku ) { + global $wpdb; + + $product_id = $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_sku' AND meta_value='%s' LIMIT 1", $sku ) ); + + return ( $product_id ) ? intval( $product_id ) : 0; +} From 553fe744cff88871ce4362a35e99b5a8d4f0934b Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Thu, 27 Nov 2014 10:34:55 -0200 Subject: [PATCH 298/743] [API] Created a route to get products by SKU, closes #6847 --- includes/api/class-wc-api-products.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/includes/api/class-wc-api-products.php b/includes/api/class-wc-api-products.php index 4a1472ab010..6a9808140f4 100644 --- a/includes/api/class-wc-api-products.php +++ b/includes/api/class-wc-api-products.php @@ -66,6 +66,11 @@ class WC_API_Products extends WC_API_Resource { array( array( $this, 'get_product_category' ), WC_API_Server::READABLE ), ); + # GET /products/sku/ + $routes[ $this->base . '/sku/(?P\w+)' ] = array( + array( array( $this, 'get_product_by_sku' ), WC_API_Server::READABLE ), + ); + return $routes; } @@ -1808,4 +1813,18 @@ class WC_API_Products extends WC_API_Resource { */ } + /** + * Get product by SKU + * + * @since 2.3.0 + * @param int $sku the product SKU + * @param string $fields + * @return array + */ + public function get_product_by_sku( $sku, $fields = null ) { + $id = wc_get_product_id_by_sku( $sku ); + + return $this->get_product( $id, $fields ); + } + } From fb955e8a408a9038cdd1ade53bb6b9c9c5f2fa69 Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Thu, 27 Nov 2014 10:52:24 -0200 Subject: [PATCH 299/743] [API] Added error message when try search a product with a invalid SKU --- includes/api/class-wc-api-products.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/api/class-wc-api-products.php b/includes/api/class-wc-api-products.php index 6a9808140f4..5a39d4f2327 100644 --- a/includes/api/class-wc-api-products.php +++ b/includes/api/class-wc-api-products.php @@ -1824,6 +1824,10 @@ class WC_API_Products extends WC_API_Resource { public function get_product_by_sku( $sku, $fields = null ) { $id = wc_get_product_id_by_sku( $sku ); + if ( empty( $id ) ) { + return new WP_Error( 'woocommerce_api_invalid_product_sku', __( 'Invalid product SKU', 'woocommerce' ), array( 'status' => 404 ) ); + } + return $this->get_product( $id, $fields ); } From 2cfaead6768118985b6cca132fe21a1ed378bbab Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 27 Nov 2014 14:48:58 +0000 Subject: [PATCH 300/743] Added numeric sort for attributes. Closes #5978 --- includes/admin/class-wc-admin-attributes.php | 37 +++++++++++++------ includes/wc-term-functions.php | 27 ++++++++++++-- readme.txt | 1 + .../single-product/add-to-cart/variable.php | 29 ++++----------- 4 files changed, 58 insertions(+), 36 deletions(-) diff --git a/includes/admin/class-wc-admin-attributes.php b/includes/admin/class-wc-admin-attributes.php index ee66f621603..257020644da 100644 --- a/includes/admin/class-wc-admin-attributes.php +++ b/includes/admin/class-wc-admin-attributes.php @@ -275,6 +275,7 @@ class WC_Admin_Attributes {

    @@ -331,6 +332,9 @@ class WC_Admin_Attributes { case 'name' : _e( 'Name', 'woocommerce' ); break; + case 'name_num' : + _e( 'Name (numeric)', 'woocommerce' ); + break; case 'id' : _e( 'Term ID', 'woocommerce' ); break; @@ -340,20 +344,29 @@ class WC_Admin_Attributes { } ?>
    name + 0 === $b->name + 0 ) { + return 0; + } + return ( $a->name + 0 < $b->name + 0 ) ? -1 : 1; +} /** * Sort by parent * @param WP_POST object $a diff --git a/readme.txt b/readme.txt index 3dde5562a09..f350334c69a 100644 --- a/readme.txt +++ b/readme.txt @@ -139,6 +139,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Feature - Undo link in message when removing products from the cart. * Feature - Compatibility with Twenty Fifteen default theme. * Feature - Added 'top freebies' to product report. +* Feature - Added numeric sort for attributes. * Refactor - Removed deprecated methods from WC_Frontend_Scripts and rewrote script registration and localization to run once. * Refactor - Routing all email functionality through one send() method. * Refactor - Replaced existing email css inliner with Emogrifier. diff --git a/templates/single-product/add-to-cart/variable.php b/templates/single-product/add-to-cart/variable.php index 525465661a3..10b85092848 100644 --- a/templates/single-product/add-to-cart/variable.php +++ b/templates/single-product/add-to-cart/variable.php @@ -4,15 +4,14 @@ * * @author WooThemes * @package WooCommerce/Templates - * @version 2.1.0 + * @version 2.3.0 */ if ( ! defined( 'ABSPATH' ) ) { - exit; // Exit if accessed directly + exit; } global $product, $post; - ?> @@ -40,28 +39,15 @@ global $product, $post; // Get terms if this is a taxonomy - ordered if ( taxonomy_exists( sanitize_title( $name ) ) ) { - $orderby = wc_attribute_orderby( sanitize_title( $name ) ); - - switch ( $orderby ) { - case 'name' : - $args = array( 'orderby' => 'name', 'hide_empty' => false, 'menu_order' => false ); - break; - case 'id' : - $args = array( 'orderby' => 'id', 'order' => 'ASC', 'menu_order' => false, 'hide_empty' => false ); - break; - case 'menu_order' : - $args = array( 'menu_order' => 'ASC', 'hide_empty' => false ); - break; - } - - $terms = get_terms( sanitize_title( $name ), $args ); + $terms = wc_get_product_terms( $post->ID, sanitize_title( $name ) ); foreach ( $terms as $term ) { - if ( ! in_array( $term->slug, $options ) ) + if ( ! in_array( $term->slug, $options ) ) { continue; - + } echo ''; } + } else { foreach ( $options as $option ) { @@ -72,8 +58,9 @@ global $product, $post; } ?> ' . __( 'Clear selection', 'woocommerce' ) . ''; + } ?> From 3415b5d7c038fe23f41ef17c73c41f31ae9c3eca Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 27 Nov 2014 15:04:24 +0000 Subject: [PATCH 301/743] In the cart, add variation selected data to the permalink. Closes #6060 --- includes/class-wc-product-variation.php | 5 +++-- readme.txt | 1 + templates/cart/cart.php | 4 ++-- templates/cart/mini-cart.php | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/includes/class-wc-product-variation.php b/includes/class-wc-product-variation.php index 73a8c07484c..e542923245d 100644 --- a/includes/class-wc-product-variation.php +++ b/includes/class-wc-product-variation.php @@ -171,10 +171,11 @@ class WC_Product_Variation extends WC_Product { /** * Wrapper for get_permalink. Adds this variations attributes to the URL. * + * @param $cart item array If the cart item is passed, we can get a link containing the exact attributes selected for the variation, rather than the default attributes. * @return string */ - public function get_permalink() { - return add_query_arg( array_filter( $this->variation_data ), get_permalink( $this->id ) ); + public function get_permalink( $cart_item = null ) { + return add_query_arg( array_filter( isset( $cart_item['variation'] ) ? $cart_item['variation'] : $this->variation_data ), get_permalink( $this->id ) ); } /** diff --git a/readme.txt b/readme.txt index f350334c69a..7d2dc95de72 100644 --- a/readme.txt +++ b/readme.txt @@ -160,6 +160,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Tweak - Moved 'Proceed to checkout' button on cart to beneath totals. * Tweak - Improved 'responsiveness' of product data tabs on add/edit product screen. * Tweak - Added 'stupidtable' script to allow order item sorting on the order screen (by name, cost, qty). +* Tweak - In the cart, add variation selected data to the permalink. * Dev - API - Look up product by sku. * Dev - Made template debug mode set WC_TEMPLATE_DEBUG_MODE constant and remove all overrides for all template loading functions. * Dev - Switched to .scss from .less for all styles. diff --git a/templates/cart/cart.php b/templates/cart/cart.php index daa0dfefb3b..29149ec693f 100644 --- a/templates/cart/cart.php +++ b/templates/cart/cart.php @@ -55,7 +55,7 @@ do_action( 'woocommerce_before_cart' ); ?> if ( ! $_product->is_visible() ) echo $thumbnail; else - printf( '%s', $_product->get_permalink(), $thumbnail ); + printf( '%s', $_product->get_permalink( $cart_item ), $thumbnail ); ?> @@ -64,7 +64,7 @@ do_action( 'woocommerce_before_cart' ); ?> if ( ! $_product->is_visible() ) echo apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key ); else - echo apply_filters( 'woocommerce_cart_item_name', sprintf( '%s', $_product->get_permalink(), $_product->get_title() ), $cart_item, $cart_item_key ); + echo apply_filters( 'woocommerce_cart_item_name', sprintf( '%s', $_product->get_permalink( $cart_item ), $_product->get_title() ), $cart_item, $cart_item_key ); // Meta data echo WC()->cart->get_item_data( $cart_item ); diff --git a/templates/cart/mini-cart.php b/templates/cart/mini-cart.php index ccc8843d044..92cd55ec7e1 100644 --- a/templates/cart/mini-cart.php +++ b/templates/cart/mini-cart.php @@ -37,7 +37,7 @@ if ( ! defined( 'ABSPATH' ) ) { is_visible() ) : ?> - + From e3c1ebc9279f7f43a009adef4d621e8a105195c7 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 27 Nov 2014 15:37:42 +0000 Subject: [PATCH 302/743] Simplify mark_order_status() --- includes/class-wc-ajax.php | 30 ++++++++---------------------- includes/wc-order-functions.php | 10 ++++++++++ 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index c2be06f5425..2f2a8e678df 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -367,31 +367,17 @@ class WC_AJAX { * Mark an order with a status */ public static function mark_order_status() { - if ( ! current_user_can( 'edit_shop_orders' ) ) { - wp_die( __( 'You do not have sufficient permissions to access this page.', 'woocommerce' ), '', array( 'response' => 403 ) ); + if ( current_user_can( 'edit_shop_orders' ) && check_admin_referer( 'woocommerce-mark-order-status' ) ) { + $status = sanitize_text_field( $_GET['status'] ); + $order_id = absint( $_GET['order_id'] ); + + if ( wc_is_order_status( 'wc-' . $status ) && $order_id ) { + $order = wc_get_order( $order_id ); + $order->update_status( $status ); + } } - if ( ! check_admin_referer( 'woocommerce-mark-order-status' ) ) { - wp_die( __( 'You have taken too long. Please go back and retry.', 'woocommerce' ), '', array( 'response' => 403 ) ); - } - - $status = isset( $_GET['status'] ) ? esc_attr( $_GET['status'] ) : ''; - $order_statuses = wc_get_order_statuses(); - - if ( ! $status || ! isset( $order_statuses[ 'wc-' . $status ] ) ) { - die(); - } - - $order_id = isset( $_GET['order_id'] ) && (int) $_GET['order_id'] ? (int) $_GET['order_id'] : ''; - if ( ! $order_id ) { - die(); - } - - $order = wc_get_order( $order_id ); - $order->update_status( $status ); - wp_safe_redirect( wp_get_referer() ? wp_get_referer() : admin_url( 'edit.php?post_type=shop_order' ) ); - die(); } diff --git a/includes/wc-order-functions.php b/includes/wc-order-functions.php index 4c9f231f3e5..a195ab87477 100644 --- a/includes/wc-order-functions.php +++ b/includes/wc-order-functions.php @@ -33,6 +33,16 @@ function wc_get_order_statuses() { return apply_filters( 'wc_order_statuses', $order_statuses ); } +/** + * See if a string is an order status. + * @param string $maybe_status Status, including any wc- prefix + * @return bool + */ +function wc_is_order_status( $maybe_status ) { + $order_statuses = wc_get_order_statuses(); + return isset( $order_statuses[ $maybe_status ] ); +} + /** * Main function for returning orders, uses the WC_Order_Factory class. * From 44af56ff75da0285e79321970af44e6559c3b36e Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 27 Nov 2014 15:40:39 +0000 Subject: [PATCH 303/743] Simplify feature_product() --- includes/class-wc-ajax.php | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 2f2a8e678df..91274600eb3 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -334,32 +334,17 @@ class WC_AJAX { * Feature a product from admin */ public static function feature_product() { - if ( ! current_user_can( 'edit_products' ) ) { - wp_die( __( 'You do not have sufficient permissions to access this page.', 'woocommerce' ), '', array( 'response' => 403 ) ); + if ( current_user_can( 'edit_products' ) && check_admin_referer( 'woocommerce-feature-product' ) ) { + $product_id = absint( $_GET['product_id'] ); + + if ( 'product' === get_post_type( $product_id ) ) { + update_post_meta( $product_id, '_featured', get_post_meta( $product_id, '_featured', true ) === 'yes' ? 'no' : 'yes' ); + + delete_transient( 'wc_featured_products' ); + } } - if ( ! check_admin_referer( 'woocommerce-feature-product' ) ) { - wp_die( __( 'You have taken too long. Please go back and retry.', 'woocommerce' ), '', array( 'response' => 403 ) ); - } - - $post_id = ! empty( $_GET['product_id'] ) ? (int) $_GET['product_id'] : ''; - - if ( ! $post_id || get_post_type( $post_id ) !== 'product' ) { - die; - } - - $featured = get_post_meta( $post_id, '_featured', true ); - - if ( 'yes' === $featured ) { - update_post_meta( $post_id, '_featured', 'no' ); - } else { - update_post_meta( $post_id, '_featured', 'yes' ); - } - - delete_transient( 'wc_featured_products' ); - wp_safe_redirect( wp_get_referer() ? remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'ids' ), wp_get_referer() ) : admin_url( 'edit.php?post_type=shop_order' ) ); - die(); } From 2c1c9896c5e5cdc8223c2ef253c188520b3e074c Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 27 Nov 2014 15:44:51 +0000 Subject: [PATCH 304/743] Remove remove_variation and replace with remove_variations --- .../js/admin/meta-boxes-product-variation.js | 9 ++++++--- .../admin/meta-boxes-product-variation.min.js | 2 +- includes/admin/class-wc-admin-assets.php | 1 - includes/class-wc-ajax.php | 18 ------------------ 4 files changed, 7 insertions(+), 23 deletions(-) diff --git a/assets/js/admin/meta-boxes-product-variation.js b/assets/js/admin/meta-boxes-product-variation.js index 770fb40213f..bd0e45e0f3e 100644 --- a/assets/js/admin/meta-boxes-product-variation.js +++ b/assets/js/admin/meta-boxes-product-variation.js @@ -149,10 +149,13 @@ jQuery( function ( $ ) { } }); + var variation_ids = []; + variation_ids.push( variation ); + var data = { - action: 'woocommerce_remove_variation', - variation_id: variation, - security: woocommerce_admin_meta_boxes_variations.delete_variation_nonce + action: 'woocommerce_remove_variations', + variation_ids: variation_ids, + security: woocommerce_admin_meta_boxes_variations.delete_variations_nonce }; $.post( woocommerce_admin_meta_boxes_variations.ajax_url, data, function ( response ) { diff --git a/assets/js/admin/meta-boxes-product-variation.min.js b/assets/js/admin/meta-boxes-product-variation.min.js index dbf4ccf6a16..6a4064dcafa 100644 --- a/assets/js/admin/meta-boxes-product-variation.min.js +++ b/assets/js/admin/meta-boxes-product-variation.min.js @@ -1 +1 @@ -jQuery(function(a){function b(){a(".woocommerce_variations .woocommerce_variation").each(function(b,c){a(".variation_menu_order",c).val(parseInt(a(c).index(".woocommerce_variations .woocommerce_variation"),10))})}var c={items:".woocommerce_variation",cursor:"move",axis:"y",handle:"h3",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"wc-metabox-sortable-placeholder",start:function(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,c){c.item.removeAttr("style"),b()}};a("#variable_product_options").on("click","button.add_variation",function(){a(".woocommerce_variations").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b=a(".woocommerce_variation").size(),c={action:"woocommerce_add_variation",post_id:woocommerce_admin_meta_boxes_variations.post_id,loop:b,security:woocommerce_admin_meta_boxes_variations.add_variation_nonce};return a.post(woocommerce_admin_meta_boxes_variations.ajax_url,c,function(b){a(".woocommerce_variations").append(b),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50}),a("input.variable_is_downloadable, input.variable_is_virtual, input.variable_manage_stock").change(),a("input#_manage_stock").attr("checked")||a(".hide_if_parent_manage_stock_is_disabled").hide(),a(".woocommerce_variations").unblock(),a("#variable_product_options").trigger("woocommerce_variations_added")}),!1}),a("input#_manage_stock").on("change",function(){var b=a(".hide_if_parent_manage_stock_is_disabled");a(this).attr("checked")?(b.show(),a("input.variable_manage_stock").change()):b.hide()}).change(),a("#variable_product_options").on("click","button.link_all_variations",function(){var b=window.confirm(woocommerce_admin_meta_boxes_variations.i18n_link_all_variations);if(b){a("#variable_product_options").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_link_all_variations",post_id:woocommerce_admin_meta_boxes_variations.post_id,security:woocommerce_admin_meta_boxes_variations.link_variation_nonce};a.post(woocommerce_admin_meta_boxes_variations.ajax_url,c,function(b){var c=parseInt(b,10);if(window.alert(1===c?c+" "+woocommerce_admin_meta_boxes_variations.i18n_variation_added:0===c||c>1?c+" "+woocommerce_admin_meta_boxes_variations.i18n_variations_added:woocommerce_admin_meta_boxes_variations.i18n_no_variations_added),c>0){var d=window.location.toString();d=d.replace("post-new.php?","post.php?post="+woocommerce_admin_meta_boxes_variations.post_id+"&action=edit&"),a("#variable_product_options").load(d+" #variable_product_options_inner",function(){a("#variable_product_options").unblock(),a("#variable_product_options").trigger("woocommerce_variations_added"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50})})}else a("#variable_product_options").unblock()})}return!1}),a("#variable_product_options").on("click","button.remove_variation",function(b){b.preventDefault();var c=window.confirm(woocommerce_admin_meta_boxes_variations.i18n_remove_variation);if(c){var d=a(this).parent().parent(),e=a(this).attr("rel");if(e>0){a(d).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var f={action:"woocommerce_remove_variation",variation_id:e,security:woocommerce_admin_meta_boxes_variations.delete_variation_nonce};a.post(woocommerce_admin_meta_boxes_variations.ajax_url,f,function(){a(d).fadeOut("300",function(){a(d).remove()})})}else a(d).fadeOut("300",function(){a(d).remove()})}return!1}),a(".wc-metaboxes-wrapper").on("click","a.bulk_edit",function(){var b,c,d,e=a("select#field_to_edit").val();switch(e){case"toggle_enabled":b=a('input[name^="variable_enabled"]'),b.attr("checked",!b.attr("checked"));break;case"toggle_downloadable":b=a('input[name^="variable_is_downloadable"]'),b.attr("checked",!b.attr("checked")),a("input.variable_is_downloadable").change();break;case"toggle_virtual":b=a('input[name^="variable_is_virtual"]'),b.attr("checked",!b.attr("checked")),a("input.variable_is_virtual").change();break;case"toggle_manage_stock":b=a('input[name^="variable_manage_stock"]'),b.attr("checked",!b.attr("checked")),a("input.variable_manage_stock").change();break;case"delete_all":if(c=window.confirm(woocommerce_admin_meta_boxes_variations.i18n_delete_all_variations),c&&(c=window.confirm(woocommerce_admin_meta_boxes_variations.i18n_last_warning))){var f=[];a(".woocommerce_variations .woocommerce_variation").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a(".woocommerce_variations .woocommerce_variation .remove_variation").each(function(){var b=a(this).attr("rel");b>0&&f.push(b)});var g={action:"woocommerce_remove_variations",variation_ids:f,security:woocommerce_admin_meta_boxes_variations.delete_variations_nonce};a.post(woocommerce_admin_meta_boxes_variations.ajax_url,g,function(){a(".woocommerce_variations .woocommerce_variation").fadeOut("300",function(){a(".woocommerce_variations .woocommerce_variation").remove()})})}break;case"variable_regular_price_increase":case"variable_regular_price_decrease":case"variable_sale_price_increase":case"variable_sale_price_decrease":var h;if(h=0===e.lastIndexOf("variable_regular_price",0)?"variable_regular_price":"variable_sale_price",d=window.prompt(woocommerce_admin_meta_boxes_variations.i18n_enter_a_value_fixed_or_percent),null==d)return;d=d.toString(),a(':input[name^="'+h+'"]').not('[name*="dates"]').each(function(){var b,c,f=accounting.unformat(a(this).val(),woocommerce_admin.mon_decimal_point);c=d.indexOf("%")>=0?f/100*accounting.unformat(d.replace(/\%/,""),woocommerce_admin.mon_decimal_point):accounting.unformat(d,woocommerce_admin.mon_decimal_point),b=-1!==e.indexOf("increase")?f+c:f-c,a(this).val(accounting.formatNumber(b,woocommerce_admin_meta_boxes.currency_format_num_decimals,woocommerce_admin_meta_boxes.currency_format_thousand_sep,woocommerce_admin_meta_boxes.currency_format_decimal_sep)).change()});break;case"variable_regular_price":case"variable_sale_price":case"variable_stock":case"variable_weight":case"variable_length":case"variable_width":case"variable_height":case"variable_download_limit":case"variable_download_expiry":d=window.prompt(woocommerce_admin_meta_boxes_variations.i18n_enter_a_value),null!=d&&a(':input[name^="'+e+'"]').not('[name*="dates"]').val(d).change();break;case"variable_sale_schedule":var i=window.prompt(woocommerce_admin_meta_boxes_variations.i18n_scheduled_sale_start),j=window.prompt(woocommerce_admin_meta_boxes_variations.i18n_scheduled_sale_end),k=!1;null!=i&&""!=i&&(a(".woocommerce_variable_attributes .sale_schedule").click(),a(':input[name^="variable_sale_price_dates_from"]').val(i).change(),k=!0),null!=j&&""!=j&&(a(".woocommerce_variable_attributes .sale_schedule").click(),a(':input[name^="variable_sale_price_dates_to"]').val(j).change(),k=!0),k||a(".woocommerce_variable_attributes .cancel_sale_schedule").click();break;default:a("select#field_to_edit").trigger(e)}}),a("#variable_product_options").on("change","input.variable_is_downloadable",function(){a(this).closest(".woocommerce_variation").find(".show_if_variation_downloadable").hide(),a(this).is(":checked")&&a(this).closest(".woocommerce_variation").find(".show_if_variation_downloadable").show()}),a("#variable_product_options").on("change","input.variable_is_virtual",function(){a(this).closest(".woocommerce_variation").find(".hide_if_variation_virtual").show(),a(this).is(":checked")&&a(this).closest(".woocommerce_variation").find(".hide_if_variation_virtual").hide()}),a("#variable_product_options").on("change","input.variable_manage_stock",function(){a(this).closest(".woocommerce_variation").find(".show_if_variation_manage_stock").hide(),a(this).is(":checked")&&a(this).closest(".woocommerce_variation").find(".show_if_variation_manage_stock").show()}),a("input.variable_is_downloadable, input.variable_is_virtual, input.variable_manage_stock").change(),a("#variable_product_options").on("woocommerce_variations_added",function(){a(".woocommerce_variations").sortable(c)}),a(".woocommerce_variations").sortable(c);var d,e,f,g=wp.media.model.settings.post.id;a("#variable_product_options").on("click",".upload_image_button",function(b){var c=a(this),h=c.attr("rel"),i=c.closest(".upload_image");if(f=i,e=h,b.preventDefault(),c.is(".remove"))f.find(".upload_image_id").val(""),f.find("img").eq(0).attr("src",woocommerce_admin_meta_boxes_variations.woocommerce_placeholder_img_src),f.find(".upload_image_button").removeClass("remove");else{if(d)return d.uploader.uploader.param("post_id",e),void d.open();wp.media.model.settings.post.id=e,d=wp.media.frames.variable_image=wp.media({title:woocommerce_admin_meta_boxes_variations.i18n_choose_image,button:{text:woocommerce_admin_meta_boxes_variations.i18n_set_image},states:[new wp.media.controller.Library({title:woocommerce_admin_meta_boxes_variations.i18n_choose_image,filterable:"all"})]}),d.on("select",function(){var a=d.state().get("selection").first().toJSON(),b=a.sizes.thumbnail?a.sizes.thumbnail.url:a.url;f.find(".upload_image_id").val(a.id),f.find(".upload_image_button").addClass("remove"),f.find("img").eq(0).attr("src",b),wp.media.model.settings.post.id=g}),d.open()}}),a("a.add_media").on(" click",function(){wp.media.model.settings.post.id=g})}); \ No newline at end of file +jQuery(function(a){function b(){a(".woocommerce_variations .woocommerce_variation").each(function(b,c){a(".variation_menu_order",c).val(parseInt(a(c).index(".woocommerce_variations .woocommerce_variation"),10))})}var c={items:".woocommerce_variation",cursor:"move",axis:"y",handle:"h3",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"wc-metabox-sortable-placeholder",start:function(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,c){c.item.removeAttr("style"),b()}};a("#variable_product_options").on("click","button.add_variation",function(){a(".woocommerce_variations").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b=a(".woocommerce_variation").size(),c={action:"woocommerce_add_variation",post_id:woocommerce_admin_meta_boxes_variations.post_id,loop:b,security:woocommerce_admin_meta_boxes_variations.add_variation_nonce};return a.post(woocommerce_admin_meta_boxes_variations.ajax_url,c,function(b){a(".woocommerce_variations").append(b),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50}),a("input.variable_is_downloadable, input.variable_is_virtual, input.variable_manage_stock").change(),a("input#_manage_stock").attr("checked")||a(".hide_if_parent_manage_stock_is_disabled").hide(),a(".woocommerce_variations").unblock(),a("#variable_product_options").trigger("woocommerce_variations_added")}),!1}),a("input#_manage_stock").on("change",function(){var b=a(".hide_if_parent_manage_stock_is_disabled");a(this).attr("checked")?(b.show(),a("input.variable_manage_stock").change()):b.hide()}).change(),a("#variable_product_options").on("click","button.link_all_variations",function(){var b=window.confirm(woocommerce_admin_meta_boxes_variations.i18n_link_all_variations);if(b){a("#variable_product_options").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_link_all_variations",post_id:woocommerce_admin_meta_boxes_variations.post_id,security:woocommerce_admin_meta_boxes_variations.link_variation_nonce};a.post(woocommerce_admin_meta_boxes_variations.ajax_url,c,function(b){var c=parseInt(b,10);if(window.alert(1===c?c+" "+woocommerce_admin_meta_boxes_variations.i18n_variation_added:0===c||c>1?c+" "+woocommerce_admin_meta_boxes_variations.i18n_variations_added:woocommerce_admin_meta_boxes_variations.i18n_no_variations_added),c>0){var d=window.location.toString();d=d.replace("post-new.php?","post.php?post="+woocommerce_admin_meta_boxes_variations.post_id+"&action=edit&"),a("#variable_product_options").load(d+" #variable_product_options_inner",function(){a("#variable_product_options").unblock(),a("#variable_product_options").trigger("woocommerce_variations_added"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50})})}else a("#variable_product_options").unblock()})}return!1}),a("#variable_product_options").on("click","button.remove_variation",function(b){b.preventDefault();var c=window.confirm(woocommerce_admin_meta_boxes_variations.i18n_remove_variation);if(c){var d=a(this).parent().parent(),e=a(this).attr("rel");if(e>0){a(d).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var f=[];f.push(e);var g={action:"woocommerce_remove_variations",variation_ids:f,security:woocommerce_admin_meta_boxes_variations.delete_variations_nonce};a.post(woocommerce_admin_meta_boxes_variations.ajax_url,g,function(){a(d).fadeOut("300",function(){a(d).remove()})})}else a(d).fadeOut("300",function(){a(d).remove()})}return!1}),a(".wc-metaboxes-wrapper").on("click","a.bulk_edit",function(){var b,c,d,e=a("select#field_to_edit").val();switch(e){case"toggle_enabled":b=a('input[name^="variable_enabled"]'),b.attr("checked",!b.attr("checked"));break;case"toggle_downloadable":b=a('input[name^="variable_is_downloadable"]'),b.attr("checked",!b.attr("checked")),a("input.variable_is_downloadable").change();break;case"toggle_virtual":b=a('input[name^="variable_is_virtual"]'),b.attr("checked",!b.attr("checked")),a("input.variable_is_virtual").change();break;case"toggle_manage_stock":b=a('input[name^="variable_manage_stock"]'),b.attr("checked",!b.attr("checked")),a("input.variable_manage_stock").change();break;case"delete_all":if(c=window.confirm(woocommerce_admin_meta_boxes_variations.i18n_delete_all_variations),c&&(c=window.confirm(woocommerce_admin_meta_boxes_variations.i18n_last_warning))){var f=[];a(".woocommerce_variations .woocommerce_variation").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a(".woocommerce_variations .woocommerce_variation .remove_variation").each(function(){var b=a(this).attr("rel");b>0&&f.push(b)});var g={action:"woocommerce_remove_variations",variation_ids:f,security:woocommerce_admin_meta_boxes_variations.delete_variations_nonce};a.post(woocommerce_admin_meta_boxes_variations.ajax_url,g,function(){a(".woocommerce_variations .woocommerce_variation").fadeOut("300",function(){a(".woocommerce_variations .woocommerce_variation").remove()})})}break;case"variable_regular_price_increase":case"variable_regular_price_decrease":case"variable_sale_price_increase":case"variable_sale_price_decrease":var h;if(h=0===e.lastIndexOf("variable_regular_price",0)?"variable_regular_price":"variable_sale_price",d=window.prompt(woocommerce_admin_meta_boxes_variations.i18n_enter_a_value_fixed_or_percent),null==d)return;d=d.toString(),a(':input[name^="'+h+'"]').not('[name*="dates"]').each(function(){var b,c,f=accounting.unformat(a(this).val(),woocommerce_admin.mon_decimal_point);c=d.indexOf("%")>=0?f/100*accounting.unformat(d.replace(/\%/,""),woocommerce_admin.mon_decimal_point):accounting.unformat(d,woocommerce_admin.mon_decimal_point),b=-1!==e.indexOf("increase")?f+c:f-c,a(this).val(accounting.formatNumber(b,woocommerce_admin_meta_boxes.currency_format_num_decimals,woocommerce_admin_meta_boxes.currency_format_thousand_sep,woocommerce_admin_meta_boxes.currency_format_decimal_sep)).change()});break;case"variable_regular_price":case"variable_sale_price":case"variable_stock":case"variable_weight":case"variable_length":case"variable_width":case"variable_height":case"variable_download_limit":case"variable_download_expiry":d=window.prompt(woocommerce_admin_meta_boxes_variations.i18n_enter_a_value),null!=d&&a(':input[name^="'+e+'"]').not('[name*="dates"]').val(d).change();break;case"variable_sale_schedule":var i=window.prompt(woocommerce_admin_meta_boxes_variations.i18n_scheduled_sale_start),j=window.prompt(woocommerce_admin_meta_boxes_variations.i18n_scheduled_sale_end),k=!1;null!=i&&""!=i&&(a(".woocommerce_variable_attributes .sale_schedule").click(),a(':input[name^="variable_sale_price_dates_from"]').val(i).change(),k=!0),null!=j&&""!=j&&(a(".woocommerce_variable_attributes .sale_schedule").click(),a(':input[name^="variable_sale_price_dates_to"]').val(j).change(),k=!0),k||a(".woocommerce_variable_attributes .cancel_sale_schedule").click();break;default:a("select#field_to_edit").trigger(e)}}),a("#variable_product_options").on("change","input.variable_is_downloadable",function(){a(this).closest(".woocommerce_variation").find(".show_if_variation_downloadable").hide(),a(this).is(":checked")&&a(this).closest(".woocommerce_variation").find(".show_if_variation_downloadable").show()}),a("#variable_product_options").on("change","input.variable_is_virtual",function(){a(this).closest(".woocommerce_variation").find(".hide_if_variation_virtual").show(),a(this).is(":checked")&&a(this).closest(".woocommerce_variation").find(".hide_if_variation_virtual").hide()}),a("#variable_product_options").on("change","input.variable_manage_stock",function(){a(this).closest(".woocommerce_variation").find(".show_if_variation_manage_stock").hide(),a(this).is(":checked")&&a(this).closest(".woocommerce_variation").find(".show_if_variation_manage_stock").show()}),a("input.variable_is_downloadable, input.variable_is_virtual, input.variable_manage_stock").change(),a("#variable_product_options").on("woocommerce_variations_added",function(){a(".woocommerce_variations").sortable(c)}),a(".woocommerce_variations").sortable(c);var d,e,f,g=wp.media.model.settings.post.id;a("#variable_product_options").on("click",".upload_image_button",function(b){var c=a(this),h=c.attr("rel"),i=c.closest(".upload_image");if(f=i,e=h,b.preventDefault(),c.is(".remove"))f.find(".upload_image_id").val(""),f.find("img").eq(0).attr("src",woocommerce_admin_meta_boxes_variations.woocommerce_placeholder_img_src),f.find(".upload_image_button").removeClass("remove");else{if(d)return d.uploader.uploader.param("post_id",e),void d.open();wp.media.model.settings.post.id=e,d=wp.media.frames.variable_image=wp.media({title:woocommerce_admin_meta_boxes_variations.i18n_choose_image,button:{text:woocommerce_admin_meta_boxes_variations.i18n_set_image},states:[new wp.media.controller.Library({title:woocommerce_admin_meta_boxes_variations.i18n_choose_image,filterable:"all"})]}),d.on("select",function(){var a=d.state().get("selection").first().toJSON(),b=a.sizes.thumbnail?a.sizes.thumbnail.url:a.url;f.find(".upload_image_id").val(a.id),f.find(".upload_image_button").addClass("remove"),f.find("img").eq(0).attr("src",b),wp.media.model.settings.post.id=g}),d.open()}}),a("a.add_media").on(" click",function(){wp.media.model.settings.post.id=g})}); \ No newline at end of file diff --git a/includes/admin/class-wc-admin-assets.php b/includes/admin/class-wc-admin-assets.php index c3e32d83a1d..489b6fa9e50 100644 --- a/includes/admin/class-wc-admin-assets.php +++ b/includes/admin/class-wc-admin-assets.php @@ -164,7 +164,6 @@ class WC_Admin_Assets { 'woocommerce_placeholder_img_src' => wc_placeholder_img_src(), 'add_variation_nonce' => wp_create_nonce("add-variation"), 'link_variation_nonce' => wp_create_nonce("link-variations"), - 'delete_variation_nonce' => wp_create_nonce("delete-variation"), 'delete_variations_nonce' => wp_create_nonce("delete-variations"), 'i18n_link_all_variations' => esc_js( __( 'Are you sure you want to link all variations? This will create a new variation for each and every possible combination of variation attributes (max 50 per run).', 'woocommerce' ) ), 'i18n_enter_a_value' => esc_js( __( 'Enter a value', 'woocommerce' ) ), diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 91274600eb3..2cc20e837ef 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -397,28 +397,10 @@ class WC_AJAX { die(); } - /** - * Delete variation via ajax function - */ - public static function remove_variation() { - - check_ajax_referer( 'delete-variation', 'security' ); - - $variation_id = intval( $_POST['variation_id'] ); - $variation = get_post( $variation_id ); - - if ( $variation && 'product_variation' == $variation->post_type ) { - wp_delete_post( $variation_id ); - } - - die(); - } - /** * Delete variations via ajax function */ public static function remove_variations() { - check_ajax_referer( 'delete-variations', 'security' ); $variation_ids = (array) $_POST['variation_ids']; From 3aa67ac352a8dc80e731580fc573df0ab8ffe850 Mon Sep 17 00:00:00 2001 From: shivapoudel Date: Thu, 27 Nov 2014 22:32:11 +0545 Subject: [PATCH 305/743] Fixes attribute menu highlight, closes #6849 --- includes/admin/class-wc-admin-attributes.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/admin/class-wc-admin-attributes.php b/includes/admin/class-wc-admin-attributes.php index 257020644da..53dfc16e4bd 100644 --- a/includes/admin/class-wc-admin-attributes.php +++ b/includes/admin/class-wc-admin-attributes.php @@ -233,7 +233,7 @@ class WC_Admin_Attributes {

    -
    +
    attribute_name))) : - $terms_array = array(); - $terms = get_terms( wc_attribute_taxonomy_name($tax->attribute_name), 'orderby=name&hide_empty=0' ); - if ($terms) : - foreach ($terms as $term) : - $terms_array[] = $term->name; - endforeach; - echo implode(', ', $terms_array); - else : + $taxonomy = wc_attribute_taxonomy_name( $tax->attribute_name ); + + if ( taxonomy_exists( $taxonomy ) ) { + $terms = get_terms( $taxonomy, 'hide_empty=0' ); + + switch ( $tax->attribute_orderby ) { + case 'name_num' : + usort( $terms, '_wc_get_product_terms_name_num_usort_callback' ); + break; + case 'parent' : + usort( $terms, '_wc_get_product_terms_parent_usort_callback' ); + break; + } + + $terms_string = implode( ', ', wp_list_pluck( $terms, 'name' ) ); + if ( $terms_string ) { + echo $terms_string; + } else { echo ''; - endif; - else : + } + } else { echo ''; - endif; + } ?>
    @@ -323,7 +323,7 @@ class WC_Admin_Attributes { @@ -384,7 +384,7 @@ class WC_Admin_Attributes {

    - +
    From 84bc7a2339812d58e46164d665c284a70b6529bd Mon Sep 17 00:00:00 2001 From: shivapoudel Date: Thu, 27 Nov 2014 22:34:19 +0545 Subject: [PATCH 306/743] Cleanup for WC_Admin_Attributes Class --- includes/admin/class-wc-admin-attributes.php | 166 ++++++++++--------- 1 file changed, 84 insertions(+), 82 deletions(-) diff --git a/includes/admin/class-wc-admin-attributes.php b/includes/admin/class-wc-admin-attributes.php index 53dfc16e4bd..6694de59092 100644 --- a/includes/admin/class-wc-admin-attributes.php +++ b/includes/admin/class-wc-admin-attributes.php @@ -4,14 +4,14 @@ * * The attributes section lets users add custom attributes to assign to products - they can also be used in the layered nav widget. * - * @author WooThemes - * @category Admin - * @package WooCommerce/Admin - * @version 2.1.0 + * @author WooThemes + * @category Admin + * @package WooCommerce/Admin + * @version 2.3.0 */ if ( ! defined( 'ABSPATH' ) ) { - exit; // Exit if accessed directly + exit; } /** @@ -23,7 +23,7 @@ class WC_Admin_Attributes { * Handles output of the attributes page in admin. * * Shows the created attributes and lets you add new ones or edit existing ones. - * The added attributes are stored in the database and can be used for layered navigation. + * The added attributes are stored in the database and can be used for layered navigation. */ public static function output() { global $wpdb; @@ -232,7 +232,7 @@ class WC_Admin_Attributes { ?>

    -

    +

    attribute_label ); ?> -
    |
    +
    |
    attribute_name ); ?> attribute_type ) ); ?>
    @@ -299,57 +299,57 @@ class WC_Admin_Attributes { ?>

    -

    -
    -
    -
    -
    -
    - - - - - - - - - - - +

    +
    +
    +
    +
    +
    + + + + + + + + + + + - - - - - + + + + - - - -
    attribute_label ); ?> + attribute_label ); ?> -
    |
    -
    attribute_name ); ?>attribute_type ) ); ?>attribute_orderby ) { - case 'name' : - _e( 'Name', 'woocommerce' ); - break; - case 'name_num' : - _e( 'Name (numeric)', 'woocommerce' ); - break; - case 'id' : - _e( 'Term ID', 'woocommerce' ); - break; - default: - _e( 'Custom ordering', 'woocommerce' ); - break; - } - ?>attribute_name ); +
    |
    +
    attribute_name ); ?>attribute_type ) ); ?>attribute_orderby ) { + case 'name' : + _e( 'Name', 'woocommerce' ); + break; + case 'name_num' : + _e( 'Name (numeric)', 'woocommerce' ); + break; + case 'id' : + _e( 'Term ID', 'woocommerce' ); + break; + default: + _e( 'Custom ordering', 'woocommerce' ); + break; + } + ?>attribute_name ); - if ( taxonomy_exists( $taxonomy ) ) { - $terms = get_terms( $taxonomy, 'hide_empty=0' ); + if ( taxonomy_exists( $taxonomy ) ) { + $terms = get_terms( $taxonomy, 'hide_empty=0' ); - switch ( $tax->attribute_orderby ) { + switch ( $tax->attribute_orderby ) { case 'name_num' : usort( $terms, '_wc_get_product_terms_name_num_usort_callback' ); break; @@ -367,24 +367,24 @@ class WC_Admin_Attributes { } else { echo ''; } - ?>
    -
    -
    -
    -
    -
    -

    -

    - + ?> + + + + +
    +
    +
    +
    +
    +

    +

    +
    @@ -419,19 +419,21 @@ class WC_Admin_Attributes {

    - -
    -
    -
    -
    - From b6cd6b873534c85c47787dfee63a93a715069424 Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Thu, 27 Nov 2014 15:29:52 -0200 Subject: [PATCH 307/743] Fixed some coding standards --- includes/admin/class-wc-admin-attributes.php | 68 ++++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/includes/admin/class-wc-admin-attributes.php b/includes/admin/class-wc-admin-attributes.php index 6694de59092..2bd62ba4b08 100644 --- a/includes/admin/class-wc-admin-attributes.php +++ b/includes/admin/class-wc-admin-attributes.php @@ -207,10 +207,11 @@ class WC_Admin_Attributes { } // Show admin interface - if ( ! empty( $_GET['edit'] ) ) + if ( ! empty( $_GET['edit'] ) ) { self::edit_attribute(); - else + } else { self::add_attribute(); + } } /** @@ -223,12 +224,12 @@ class WC_Admin_Attributes { $edit = absint( $_GET['edit'] ); - $attribute_to_edit = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies WHERE attribute_id = '$edit'"); + $attribute_to_edit = $wpdb->get_row( "SELECT * FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies WHERE attribute_id = '$edit'" ); - $att_type = $attribute_to_edit->attribute_type; - $att_label = $attribute_to_edit->attribute_label; - $att_name = $attribute_to_edit->attribute_name; - $att_orderby = $attribute_to_edit->attribute_orderby; + $att_type = $attribute_to_edit->attribute_type; + $att_label = $attribute_to_edit->attribute_label; + $att_name = $attribute_to_edit->attribute_name; + $att_orderby = $attribute_to_edit->attribute_orderby; ?>

    @@ -260,8 +261,8 @@ class WC_Admin_Attributes {

    products -> product data -> attributes -> values, Text allows manual entry whereas select allows pre-configured terms in a drop-down list.', 'woocommerce' ); ?>

    @@ -273,10 +274,10 @@ class WC_Admin_Attributes {

    @@ -299,7 +300,7 @@ class WC_Admin_Attributes { ?>

    -

    +


    @@ -307,23 +308,23 @@ class WC_Admin_Attributes { - - - - - + + + + + - @@ -368,7 +369,7 @@ class WC_Admin_Attributes { echo ''; } ?> - +
    -

    -

    +

    +

    @@ -401,7 +402,7 @@ class WC_Admin_Attributes {

    products -> product data -> attributes -> values, Text allows manual entry whereas select allows pre-configured terms in a drop-down list.', 'woocommerce' ); ?>

    @@ -410,14 +411,14 @@ class WC_Admin_Attributes {

    -

    +

    @@ -428,8 +429,7 @@ class WC_Admin_Attributes { /* " ); - if ( answer ) { + if ( window.confirm( "" ) ) { return true; } return false; From d990daed57645670faba1b23079ad8a1ef02840b Mon Sep 17 00:00:00 2001 From: Barry Kooij Date: Thu, 27 Nov 2014 22:36:46 +0100 Subject: [PATCH 308/743] Typo. --- includes/class-wc-cart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index fa72e7518a3..951384db932 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -1111,7 +1111,7 @@ class WC_Cart { // Now we have a new item price (excluding TAX) $line_subtotal = $line_price - array_sum( $taxes ); - // Now add modifed taxes + // Now add modified taxes $tax_result = $this->tax->calc_tax( $line_subtotal, $item_tax_rates ); $line_subtotal_tax = array_sum( $tax_result ); From c2321aeb944892c9da75f31c45e6eb768bcc8925 Mon Sep 17 00:00:00 2001 From: Barry Kooij Date: Thu, 27 Nov 2014 22:38:36 +0100 Subject: [PATCH 309/743] Code standards. --- includes/class-wc-cart.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index 951384db932..d3591ae85dc 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -1090,12 +1090,14 @@ class WC_Cart { } elseif ( $this->prices_include_tax ) { // Get base tax rates - if ( empty( $shop_tax_rates[ $_product->tax_class ] ) ) + if ( empty( $shop_tax_rates[ $_product->tax_class ] ) ) { $shop_tax_rates[ $_product->tax_class ] = $this->tax->get_base_tax_rates( $_product->tax_class ); + } // Get item tax rates - if ( empty( $tax_rates[ $_product->get_tax_class() ] ) ) + if ( empty( $tax_rates[ $_product->get_tax_class() ] ) ) { $tax_rates[ $_product->get_tax_class() ] = $this->tax->get_rates( $_product->get_tax_class() ); + } $base_tax_rates = $shop_tax_rates[ $_product->tax_class ]; $item_tax_rates = $tax_rates[ $_product->get_tax_class() ]; @@ -1134,8 +1136,9 @@ class WC_Cart { } else { // Get item tax rates - if ( empty( $tax_rates[ $_product->get_tax_class() ] ) ) + if ( empty( $tax_rates[ $_product->get_tax_class() ] ) ) { $tax_rates[ $_product->get_tax_class() ] = $this->tax->get_rates( $_product->get_tax_class() ); + } $item_tax_rates = $tax_rates[ $_product->get_tax_class() ]; From 3af23cb7f56d5c3b85d9a108b2f90bccae4af239 Mon Sep 17 00:00:00 2001 From: Justin Sainton Date: Thu, 27 Nov 2014 20:15:49 -0800 Subject: [PATCH 310/743] Update grunt-wp-i18n dev dependency --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 72dbd4a7ad3..712ef01f49d 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "grunt-contrib-uglify": "^0.5.1", "grunt-contrib-watch": "^0.6.1", "grunt-shell": "^1.1.1", - "grunt-wp-i18n": "^0.4.8", + "grunt-wp-i18n": "^0.4.9", "node-bourbon": "^1.2.3" }, "engines": { From 13ad1100c53511b23e55a5a667cfcf62d1d50e63 Mon Sep 17 00:00:00 2001 From: splashingpixels Date: Thu, 27 Nov 2014 20:42:58 -0800 Subject: [PATCH 311/743] undefined index when product image gallery side meta box is removed fixes 6855 --- includes/admin/meta-boxes/class-wc-meta-box-product-images.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-product-images.php b/includes/admin/meta-boxes/class-wc-meta-box-product-images.php index 2b856a7ff40..6a7f4b9e78d 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-product-images.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-product-images.php @@ -64,7 +64,7 @@ class WC_Meta_Box_Product_Images { * Save meta box data */ public static function save( $post_id, $post ) { - $attachment_ids = array_filter( explode( ',', wc_clean( $_POST['product_image_gallery'] ) ) ); + $attachment_ids = isset( $_POST['product_image_gallery'] ) ? array_filter( explode( ',', wc_clean( $_POST['product_image_gallery'] ) ) ) : array(); update_post_meta( $post_id, '_product_image_gallery', implode( ',', $attachment_ids ) ); } From 5e0cbb4676d9258019d0cd55e895033445b69785 Mon Sep 17 00:00:00 2001 From: Bryce Date: Fri, 28 Nov 2014 14:17:58 +0700 Subject: [PATCH 312/743] Add stupidtable.min.js --- assets/js/stupidtable/stupidtable.min.js | 1 + includes/admin/class-wc-admin-assets.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 assets/js/stupidtable/stupidtable.min.js diff --git a/assets/js/stupidtable/stupidtable.min.js b/assets/js/stupidtable/stupidtable.min.js new file mode 100644 index 00000000000..3f866da3c48 --- /dev/null +++ b/assets/js/stupidtable/stupidtable.min.js @@ -0,0 +1 @@ +!function(a){a.fn.stupidtable=function(b){return this.each(function(){var c=a(this);b=b||{},b=a.extend({},a.fn.stupidtable.default_sort_fns,b),c.on("click.stupidtable","thead th",function(){var d=a(this),e=0,f=a.fn.stupidtable.dir;d.parents("tr").find("th").slice(0,d.index()).each(function(){var b=a(this).attr("colspan")||1;e+=parseInt(b,10)});var g=d.data("sort-default")||f.ASC;d.data("sort-dir")&&(g=d.data("sort-dir")===f.ASC?f.DESC:f.ASC);var h=d.data("sort")||null;null!==h&&(c.trigger("beforetablesort",{column:e,direction:g}),c.css("display"),setTimeout(function(){var i=b[h];c.children("tbody").each(function(b,c){var d=[],h=a(c),j=h.children("tr").not("[data-sort-ignore]");j.each(function(b,c){var f=a(c).children().eq(e),g=f.data("sort-value"),h="undefined"!=typeof g?g:f.text();d.push([h,c])}),d.sort(function(a,b){return i(a[0],b[0])}),g!=f.ASC&&d.reverse(),j=a.map(d,function(a){return a[1]}),h.append(j)}),c.find("th").data("sort-dir",null).removeClass("sorting-desc sorting-asc"),d.data("sort-dir",g).addClass("sorting-"+g),c.trigger("aftertablesort",{column:e,direction:g}),c.css("display")},10))})})},a.fn.stupidtable.dir={ASC:"asc",DESC:"desc"},a.fn.stupidtable.default_sort_fns={"int":function(a,b){return parseInt(a,10)-parseInt(b,10)},"float":function(a,b){return parseFloat(a)-parseFloat(b)},string:function(a,b){return a.localeCompare(b)},"string-ins":function(a,b){return a=a.toLocaleLowerCase(),b=b.toLocaleLowerCase(),a.localeCompare(b)}}}(jQuery); \ No newline at end of file diff --git a/includes/admin/class-wc-admin-assets.php b/includes/admin/class-wc-admin-assets.php index 489b6fa9e50..17ea8f1272d 100644 --- a/includes/admin/class-wc-admin-assets.php +++ b/includes/admin/class-wc-admin-assets.php @@ -99,7 +99,7 @@ class WC_Admin_Assets { wp_register_script( 'qrcode', WC()->plugin_url() . '/assets/js/admin/jquery.qrcode.min.js', array('jquery'), WC_VERSION ); - wp_register_script( 'stupidtable', WC()->plugin_url() . '/assets/js/stupidtable/stupidtable.js', array('jquery'), WC_VERSION ); + wp_register_script( 'stupidtable', WC()->plugin_url() . '/assets/js/stupidtable/stupidtable' . $suffix . '.js', array('jquery'), WC_VERSION ); // Accounting $params = array( From 0967525a720818da71626bdf55144dae97a0abd0 Mon Sep 17 00:00:00 2001 From: Bryce Date: Fri, 28 Nov 2014 14:21:01 +0700 Subject: [PATCH 313/743] Bit of code formatting --- includes/admin/class-wc-admin-assets.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/includes/admin/class-wc-admin-assets.php b/includes/admin/class-wc-admin-assets.php index 17ea8f1272d..4543df1484a 100644 --- a/includes/admin/class-wc-admin-assets.php +++ b/includes/admin/class-wc-admin-assets.php @@ -93,13 +93,13 @@ class WC_Admin_Assets { wp_register_script( 'wc-admin-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'accounting', 'round', 'ajax-chosen', 'chosen', 'plupload-all', 'stupidtable' ), WC_VERSION ); - wp_register_script( 'ajax-chosen', WC()->plugin_url() . '/assets/js/chosen/ajax-chosen.jquery' . $suffix . '.js', array('jquery', 'chosen'), WC_VERSION ); + wp_register_script( 'ajax-chosen', WC()->plugin_url() . '/assets/js/chosen/ajax-chosen.jquery' . $suffix . '.js', array( 'jquery', 'chosen' ), WC_VERSION ); - wp_register_script( 'chosen', WC()->plugin_url() . '/assets/js/chosen/chosen.jquery' . $suffix . '.js', array('jquery'), WC_VERSION ); + wp_register_script( 'chosen', WC()->plugin_url() . '/assets/js/chosen/chosen.jquery' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); - wp_register_script( 'qrcode', WC()->plugin_url() . '/assets/js/admin/jquery.qrcode.min.js', array('jquery'), WC_VERSION ); + wp_register_script( 'qrcode', WC()->plugin_url() . '/assets/js/admin/jquery.qrcode.min.js', array( 'jquery' ), WC_VERSION ); - wp_register_script( 'stupidtable', WC()->plugin_url() . '/assets/js/stupidtable/stupidtable' . $suffix . '.js', array('jquery'), WC_VERSION ); + wp_register_script( 'stupidtable', WC()->plugin_url() . '/assets/js/stupidtable/stupidtable' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); // Accounting $params = array( @@ -148,7 +148,7 @@ class WC_Admin_Assets { // Products if ( in_array( $screen->id, array( 'edit-product' ) ) ) { - wp_enqueue_script( 'woocommerce_quick-edit', WC()->plugin_url() . '/assets/js/admin/quick-edit' . $suffix . '.js', array('jquery'), WC_VERSION ); + wp_enqueue_script( 'woocommerce_quick-edit', WC()->plugin_url() . '/assets/js/admin/quick-edit' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); } // Meta boxes @@ -160,7 +160,7 @@ class WC_Admin_Assets { $params = array( 'post_id' => isset( $post->ID ) ? $post->ID : '', 'plugin_url' => WC()->plugin_url(), - 'ajax_url' => admin_url('admin-ajax.php'), + 'ajax_url' => admin_url( 'admin-ajax.php' ), 'woocommerce_placeholder_img_src' => wc_placeholder_img_src(), 'add_variation_nonce' => wp_create_nonce("add-variation"), 'link_variation_nonce' => wp_create_nonce("link-variations"), @@ -219,11 +219,11 @@ class WC_Admin_Assets { 'load_billing' => __( 'Load the customer\'s billing information? This will remove any currently entered billing information.', 'woocommerce' ), 'load_shipping' => __( 'Load the customer\'s shipping information? This will remove any currently entered shipping information.', 'woocommerce' ), 'featured_label' => __( 'Featured', 'woocommerce' ), - 'prices_include_tax' => esc_attr( get_option('woocommerce_prices_include_tax') ), + 'prices_include_tax' => esc_attr( get_option( 'woocommerce_prices_include_tax' ) ), 'round_at_subtotal' => esc_attr( get_option( 'woocommerce_tax_round_at_subtotal' ) ), 'no_customer_selected' => __( 'No customer selected', 'woocommerce' ), 'plugin_url' => WC()->plugin_url(), - 'ajax_url' => admin_url('admin-ajax.php'), + 'ajax_url' => admin_url( 'admin-ajax.php' ), 'order_item_nonce' => wp_create_nonce("order-item"), 'add_attribute_nonce' => wp_create_nonce("add-attribute"), 'save_attributes_nonce' => wp_create_nonce("save-attributes"), @@ -259,7 +259,7 @@ class WC_Admin_Assets { // Term ordering - only when sorting by term_order if ( ( strstr( $screen->id, 'edit-pa_' ) || ( ! empty( $_GET['taxonomy'] ) && in_array( $_GET['taxonomy'], apply_filters( 'woocommerce_sortable_taxonomies', array( 'product_cat' ) ) ) ) ) && ! isset( $_GET['orderby'] ) ) { - wp_register_script( 'woocommerce_term_ordering', WC()->plugin_url() . '/assets/js/admin/term-ordering.js', array('jquery-ui-sortable'), WC_VERSION ); + wp_register_script( 'woocommerce_term_ordering', WC()->plugin_url() . '/assets/js/admin/term-ordering.js', array( 'jquery-ui-sortable' ), WC_VERSION ); wp_enqueue_script( 'woocommerce_term_ordering' ); $taxonomy = isset( $_GET['taxonomy'] ) ? wc_clean( $_GET['taxonomy'] ) : ''; @@ -272,9 +272,9 @@ class WC_Admin_Assets { } // Product sorting - only when sorting by menu order on the products page - if ( current_user_can('edit_others_pages') && $screen->id == 'edit-product' && isset( $wp_query->query['orderby'] ) && $wp_query->query['orderby'] == 'menu_order title' ) { + if ( current_user_can( 'edit_others_pages' ) && $screen->id == 'edit-product' && isset( $wp_query->query['orderby'] ) && $wp_query->query['orderby'] == 'menu_order title' ) { - wp_enqueue_script( 'woocommerce_product_ordering', WC()->plugin_url() . '/assets/js/admin/product-ordering.js', array('jquery-ui-sortable'), WC_VERSION, true ); + wp_enqueue_script( 'woocommerce_product_ordering', WC()->plugin_url() . '/assets/js/admin/product-ordering.js', array( 'jquery-ui-sortable' ), WC_VERSION, true ); } @@ -282,7 +282,7 @@ class WC_Admin_Assets { if ( in_array( $screen->id, apply_filters( 'woocommerce_reports_screen_ids', array( $wc_screen_id . '_page_wc-reports', 'dashboard' ) ) ) ) { wp_enqueue_script( 'wc-reports', WC()->plugin_url() . '/assets/js/admin/reports' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker' ), WC_VERSION ); wp_enqueue_script( 'flot', WC()->plugin_url() . '/assets/js/admin/jquery.flot' . $suffix . '.js', array( 'jquery' ), WC_VERSION ); - wp_enqueue_script( 'flot-resize', WC()->plugin_url() . '/assets/js/admin/jquery.flot.resize' . $suffix . '.js', array('jquery', 'flot'), WC_VERSION ); + wp_enqueue_script( 'flot-resize', WC()->plugin_url() . '/assets/js/admin/jquery.flot.resize' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); wp_enqueue_script( 'flot-time', WC()->plugin_url() . '/assets/js/admin/jquery.flot.time' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); wp_enqueue_script( 'flot-pie', WC()->plugin_url() . '/assets/js/admin/jquery.flot.pie' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); wp_enqueue_script( 'flot-stack', WC()->plugin_url() . '/assets/js/admin/jquery.flot.stack' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION ); From c25b86e0ae7192506b56d8e535e5c75779bd9cdb Mon Sep 17 00:00:00 2001 From: Nicola Mustone Date: Fri, 28 Nov 2014 09:06:15 +0100 Subject: [PATCH 314/743] Edit link for WC Pages --- .../views/html-admin-page-status-report.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/includes/admin/views/html-admin-page-status-report.php b/includes/admin/views/html-admin-page-status-report.php index fc7ea2385e6..ad5ef75bae8 100644 --- a/includes/admin/views/html-admin-page-status-report.php +++ b/includes/admin/views/html-admin-page-status-report.php @@ -439,14 +439,18 @@ If enabled on your server, Suhosin may need to be configured to increase its dat $alt = 1; foreach ( $check_pages as $page_name => $values ) { - - echo '
    '; - echo ''; + echo '
    attribute_label ); ?> + + attribute_label ); ?> -
    |
    +
    |
    attribute_name ); ?> attribute_type ) ); ?>
    ' . esc_html( $page_name ) . ':[?]'; - - $error = false; - + $error = false; $page_id = get_option( $values['option'] ); + if ( $page_id ) { + $page_name = '' . esc_html( $page_name ) . ''; + } else { + $page_name = esc_html( $page_name ); + } + + echo '
    ' . $page_name . ':[?]'; + // Page ID check if ( ! $page_id ) { echo '' . __( 'Page not set', 'woocommerce' ) . ''; From 80ea5420c33bb2765245c34dbf920a6e13696f0f Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Fri, 28 Nov 2014 10:22:22 -0200 Subject: [PATCH 315/743] [API] Fixed the action parameters in the methods to create and edit orders, closes #6845 --- includes/api/class-wc-api-orders.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/api/class-wc-api-orders.php b/includes/api/class-wc-api-orders.php index f4660eaeec3..3bf0f7bd270 100644 --- a/includes/api/class-wc-api-orders.php +++ b/includes/api/class-wc-api-orders.php @@ -441,7 +441,7 @@ class WC_API_Orders extends WC_API_Resource { wc_delete_shop_order_transients( $order->id ); - do_action( 'woocommerce_api_create_order', $order->id, $this ); + do_action( 'woocommerce_api_create_order', $order->id, $data ); return $this->get_order( $order->id ); @@ -593,7 +593,7 @@ class WC_API_Orders extends WC_API_Resource { wc_delete_shop_order_transients( $order->id ); - do_action( 'woocommerce_api_edit_order', $order->id, $this ); + do_action( 'woocommerce_api_edit_order', $order->id, $data ); return $this->get_order( $id ); From 21b7fe60f637412b5582194c0d94979f8fc0ca81 Mon Sep 17 00:00:00 2001 From: Barry Kooij Date: Sat, 29 Nov 2014 12:33:36 +0100 Subject: [PATCH 316/743] Codestandards --- includes/class-wc-cart.php | 1 + includes/class-wc-tax.php | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index d3591ae85dc..235bfe5b7c6 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -1145,6 +1145,7 @@ class WC_Cart { // Base tax for line before discount - we will store this in the order data $taxes = $this->tax->calc_tax( $line_price, $item_tax_rates ); $line_subtotal_tax = array_sum( $taxes ); + $line_subtotal = $line_price; } diff --git a/includes/class-wc-tax.php b/includes/class-wc-tax.php index 66bccdf434f..3695863d595 100644 --- a/includes/class-wc-tax.php +++ b/includes/class-wc-tax.php @@ -35,10 +35,11 @@ class WC_Tax { // Work in pence to X precision $price = self::precision( $price ); - if ( $price_includes_tax ) + if ( $price_includes_tax ) { $taxes = self::calc_inclusive_tax( $price, $rates ); - else + } else { $taxes = self::calc_exclusive_tax( $price, $rates ); + } // Round to precision if ( ! self::$round_at_subtotal && ! $suppress_rounding ) { @@ -152,8 +153,9 @@ class WC_Tax { // Multiple taxes foreach ( $rates as $key => $rate ) { - if ( $rate['compound'] == 'yes' ) + if ( $rate['compound'] == 'yes' ) { continue; + } $tax_amount = $price * ( $rate['rate'] / 100 ); From 23b38f9490c295a614827dcce541f0f7b15be686 Mon Sep 17 00:00:00 2001 From: Barry Kooij Date: Sat, 29 Nov 2014 12:35:36 +0100 Subject: [PATCH 317/743] Typos --- includes/class-wc-cart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index 68f57d4cdf1..8e7e6a9ba90 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -1202,7 +1202,7 @@ class WC_Cart { // Now we have a new item price (excluding TAX) $line_subtotal = round( $line_price - array_sum( $taxes ), WC_ROUNDING_PRECISION ); - // Now add modifed taxes + // Now add modified taxes $taxes = $this->tax->calc_tax( $line_subtotal, $item_tax_rates ); $line_subtotal_tax = array_sum( $taxes ); From 551159510cd4247cc0d4440c6df6d10a80b8b012 Mon Sep 17 00:00:00 2001 From: Tamara Zuk Date: Sat, 29 Nov 2014 23:59:58 -0500 Subject: [PATCH 318/743] Autosuggest product tags on bulk edit This tiny change helps users quickly add tags to products using bulk edit. --- assets/js/admin/quick-edit.js | 4 ++++ assets/js/admin/quick-edit.min.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/js/admin/quick-edit.js b/assets/js/admin/quick-edit.js index d52c9d96b95..9f340c818e6 100644 --- a/assets/js/admin/quick-edit.js +++ b/assets/js/admin/quick-edit.js @@ -102,6 +102,10 @@ jQuery(function( $ ) { $( 'input.text', '.inline-edit-row' ).val( '' ); $( '#woocommerce-fields select' ).prop( 'selectedIndex', 0 ); $( '#woocommerce-fields-bulk .inline-edit-group .change-input' ).hide(); + + // Autosuggest product tags on bulk edit + var tax = 'product_tag'; + $( 'tr.inline-editor textarea[name="tax_input[' + tax + ']"]' ).suggest( ajaxurl + '?action=ajax-tag-search&tax=' + tax, { delay: 500, minchars: 2, multiple: true, multipleSep: inlineEditL10n.comma } ); }); $( '#wpbody' ).on( 'change', '#woocommerce-fields-bulk .inline-edit-group .change_to', function() { diff --git a/assets/js/admin/quick-edit.min.js b/assets/js/admin/quick-edit.min.js index e44684b3be4..574dc868c3b 100644 --- a/assets/js/admin/quick-edit.min.js +++ b/assets/js/admin/quick-edit.min.js @@ -1 +1 @@ -jQuery(function(a){a("#the-list").on("click",".editinline",function(){inlineEditPost.revert();var b=a(this).closest("tr").attr("id");b=b.replace("post-","");var c=a("#woocommerce_inline_"+b),d=c.find(".sku").text(),e=c.find(".regular_price").text(),f=c.find(".sale_price ").text(),g=c.find(".weight").text(),h=c.find(".length").text(),i=c.find(".width").text(),j=c.find(".height").text(),k=c.find(".shipping_class").text(),l=c.find(".visibility").text(),m=c.find(".stock_status").text(),n=c.find(".stock").text(),o=c.find(".featured").text(),p=c.find(".manage_stock").text(),q=c.find(".menu_order").text(),r=c.find(".tax_status").text(),s=c.find(".tax_class").text(),t=c.find(".backorders").text();a('input[name="_sku"]',".inline-edit-row").val(d),a('input[name="_regular_price"]',".inline-edit-row").val(e),a('input[name="_sale_price"]',".inline-edit-row").val(f),a('input[name="_weight"]',".inline-edit-row").val(g),a('input[name="_length"]',".inline-edit-row").val(h),a('input[name="_width"]',".inline-edit-row").val(i),a('input[name="_height"]',".inline-edit-row").val(j),a('select[name="_shipping_class"] option:selected',".inline-edit-row").attr("selected",!1).change(),a('select[name="_shipping_class"] option[value="'+k+'"]').attr("selected","selected").change(),a('input[name="_stock"]',".inline-edit-row").val(n),a('input[name="menu_order"]',".inline-edit-row").val(q),a('select[name="_tax_status"] option[value="'+r+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_tax_class"] option[value="'+s+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option').removeAttr("selected"),a('select[name="_visibility"] option[value="'+l+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_stock_status"] option[value="'+m+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_backorders"] option[value="'+t+'"]',".inline-edit-row").attr("selected","selected"),"yes"===o?a('input[name="_featured"]',".inline-edit-row").attr("checked","checked"):a('input[name="_featured"]',".inline-edit-row").removeAttr("checked"),"yes"===p?(a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"),a('input[name="_manage_stock"]',".inline-edit-row").attr("checked","checked")):(a(".stock_qty_field",".inline-edit-row").hide(),a('input[name="_manage_stock"]',".inline-edit-row").removeAttr("checked"));var u=c.find(".product_type").text(),v=c.find(".product_is_virtual").text();"simple"===u||"external"===u?a(".price_fields",".inline-edit-row").show().removeAttr("style"):a(".price_fields",".inline-edit-row").hide(),"yes"===v?a(".dimension_fields",".inline-edit-row").hide():a(".dimension_fields",".inline-edit-row").show().removeAttr("style"),"grouped"===u?a(".stock_fields",".inline-edit-row").hide():a(".stock_fields",".inline-edit-row").show().removeAttr("style")}),a("#the-list").on("change",'.inline-edit-row input[name="_manage_stock"]',function(){a(this).is(":checked")?a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"):a(".stock_qty_field",".inline-edit-row").hide()}),a("#wpbody").on("click","#doaction, #doaction2",function(){a("input.text",".inline-edit-row").val(""),a("#woocommerce-fields select").prop("selectedIndex",0),a("#woocommerce-fields-bulk .inline-edit-group .change-input").hide()}),a("#wpbody").on("change","#woocommerce-fields-bulk .inline-edit-group .change_to",function(){0 Date: Sun, 30 Nov 2014 00:14:22 -0500 Subject: [PATCH 319/743] Execute `woocommerce_order_action_{$action}` only once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevents a “Maximum function nesting level reached” fatal error in certain cases. Since this ends up running on `’save_post’`, updating something like the order status while hooked onto to `woocommerce_order_action_{$action}` causes a fun recursion :) --- .../admin/meta-boxes/class-wc-meta-box-order-actions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php b/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php index cc7f07589f5..0b585c1e2df 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php @@ -128,8 +128,9 @@ class WC_Meta_Box_Order_Actions { } else { - do_action( 'woocommerce_order_action_' . sanitize_title( $action ), $order ); - + if ( ! did_action( 'woocommerce_order_action_' . sanitize_title( $action ) ) ) { + do_action( 'woocommerce_order_action_' . sanitize_title( $action ), $order ); + } } } } From af442599b1acf946232dbcca28b9ce4b0a8b280f Mon Sep 17 00:00:00 2001 From: Tamara Zuk Date: Sun, 30 Nov 2014 01:52:32 -0500 Subject: [PATCH 320/743] Code Standards: Finish up admin includes * fixed indentation - swapped spaces for tabs at start of line, swapped tabs for spaces min-line for alignment * removed instances of `@return void` and `@access public` @see http://make.wordpress.org/core/handbook/coding-standards/php/ @see part 1: #6157 --- includes/admin/class-wc-admin-addons.php | 12 +- includes/admin/class-wc-admin-assets.php | 17 +- includes/admin/class-wc-admin-attributes.php | 2 + includes/admin/class-wc-admin-dashboard.php | 6 +- .../class-wc-admin-duplicate-product.php | 140 +++++++------- includes/admin/class-wc-admin-help.php | 29 +-- includes/admin/class-wc-admin-importers.php | 67 ++++--- includes/admin/class-wc-admin-menus.php | 78 ++++---- includes/admin/class-wc-admin-meta-boxes.php | 18 +- includes/admin/class-wc-admin-notices.php | 6 +- .../class-wc-admin-permalink-settings.php | 58 +++--- includes/admin/class-wc-admin-post-types.php | 179 +++++++++--------- includes/admin/class-wc-admin-profile.php | 67 ++++--- includes/admin/class-wc-admin-reports.php | 10 +- includes/admin/class-wc-admin-settings.php | 10 +- includes/admin/class-wc-admin-status.php | 48 +++-- includes/admin/class-wc-admin-taxonomies.php | 59 +++--- includes/admin/class-wc-admin-welcome.php | 7 +- includes/admin/class-wc-admin.php | 11 +- .../reports/class-wc-report-low-in-stock.php | 2 - .../reports/class-wc-report-most-stocked.php | 2 - .../reports/class-wc-report-out-of-stock.php | 2 - .../class-wc-report-sales-by-category.php | 1 - .../admin/reports/class-wc-report-stock.php | 2 - .../views/html-admin-page-status-tools.php | 40 ++-- includes/admin/views/html-admin-settings.php | 16 +- .../admin/views/html-quick-edit-product.php | 2 +- includes/admin/wc-admin-functions.php | 11 +- includes/admin/wc-meta-box-functions.php | 47 ++--- 29 files changed, 483 insertions(+), 466 deletions(-) diff --git a/includes/admin/class-wc-admin-addons.php b/includes/admin/class-wc-admin-addons.php index a0b13209750..1eb6390cabe 100644 --- a/includes/admin/class-wc-admin-addons.php +++ b/includes/admin/class-wc-admin-addons.php @@ -2,9 +2,9 @@ /** * Addons Page * - * @author WooThemes - * @category Admin - * @package WooCommerce/Admin + * @author WooThemes + * @category Admin + * @package WooCommerce/Admin * @version 2.1.0 */ @@ -23,11 +23,15 @@ class WC_Admin_Addons { public static function output() { if ( false === ( $addons = get_transient( 'woocommerce_addons_data' ) ) ) { + $addons_json = wp_remote_get( 'http://d3t0oesq8995hv.cloudfront.net/woocommerce-addons.json', array( 'user-agent' => 'WooCommerce Addons Page' ) ); + if ( ! is_wp_error( $addons_json ) ) { + $addons = json_decode( wp_remote_retrieve_body( $addons_json ) ); + if ( $addons ) { - set_transient( 'woocommerce_addons_data', $addons, 60*60*24*7 ); // 1 Week + set_transient( 'woocommerce_addons_data', $addons, WEEK_IN_SECONDS ); } } } diff --git a/includes/admin/class-wc-admin-assets.php b/includes/admin/class-wc-admin-assets.php index 4543df1484a..fd4b544239a 100644 --- a/includes/admin/class-wc-admin-assets.php +++ b/includes/admin/class-wc-admin-assets.php @@ -2,9 +2,9 @@ /** * Load assets. * - * @author WooThemes - * @category Admin - * @package WooCommerce/Admin + * @author WooThemes + * @category Admin + * @package WooCommerce/Admin * @version 2.1.0 */ @@ -25,7 +25,7 @@ class WC_Admin_Assets { public function __construct() { add_action( 'admin_enqueue_scripts', array( $this, 'admin_styles' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) ); - add_action( 'admin_head', array( $this, 'product_taxonomy_styles' ) ); + add_action( 'admin_head', array( $this, 'product_taxonomy_styles' ) ); } /** @@ -134,7 +134,7 @@ class WC_Admin_Assets { if ( $screen->id == 'profile' && $current_user->woocommerce_api_consumer_key ) { wp_enqueue_script( 'qrcode' ); - $params['qrcode_key'] = $current_user->woocommerce_api_consumer_key . '|' . $current_user->woocommerce_api_consumer_secret; + $params['qrcode_key'] = $current_user->woocommerce_api_consumer_key . '|' . $current_user->woocommerce_api_consumer_secret; } @@ -265,8 +265,8 @@ class WC_Admin_Assets { $taxonomy = isset( $_GET['taxonomy'] ) ? wc_clean( $_GET['taxonomy'] ) : ''; $woocommerce_term_order_params = array( - 'taxonomy' => $taxonomy - ); + 'taxonomy' => $taxonomy + ); wp_localize_script( 'woocommerce_term_ordering', 'woocommerce_term_ordering_params', $woocommerce_term_order_params ); } @@ -303,9 +303,6 @@ class WC_Admin_Assets { * Admin Head * * Outputs some styles in the admin to show icons on the woocommerce admin pages - * - * @access public - * @return void */ public function product_taxonomy_styles() { diff --git a/includes/admin/class-wc-admin-attributes.php b/includes/admin/class-wc-admin-attributes.php index 2bd62ba4b08..bcfeec403bd 100644 --- a/includes/admin/class-wc-admin-attributes.php +++ b/includes/admin/class-wc-admin-attributes.php @@ -90,6 +90,7 @@ class WC_Admin_Attributes { if ( 'add' === $action && $taxonomy_exists ) { $error = sprintf( __( 'Slug “%s” is already in use. Change it, please.', 'woocommerce' ), sanitize_title( $attribute_name ) ); } + if ( 'edit' === $action ) { $old_attribute_name = $wpdb->get_var( "SELECT attribute_name FROM {$wpdb->prefix}woocommerce_attribute_taxonomies WHERE attribute_id = $attribute_id" ); if ( $old_attribute_name != $attribute_name && wc_sanitize_taxonomy_name( $old_attribute_name ) != $attribute_name && $taxonomy_exists ) { @@ -178,6 +179,7 @@ class WC_Admin_Attributes { // Delete an attribute if ( 'delete' === $action ) { + // Security check $attribute_id = absint( $_GET['delete'] ); check_admin_referer( 'woocommerce-delete-attribute_' . $attribute_id ); diff --git a/includes/admin/class-wc-admin-dashboard.php b/includes/admin/class-wc-admin-dashboard.php index 8cf1763a909..ca921f64600 100644 --- a/includes/admin/class-wc-admin-dashboard.php +++ b/includes/admin/class-wc-admin-dashboard.php @@ -2,9 +2,9 @@ /** * Admin Dashboard * - * @author WooThemes - * @category Admin - * @package WooCommerce/Admin + * @author WooThemes + * @category Admin + * @package WooCommerce/Admin * @version 2.1.0 */ diff --git a/includes/admin/class-wc-admin-duplicate-product.php b/includes/admin/class-wc-admin-duplicate-product.php index a880ccc09f2..910c88bf6cd 100644 --- a/includes/admin/class-wc-admin-duplicate-product.php +++ b/includes/admin/class-wc-admin-duplicate-product.php @@ -2,9 +2,9 @@ /** * Duplicate product functionality * - * @author WooThemes - * @category Admin - * @package WooCommerce/Admin + * @author WooThemes + * @category Admin + * @package WooCommerce/Admin * @version 2.1.0 */ @@ -36,11 +36,13 @@ class WC_Admin_Duplicate_Product { * @return array */ public function dupe_link( $actions, $post ) { - if ( ! current_user_can( apply_filters( 'woocommerce_duplicate_product_capability', 'manage_woocommerce' ) ) ) + if ( ! current_user_can( apply_filters( 'woocommerce_duplicate_product_capability', 'manage_woocommerce' ) ) ) { return $actions; + } - if ( $post->post_type != 'product' ) + if ( $post->post_type != 'product' ) { return $actions; + } $actions['duplicate'] = '' . __( 'Duplicate', 'woocommerce' ) . ''; @@ -54,14 +56,17 @@ class WC_Admin_Duplicate_Product { public function dupe_button() { global $post; - if ( ! current_user_can( apply_filters( 'woocommerce_duplicate_product_capability', 'manage_woocommerce' ) ) ) + if ( ! current_user_can( apply_filters( 'woocommerce_duplicate_product_capability', 'manage_woocommerce' ) ) ) { return; + } - if ( ! is_object( $post ) ) + if ( ! is_object( $post ) ) { return; + } - if ( $post->post_type != 'product' ) + if ( $post->post_type != 'product' ) { return; + } if ( isset( $_GET['post'] ) ) { $notifyUrl = wp_nonce_url( admin_url( "edit.php?post_type=product&action=duplicate_product&post=" . absint( $_GET['post'] ) ), 'woocommerce-duplicate-product_' . $_GET['post'] ); @@ -75,8 +80,9 @@ class WC_Admin_Duplicate_Product { * Duplicate a product action. */ public function duplicate_product_action() { + if ( empty( $_REQUEST['post'] ) ) { - wp_die(__( 'No product to duplicate has been supplied!', 'woocommerce' )); + wp_die( __( 'No product to duplicate has been supplied!', 'woocommerce' ) ); } // Get the original page @@ -98,14 +104,13 @@ class WC_Admin_Duplicate_Product { wp_redirect( admin_url( 'post.php?action=edit&post=' . $new_id ) ); exit; } else { - wp_die(__( 'Product creation failed, could not find original product:', 'woocommerce' ) . ' ' . $id ); + wp_die( __( 'Product creation failed, could not find original product:', 'woocommerce' ) . ' ' . $id ); } } /** * Function to create the duplicate of the product. * - * @access public * @param mixed $post * @param int $parent (default: 0) * @param string $post_status (default: '') @@ -114,51 +119,51 @@ class WC_Admin_Duplicate_Product { public function duplicate_product( $post, $parent = 0, $post_status = '' ) { global $wpdb; - $new_post_author = wp_get_current_user(); - $new_post_date = current_time('mysql'); - $new_post_date_gmt = get_gmt_from_date($new_post_date); + $new_post_author = wp_get_current_user(); + $new_post_date = current_time( 'mysql' ); + $new_post_date_gmt = get_gmt_from_date( $new_post_date ); if ( $parent > 0 ) { - $post_parent = $parent; - $post_status = $post_status ? $post_status : 'publish'; - $suffix = ''; + $post_parent = $parent; + $post_status = $post_status ? $post_status : 'publish'; + $suffix = ''; } else { - $post_parent = $post->post_parent; - $post_status = $post_status ? $post_status : 'draft'; - $suffix = ' ' . __( '(Copy)', 'woocommerce' ); + $post_parent = $post->post_parent; + $post_status = $post_status ? $post_status : 'draft'; + $suffix = ' ' . __( '(Copy)', 'woocommerce' ); } - $new_post_type = $post->post_type; - $post_content = str_replace("'", "''", $post->post_content); - $post_content_filtered = str_replace("'", "''", $post->post_content_filtered); - $post_excerpt = str_replace("'", "''", $post->post_excerpt); - $post_title = str_replace("'", "''", $post->post_title).$suffix; - $comment_status = str_replace("'", "''", $post->comment_status); - $ping_status = str_replace("'", "''", $post->ping_status); + $new_post_type = $post->post_type; + $post_content = str_replace( "'", "''", $post->post_content ); + $post_content_filtered = str_replace( "'", "''", $post->post_content_filtered ); + $post_excerpt = str_replace( "'", "''", $post->post_excerpt ); + $post_title = str_replace( "'", "''", $post->post_title ) . $suffix; + $comment_status = str_replace( "'", "''", $post->comment_status ); + $ping_status = str_replace( "'", "''", $post->ping_status ); // Insert the new template in the post table $wpdb->insert( $wpdb->posts, array( - 'post_author' => $new_post_author->ID, - 'post_date' => $new_post_date, - 'post_date_gmt' => $new_post_date_gmt, - 'post_content' => $post_content, - 'post_content_filtered' => $post_content_filtered, - 'post_title' => $post_title, - 'post_excerpt' => $post_excerpt, - 'post_status' => $post_status, - 'post_type' => $new_post_type, - 'comment_status' => $comment_status, - 'ping_status' => $ping_status, - 'post_password' => $post->post_password, - 'to_ping' => $post->to_ping, - 'pinged' => $post->pinged, - 'post_modified' => $new_post_date, - 'post_modified_gmt' => $new_post_date_gmt, - 'post_parent' => $post_parent, - 'menu_order' => $post->menu_order, - 'post_mime_type' => $post->post_mime_type + 'post_author' => $new_post_author->ID, + 'post_date' => $new_post_date, + 'post_date_gmt' => $new_post_date_gmt, + 'post_content' => $post_content, + 'post_content_filtered' => $post_content_filtered, + 'post_title' => $post_title, + 'post_excerpt' => $post_excerpt, + 'post_status' => $post_status, + 'post_type' => $new_post_type, + 'comment_status' => $comment_status, + 'ping_status' => $ping_status, + 'post_password' => $post->post_password, + 'to_ping' => $post->to_ping, + 'pinged' => $post->pinged, + 'post_modified' => $new_post_date, + 'post_modified_gmt' => $new_post_date_gmt, + 'post_parent' => $post_parent, + 'menu_order' => $post->menu_order, + 'post_mime_type' => $post->post_mime_type ) ); @@ -173,9 +178,12 @@ class WC_Admin_Duplicate_Product { // Copy the children (variations) if ( $children_products = get_children( 'post_parent='.$post->ID.'&post_type=product_variation' ) ) { - if ( $children_products ) - foreach ( $children_products as $child ) + if ( $children_products ) { + + foreach ( $children_products as $child ) { $this->duplicate_product( $this->get_product_to_duplicate( $child->ID ), $new_post_id, $child->post_status ); + } + } } return $new_post_id; @@ -183,8 +191,7 @@ class WC_Admin_Duplicate_Product { /** * Get a product from the database to duplicate - - * @access public + * * @param mixed $id * @return WP_Post|bool * @todo Returning false? Need to check for it in... @@ -195,8 +202,9 @@ class WC_Admin_Duplicate_Product { $id = absint( $id ); - if ( ! $id ) + if ( ! $id ) { return false; + } $post = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE ID=$id" ); @@ -204,25 +212,28 @@ class WC_Admin_Duplicate_Product { $id = $post->post_parent; $post = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE ID=$id" ); } + return $post[0]; } /** * Copy the taxonomies of a post to another post * - * @access public * @param mixed $id * @param mixed $new_id * @param mixed $post_type - * @return void */ private function duplicate_post_taxonomies( $id, $new_id, $post_type ) { - $taxonomies = get_object_taxonomies($post_type); //array("category", "post_tag"); - foreach ($taxonomies as $taxonomy) { - $post_terms = wp_get_object_terms($id, $taxonomy); + + $taxonomies = get_object_taxonomies( $post_type ); //array("category", "post_tag"); + + foreach ( $taxonomies as $taxonomy ) { + + $post_terms = wp_get_object_terms( $id, $taxonomy ); $post_terms_count = sizeof( $post_terms ); - for ($i=0; $i<$post_terms_count; $i++) { - wp_set_object_terms($new_id, $post_terms[$i]->slug, $taxonomy, true); + + for ( $i=0; $i<$post_terms_count; $i++ ) { + wp_set_object_terms( $new_id, $post_terms[$i]->slug, $taxonomy, true ); } } } @@ -230,23 +241,24 @@ class WC_Admin_Duplicate_Product { /** * Copy the meta information of a post to another post * - * @access public * @param mixed $id * @param mixed $new_id - * @return void */ private function duplicate_post_meta( $id, $new_id ) { global $wpdb; - $post_meta_infos = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$id"); + $post_meta_infos = $wpdb->get_results( "SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$id" ); + + if ( count( $post_meta_infos ) != 0 ) { - if (count($post_meta_infos)!=0) { $sql_query_sel = array(); $sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) "; - foreach ($post_meta_infos as $meta_info) { + + foreach ( $post_meta_infos as $meta_info ) { $meta_key = $meta_info->meta_key; - $meta_value = addslashes($meta_info->meta_value); + $meta_value = addslashes( $meta_info->meta_value ); $sql_query_sel[]= "SELECT $new_id, '$meta_key', '$meta_value'"; } + $sql_query.= implode(" UNION ALL ", $sql_query_sel); $wpdb->query($sql_query); } diff --git a/includes/admin/class-wc-admin-help.php b/includes/admin/class-wc-admin-help.php index 417152fa890..f7067d4ae07 100644 --- a/includes/admin/class-wc-admin-help.php +++ b/includes/admin/class-wc-admin-help.php @@ -2,9 +2,9 @@ /** * Add some content to the help tab. * - * @author WooThemes - * @category Admin - * @package WooCommerce/Admin + * @author WooThemes + * @category Admin + * @package WooCommerce/Admin * @version 2.1.0 */ @@ -32,13 +32,14 @@ class WC_Admin_Help { public function add_tabs() { $screen = get_current_screen(); - if ( ! in_array( $screen->id, wc_get_screen_ids() ) ) + if ( ! in_array( $screen->id, wc_get_screen_ids() ) ) { return; + } $screen->add_help_tab( array( - 'id' => 'woocommerce_docs_tab', - 'title' => __( 'Documentation', 'woocommerce' ), - 'content' => + 'id' => 'woocommerce_docs_tab', + 'title' => __( 'Documentation', 'woocommerce' ), + 'content' => '

    ' . __( 'Thank you for using WooCommerce :) Should you need help using or extending WooCommerce please read the documentation.', 'woocommerce' ) . '

    ' . @@ -47,22 +48,22 @@ class WC_Admin_Help { ) ); $screen->add_help_tab( array( - 'id' => 'woocommerce_support_tab', - 'title' => __( 'Support', 'woocommerce' ), - 'content' => + 'id' => 'woocommerce_support_tab', + 'title' => __( 'Support', 'woocommerce' ), + 'content' => '

    ' . sprintf( __( 'After %sreading the documentation%s, for further assistance you can use our %scommunity forum%s if you get stuck. For help with premium add-ons from WooThemes, or if you are a WooThemes customer, you can %suse our helpdesk%s.', 'woocommerce' ), '', '', '', '', '', '' ) . '

    ' . '

    ' . __( 'Before asking for help we recommend checking the status page to identify any problems with your configuration.', 'woocommerce' ) . '

    ' . - '

    ' . __( 'System Status', 'woocommerce' ) . ' ' . __( 'WooThemes Community Support', 'woocommerce' ) . ' ' . __( 'WooThemes Customer Support', 'woocommerce' ) . '

    ' + '

    ' . __( 'System Status', 'woocommerce' ) . ' ' . __( 'WooThemes Community Support', 'woocommerce' ) . ' ' . __( 'WooThemes Customer Support', 'woocommerce' ) . '

    ' ) ); $screen->add_help_tab( array( - 'id' => 'woocommerce_bugs_tab', - 'title' => __( 'Found a bug?', 'woocommerce' ), - 'content' => + 'id' => 'woocommerce_bugs_tab', + 'title' => __( 'Found a bug?', 'woocommerce' ), + 'content' => '

    ' . sprintf( __( 'If you find a bug within WooCommerce core you can create a ticket via Github issues. Ensure you read the contribution guide prior to submitting your report. Be as descriptive as possible and please include your system status report.', 'woocommerce' ), 'https://github.com/woothemes/woocommerce/issues?state=open', 'https://github.com/woothemes/woocommerce/blob/master/CONTRIBUTING.md', admin_url( 'admin.php?page=wc-status' ) ) . '

    ' . diff --git a/includes/admin/class-wc-admin-importers.php b/includes/admin/class-wc-admin-importers.php index e1dc5ca569c..a28cdfbca87 100644 --- a/includes/admin/class-wc-admin-importers.php +++ b/includes/admin/class-wc-admin-importers.php @@ -2,9 +2,9 @@ /** * Setup importers for WC data. * - * @author WooThemes - * @category Admin - * @package WooCommerce/Admin + * @author WooThemes + * @category Admin + * @package WooCommerce/Admin * @version 2.1.0 */ @@ -43,8 +43,10 @@ class WC_Admin_Importers { if ( ! class_exists( 'WP_Importer' ) ) { $class_wp_importer = ABSPATH . 'wp-admin/includes/class-wp-importer.php'; - if ( file_exists( $class_wp_importer ) ) + + if ( file_exists( $class_wp_importer ) ) { require $class_wp_importer; + } } // includes @@ -60,15 +62,13 @@ class WC_Admin_Importers { * * WordPress import should work - however, it fails to import custom product attribute taxonomies. * This code grabs the file before it is imported and ensures the taxonomies are created. - * - * @access public - * @return void */ public function post_importer_compatibility() { global $wpdb; - if ( empty( $_POST['import_id'] ) || ! class_exists( 'WXR_Parser' ) ) + if ( empty( $_POST['import_id'] ) || ! class_exists( 'WXR_Parser' ) ) { return; + } $id = (int) $_POST['import_id']; $file = get_attached_file( $id ); @@ -78,39 +78,44 @@ class WC_Admin_Importers { if ( isset( $import_data['posts'] ) ) { $posts = $import_data['posts']; - if ( $posts && sizeof( $posts ) > 0 ) foreach ( $posts as $post ) { + if ( $posts && sizeof( $posts ) > 0 ) { - if ( $post['post_type'] == 'product' ) { + foreach ( $posts as $post ) { - if ( $post['terms'] && sizeof( $post['terms'] ) > 0 ) { + if ( $post['post_type'] == 'product' ) { - foreach ( $post['terms'] as $term ) { + if ( $post['terms'] && sizeof( $post['terms'] ) > 0 ) { - $domain = $term['domain']; + foreach ( $post['terms'] as $term ) { - if ( strstr( $domain, 'pa_' ) ) { + $domain = $term['domain']; - // Make sure it exists! - if ( ! taxonomy_exists( $domain ) ) { + if ( strstr( $domain, 'pa_' ) ) { - $nicename = strtolower( sanitize_title( str_replace( 'pa_', '', $domain ) ) ); + // Make sure it exists! + if ( ! taxonomy_exists( $domain ) ) { - $exists_in_db = $wpdb->get_var( $wpdb->prepare( "SELECT attribute_id FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies WHERE attribute_name = %s;", $nicename ) ); + $nicename = strtolower( sanitize_title( str_replace( 'pa_', '', $domain ) ) ); - // Create the taxonomy - if ( ! $exists_in_db ) - $wpdb->insert( $wpdb->prefix . "woocommerce_attribute_taxonomies", array( 'attribute_name' => $nicename, 'attribute_type' => 'select', 'attribute_orderby' => 'menu_order' ), array( '%s', '%s', '%s' ) ); + $exists_in_db = $wpdb->get_var( $wpdb->prepare( "SELECT attribute_id FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies WHERE attribute_name = %s;", $nicename ) ); - // Register the taxonomy now so that the import works! - register_taxonomy( $domain, - apply_filters( 'woocommerce_taxonomy_objects_' . $domain, array('product') ), - apply_filters( 'woocommerce_taxonomy_args_' . $domain, array( - 'hierarchical' => true, - 'show_ui' => false, - 'query_var' => true, - 'rewrite' => false, - ) ) - ); + // Create the taxonomy + if ( ! $exists_in_db ) { + $wpdb->insert( $wpdb->prefix . "woocommerce_attribute_taxonomies", array( 'attribute_name' => $nicename, 'attribute_type' => 'select', 'attribute_orderby' => 'menu_order' ), array( '%s', '%s', '%s' ) ); + } + + // Register the taxonomy now so that the import works! + register_taxonomy( + $domain, + apply_filters( 'woocommerce_taxonomy_objects_' . $domain, array( 'product' ) ), + apply_filters( 'woocommerce_taxonomy_args_' . $domain, array( + 'hierarchical' => true, + 'show_ui' => false, + 'query_var' => true, + 'rewrite' => false, + ) ) + ); + } } } } diff --git a/includes/admin/class-wc-admin-menus.php b/includes/admin/class-wc-admin-menus.php index 5dd846a1932..622cb3e90d5 100644 --- a/includes/admin/class-wc-admin-menus.php +++ b/includes/admin/class-wc-admin-menus.php @@ -2,9 +2,9 @@ /** * Setup menus in WP admin. * - * @author WooThemes - * @category Admin - * @package WooCommerce/Admin + * @author WooThemes + * @category Admin + * @package WooCommerce/Admin * @version 2.2.3 */ @@ -99,8 +99,6 @@ class WC_Admin_Menus { /** * Highlights the correct top level admin menu item for post type add screens. - * - * @return void */ public function menu_highlight() { global $menu, $submenu, $parent_file, $submenu_file, $self, $post_type, $taxonomy; @@ -241,41 +239,41 @@ class WC_Admin_Menus { $exclude = array( 'view-order', 'add-payment-method', 'order-pay', 'order-received' ); ?>
    -
    -
      - query->query_vars as $key => $value ) { - if ( in_array( $key, $exclude ) ) { - continue; - } - ?> -
    • - - - - - -
    • - -
    -
    -

    - - - - - - - -

    -
    - +
      + query->query_vars as $key => $value ) { + if ( in_array( $key, $exclude ) ) { + continue; + } + ?> +
    • + + + + + +
    • + +
    + +

    + + + + + + + +

    + + '; + foreach ( $errors as $error ) { echo '

    ' . esc_html( $error ) . '

    '; } + echo ''; // Clear diff --git a/includes/admin/class-wc-admin-notices.php b/includes/admin/class-wc-admin-notices.php index a1f78474d31..ee1b3cd08bc 100644 --- a/includes/admin/class-wc-admin-notices.php +++ b/includes/admin/class-wc-admin-notices.php @@ -2,9 +2,9 @@ /** * Display notices in admin. * - * @author WooThemes - * @category Admin - * @package WooCommerce/Admin + * @author WooThemes + * @category Admin + * @package WooCommerce/Admin * @version 2.1.0 */ diff --git a/includes/admin/class-wc-admin-permalink-settings.php b/includes/admin/class-wc-admin-permalink-settings.php index 4dcafe38876..2e32b722b7f 100644 --- a/includes/admin/class-wc-admin-permalink-settings.php +++ b/includes/admin/class-wc-admin-permalink-settings.php @@ -2,9 +2,9 @@ /** * Adds settings to the permalinks admin settings page. * - * @author WooThemes - * @category Admin - * @package WooCommerce/Admin + * @author WooThemes + * @category Admin + * @package WooCommerce/Admin * @version 2.1.0 */ @@ -36,25 +36,25 @@ class WC_Admin_Permalink_Settings { // Add our settings add_settings_field( - 'woocommerce_product_category_slug', // id - __( 'Product category base', 'woocommerce' ), // setting title + 'woocommerce_product_category_slug', // id + __( 'Product category base', 'woocommerce' ), // setting title array( $this, 'product_category_slug_input' ), // display callback - 'permalink', // settings page - 'optional' // settings section + 'permalink', // settings page + 'optional' // settings section ); add_settings_field( - 'woocommerce_product_tag_slug', // id - __( 'Product tag base', 'woocommerce' ), // setting title - array( $this, 'product_tag_slug_input' ), // display callback - 'permalink', // settings page - 'optional' // settings section + 'woocommerce_product_tag_slug', // id + __( 'Product tag base', 'woocommerce' ), // setting title + array( $this, 'product_tag_slug_input' ), // display callback + 'permalink', // settings page + 'optional' // settings section ); add_settings_field( - 'woocommerce_product_attribute_slug', // id - __( 'Product attribute base', 'woocommerce' ), // setting title - array( $this, 'product_attribute_slug_input' ), // display callback - 'permalink', // settings page - 'optional' // settings section + 'woocommerce_product_attribute_slug', // id + __( 'Product attribute base', 'woocommerce' ), // setting title + array( $this, 'product_attribute_slug_input' ), // display callback + 'permalink', // settings page + 'optional' // settings section ); } @@ -98,9 +98,9 @@ class WC_Admin_Permalink_Settings { $product_permalink = $permalinks['product_base']; // Get shop page - $shop_page_id = wc_get_page_id( 'shop' ); - $base_slug = urldecode( ( $shop_page_id > 0 && get_post( $shop_page_id ) ) ? get_page_uri( $shop_page_id ) : _x( 'shop', 'default-slug', 'woocommerce' ) ); - $product_base = _x( 'product', 'default-slug', 'woocommerce' ); + $shop_page_id = wc_get_page_id( 'shop' ); + $base_slug = urldecode( ( $shop_page_id > 0 && get_post( $shop_page_id ) ) ? get_page_uri( $shop_page_id ) : _x( 'shop', 'default-slug', 'woocommerce' ) ); + $product_base = _x( 'product', 'default-slug', 'woocommerce' ); $structures = array( 0 => '', @@ -139,15 +139,15 @@ class WC_Admin_Permalink_Settings {
    0 && get_post( $shop_page_id ) ) ? get_page_uri( $shop_page_id ) : _x( 'shop', 'default-slug', 'woocommerce' ); + if ( $shop_page_id && trim( $permalinks['product_base'], '/' ) === $shop_permalink ) { $permalinks['use_verbose_page_rules'] = true; } diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 9a9ae501444..8fb279dee5a 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -2,9 +2,9 @@ /** * Post Types Admin * - * @author WooThemes - * @category Admin - * @package WooCommerce/Admin + * @author WooThemes + * @category Admin + * @package WooCommerce/Admin * @version 2.1.0 */ @@ -96,6 +96,7 @@ class WC_Admin_Post_Types { * @return array */ public function product_columns( $existing_columns ) { + if ( empty( $existing_columns ) && ! is_array( $existing_columns ) ) { $existing_columns = array(); } @@ -367,12 +368,16 @@ class WC_Admin_Post_Types { } if ( current_user_can( $post_type_object->cap->delete_post, $post->ID ) ) { - if ( 'trash' == $post->post_status ) + + if ( 'trash' == $post->post_status ) { $actions['untrash'] = "ID ) ), 'untrash-post_' . $post->ID ) . "'>" . __( 'Restore', 'woocommerce' ) . ""; - elseif ( EMPTY_TRASH_DAYS ) + } elseif ( EMPTY_TRASH_DAYS ) { $actions['trash'] = "" . __( 'Trash', 'woocommerce' ) . ""; - if ( 'trash' == $post->post_status || !EMPTY_TRASH_DAYS ) + } + + if ( 'trash' == $post->post_status || ! EMPTY_TRASH_DAYS ) { $actions['delete'] = "" . __( 'Delete Permanently', 'woocommerce' ) . ""; + } } $actions = apply_filters( 'post_row_actions', $actions, $post ); @@ -380,7 +385,7 @@ class WC_Admin_Post_Types { echo '
    '; $i = 0; - $action_count = sizeof($actions); + $action_count = sizeof( $actions ); foreach ( $actions as $action => $link ) { ++$i; @@ -399,6 +404,7 @@ class WC_Admin_Post_Types { case 'products' : $product_ids = get_post_meta( $post->ID, 'product_ids', true ); $product_ids = $product_ids ? array_map( 'absint', explode( ',', $product_ids ) ) : array(); + if ( sizeof( $product_ids ) > 0 ) { echo esc_html( implode( ', ', $product_ids ) ); } else { @@ -425,7 +431,7 @@ class WC_Admin_Post_Types { } break; case 'expiry_date' : - $expiry_date = get_post_meta($post->ID, 'expiry_date', true); + $expiry_date = get_post_meta( $post->ID, 'expiry_date', true ); if ( $expiry_date ) { echo esc_html( date_i18n( 'F j, Y', strtotime( $expiry_date ) ) ); @@ -507,13 +513,16 @@ class WC_Admin_Post_Types { } else echo '–'; break; case 'shipping_address' : - if ( $the_order->get_formatted_shipping_address() ) - echo ''. esc_html( preg_replace( '##i', ', ', $the_order->get_formatted_shipping_address() ) ) .''; - else - echo '–'; - if ( $the_order->get_shipping_method() ) + if ( $the_order->get_formatted_shipping_address() ) { + echo ''. esc_html( preg_replace( '##i', ', ', $the_order->get_formatted_shipping_address() ) ) .''; + } else { + echo '–'; + } + + if ( $the_order->get_shipping_method() ) { echo '' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $the_order->get_shipping_method() ) . ''; + } break; case 'order_notes' : @@ -524,9 +533,9 @@ class WC_Admin_Post_Types { ( $post->post_status !== 'trash' ) ? $status = '' : $status = 'post-trashed'; $latest_notes = get_comments( array( - 'post_id' => $post->ID, - 'number' => 1, - 'status' => $status + 'post_id' => $post->ID, + 'number' => 1, + 'status' => $status ) ); $latest_note = current( $latest_notes ); @@ -612,24 +621,24 @@ class WC_Admin_Post_Types { if ( $the_order->has_status( array( 'pending', 'on-hold' ) ) ) { $actions['processing'] = array( - 'url' => wp_nonce_url( admin_url( 'admin-ajax.php?action=woocommerce_mark_order_status&status=processing&order_id=' . $post->ID ), 'woocommerce-mark-order-status' ), - 'name' => __( 'Processing', 'woocommerce' ), - 'action' => "processing" + 'url' => wp_nonce_url( admin_url( 'admin-ajax.php?action=woocommerce_mark_order_status&status=processing&order_id=' . $post->ID ), 'woocommerce-mark-order-status' ), + 'name' => __( 'Processing', 'woocommerce' ), + 'action' => "processing" ); } if ( $the_order->has_status( array( 'pending', 'on-hold', 'processing' ) ) ) { $actions['complete'] = array( - 'url' => wp_nonce_url( admin_url( 'admin-ajax.php?action=woocommerce_mark_order_status&status=completed&order_id=' . $post->ID ), 'woocommerce-mark-order-status' ), - 'name' => __( 'Complete', 'woocommerce' ), - 'action' => "complete" + 'url' => wp_nonce_url( admin_url( 'admin-ajax.php?action=woocommerce_mark_order_status&status=completed&order_id=' . $post->ID ), 'woocommerce-mark-order-status' ), + 'name' => __( 'Complete', 'woocommerce' ), + 'action' => "complete" ); } $actions['view'] = array( - 'url' => admin_url( 'post.php?post=' . $post->ID . '&action=edit' ), - 'name' => __( 'View', 'woocommerce' ), - 'action' => "view" + 'url' => admin_url( 'post.php?post=' . $post->ID . '&action=edit' ), + 'name' => __( 'View', 'woocommerce' ), + 'action' => "view" ); $actions = apply_filters( 'woocommerce_admin_order_actions', $actions, $the_order ); @@ -696,9 +705,11 @@ class WC_Admin_Post_Types { * @return array */ public function shop_order_bulk_actions( $actions ) { + if ( isset( $actions['edit'] ) ) { unset( $actions['edit'] ); } + return $actions; } @@ -734,6 +745,7 @@ class WC_Admin_Post_Types { * @param mixed $post_type */ public function bulk_edit( $column_name, $post_type ) { + if ( 'price' != $column_name || 'product' != $post_type ) { return; } @@ -752,6 +764,7 @@ class WC_Admin_Post_Types { * @param mixed $post_type */ public function quick_edit( $column_name, $post_type ) { + if ( 'price' != $column_name || 'product' != $post_type ) { return; } @@ -766,12 +779,12 @@ class WC_Admin_Post_Types { /** * Quick and bulk edit saving * - * @access public * @param int $post_id * @param WP_Post $post * @return int */ public function bulk_and_quick_edit_save_post( $post_id, $post ) { + // If this is an autosave, our form has not been submitted, so we don't want to do anything. if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return $post_id; @@ -820,6 +833,7 @@ class WC_Admin_Post_Types { /** * Quick edit + * * @param integer $post_id */ private function quick_edit_save( $post_id, $product ) { @@ -1179,9 +1193,6 @@ class WC_Admin_Post_Types { * Add extra bulk action options to mark orders as complete or processing * * Using Javascript until WordPress core fixes: http://core.trac.wordpress.org/ticket/16031 - * - * @access public - * @return void */ public function bulk_admin_footer() { global $post_type; @@ -1206,11 +1217,9 @@ class WC_Admin_Post_Types { /** * Process the new bulk actions for changing order status - * - * @access public - * @return void */ public function bulk_action() { + $wp_list_table = _get_list_table( 'WP_Posts_List_Table' ); $action = $wp_list_table->current_action(); @@ -1247,9 +1256,6 @@ class WC_Admin_Post_Types { /** * Show confirmation message that order status changed for number of orders - * - * @access public - * @return void */ public function bulk_admin_notices() { global $post_type, $pagenow; @@ -1273,16 +1279,12 @@ class WC_Admin_Post_Types { break; } } - } /** * Search custom fields as well as content. - * - * @access public * @param WP_Query $wp - * @return void */ public function shop_order_search_custom_fields( $wp ) { global $pagenow, $wpdb; @@ -1357,7 +1359,6 @@ class WC_Admin_Post_Types { /** * Change the label when searching orders. * - * @access public * @param mixed $query * @return string */ @@ -1382,7 +1383,6 @@ class WC_Admin_Post_Types { /** * Query vars for custom searches. * - * @access public * @param mixed $public_query_vars * @return array */ @@ -1530,32 +1530,33 @@ class WC_Admin_Post_Types { '_price', - 'orderby' => 'meta_value_num' + 'meta_key' => '_price', + 'orderby' => 'meta_value_num' ) ); } if ( 'featured' == $vars['orderby'] ) { $vars = array_merge( $vars, array( - 'meta_key' => '_featured', - 'orderby' => 'meta_value' + 'meta_key' => '_featured', + 'orderby' => 'meta_value' ) ); } if ( 'sku' == $vars['orderby'] ) { $vars = array_merge( $vars, array( - 'meta_key' => '_sku', - 'orderby' => 'meta_value' + 'meta_key' => '_sku', + 'orderby' => 'meta_value' ) ); } } @@ -1588,7 +1589,7 @@ class WC_Admin_Post_Types { } elseif ( 'shop_coupon' === $typenow ) { if ( ! empty( $_GET['coupon_type'] ) ) { - $vars['meta_key'] = 'discount_type'; + $vars['meta_key'] = 'discount_type'; $vars['meta_value'] = wc_clean( $_GET['coupon_type'] ); } @@ -1604,8 +1605,8 @@ class WC_Admin_Post_Types { if ( isset( $vars['orderby'] ) ) { if ( 'order_total' == $vars['orderby'] ) { $vars = array_merge( $vars, array( - 'meta_key' => '_order_total', - 'orderby' => 'meta_value_num' + 'meta_key' => '_order_total', + 'orderby' => 'meta_value_num' ) ); } } @@ -1656,6 +1657,7 @@ class WC_Admin_Post_Types { /** * Search by SKU or ID for products. + * * @param string $where * @return string */ @@ -1701,17 +1703,17 @@ class WC_Admin_Post_Types { $messages['product'] = array( 0 => '', // Unused. Messages start at index 1. - 1 => sprintf( __( 'Product updated. View Product', 'woocommerce' ), esc_url( get_permalink($post_ID) ) ), + 1 => sprintf( __( 'Product updated. View Product', 'woocommerce' ), esc_url( get_permalink( $post_ID ) ) ), 2 => __( 'Custom field updated.', 'woocommerce' ), 3 => __( 'Custom field deleted.', 'woocommerce' ), 4 => __( 'Product updated.', 'woocommerce' ), - 5 => isset($_GET['revision']) ? sprintf( __( 'Product restored to revision from %s', 'woocommerce' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, - 6 => sprintf( __( 'Product published. View Product', 'woocommerce' ), esc_url( get_permalink($post_ID) ) ), + 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Product restored to revision from %s', 'woocommerce' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, + 6 => sprintf( __( 'Product published. View Product', 'woocommerce' ), esc_url( get_permalink( $post_ID ) ) ), 7 => __( 'Product saved.', 'woocommerce' ), - 8 => sprintf( __( 'Product submitted. Preview Product', 'woocommerce' ), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ), + 8 => sprintf( __( 'Product submitted. Preview Product', 'woocommerce' ), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post_ID ) ) ) ), 9 => sprintf( __( 'Product scheduled for: %1$s. Preview Product', 'woocommerce' ), - date_i18n( __( 'M j, Y @ G:i', 'woocommerce' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ), - 10 => sprintf( __( 'Product draft updated. Preview Product', 'woocommerce' ), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ), + date_i18n( __( 'M j, Y @ G:i', 'woocommerce' ), strtotime( $post->post_date ) ), esc_url( get_permalink( $post_ID ) ) ), + 10 => sprintf( __( 'Product draft updated. Preview Product', 'woocommerce' ), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post_ID ) ) ) ), ); $messages['shop_order'] = array( @@ -1720,7 +1722,7 @@ class WC_Admin_Post_Types { 2 => __( 'Custom field updated.', 'woocommerce' ), 3 => __( 'Custom field deleted.', 'woocommerce' ), 4 => __( 'Order updated.', 'woocommerce' ), - 5 => isset($_GET['revision']) ? sprintf( __( 'Order restored to revision from %s', 'woocommerce' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, + 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Order restored to revision from %s', 'woocommerce' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, 6 => __( 'Order updated.', 'woocommerce' ), 7 => __( 'Order saved.', 'woocommerce' ), 8 => __( 'Order submitted.', 'woocommerce' ), @@ -1736,7 +1738,7 @@ class WC_Admin_Post_Types { 2 => __( 'Custom field updated.', 'woocommerce' ), 3 => __( 'Custom field deleted.', 'woocommerce' ), 4 => __( 'Coupon updated.', 'woocommerce' ), - 5 => isset($_GET['revision']) ? sprintf( __( 'Coupon restored to revision from %s', 'woocommerce' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, + 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Coupon restored to revision from %s', 'woocommerce' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, 6 => __( 'Coupon updated.', 'woocommerce' ), 7 => __( 'Coupon saved.', 'woocommerce' ), 8 => __( 'Coupon submitted.', 'woocommerce' ), @@ -1750,9 +1752,6 @@ class WC_Admin_Post_Types { /** * Disable the auto-save functionality for Orders. - * - * @access public - * @return void */ public function disable_autosave(){ global $post; @@ -1765,21 +1764,20 @@ class WC_Admin_Post_Types { /** * Removes variations etc belonging to a deleted post, and clears transients * - * @access public * @param mixed $id ID of post being deleted - * @return void */ public function delete_post( $id ) { global $woocommerce, $wpdb; - if ( ! current_user_can( 'delete_posts' ) ) + if ( ! current_user_can( 'delete_posts' ) ) { return; + } if ( $id > 0 ) { $post_type = get_post_type( $id ); - switch( $post_type ) { + switch ( $post_type ) { case 'product' : $child_product_variations = get_children( 'post_parent=' . $id . '&post_type=product_variation' ); @@ -1823,9 +1821,7 @@ class WC_Admin_Post_Types { /** * woocommerce_trash_post function. * - * @access public * @param mixed $id - * @return void */ public function trash_post( $id ) { global $wpdb; @@ -1859,9 +1855,7 @@ class WC_Admin_Post_Types { /** * woocommerce_untrash_post function. * - * @access public * @param mixed $id - * @return void */ public function untrash_post( $id ) { global $wpdb; @@ -1888,16 +1882,12 @@ class WC_Admin_Post_Types { delete_transient( 'woocommerce_processing_order_count' ); } - } } /** * Remove item meta on permanent deletion - * - * @access public - * @return void - **/ + */ public function delete_order_items( $postid ) { global $wpdb; @@ -1917,6 +1907,7 @@ class WC_Admin_Post_Types { /** * Change title boxes in admin. + * * @param string $text * @param object $post * @return string @@ -1936,6 +1927,7 @@ class WC_Admin_Post_Types { /** * Print coupon description textarea field + * * @param WP_Post $post */ public function edit_form_after_title( $post ) { @@ -1948,11 +1940,11 @@ class WC_Admin_Post_Types { /** * Change label for insert buttons. - * @access public + * * @param array $strings * @return array */ - function change_insert_into_post( $strings ) { + public function change_insert_into_post( $strings ) { global $post_type; if ( in_array( $post_type, array( 'product', 'shop_order', 'shop_coupon' ) ) ) { @@ -1967,9 +1959,6 @@ class WC_Admin_Post_Types { /** * Output product visibility options. - * - * @access public - * @return void */ public function product_data_visibility() { global $post; @@ -1979,7 +1968,7 @@ class WC_Admin_Post_Types { } $current_visibility = ( $current_visibility = get_post_meta( $post->ID, '_visibility', true ) ) ? $current_visibility : apply_filters( 'woocommerce_product_visibility_default' , 'visible' ); - $current_featured = ( $current_featured = get_post_meta( $post->ID, '_featured', true ) ) ? $current_featured : 'no'; + $current_featured = ( $current_featured = get_post_meta( $post->ID, '_featured', true ) ) ? $current_featured : 'no'; $visibility_options = apply_filters( 'woocommerce_product_visibility_options', array( 'visible' => __( 'Catalog/search', 'woocommerce' ), @@ -2031,8 +2020,10 @@ class WC_Admin_Post_Types { * @return array */ public function upload_dir( $pathdata ) { + // Change upload dir for downloadable files if ( isset( $_POST['type'] ) && 'downloadable_product' == $_POST['type'] ) { + if ( empty( $pathdata['subdir'] ) ) { $pathdata['path'] = $pathdata['path'] . '/woocommerce_uploads'; $pathdata['url'] = $pathdata['url']. '/woocommerce_uploads'; @@ -2096,7 +2087,9 @@ class WC_Admin_Post_Types { } // Add permissions if ( $new_download_ids ) { + foreach ( $new_download_ids as $download_id ) { + if ( apply_filters( 'woocommerce_process_product_file_download_paths_grant_access_to_new_file', true, $download_id, $product_id, $order ) ) { // grant permission if it doesn't already exist if ( ! $wpdb->get_var( $wpdb->prepare( "SELECT 1 FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions WHERE order_id = %d AND product_id = %d AND download_id = %s", $order->id, $product_id, $download_id ) ) ) { diff --git a/includes/admin/class-wc-admin-profile.php b/includes/admin/class-wc-admin-profile.php index a8ecf0c3a97..e74e2800986 100644 --- a/includes/admin/class-wc-admin-profile.php +++ b/includes/admin/class-wc-admin-profile.php @@ -2,9 +2,9 @@ /** * Add extra profile fields for users in admin. * - * @author WooThemes - * @category Admin - * @package WooCommerce/Admin + * @author WooThemes + * @category Admin + * @package WooCommerce/Admin * @version 2.1.0 */ @@ -47,47 +47,47 @@ class WC_Admin_Profile { 'title' => __( 'Customer Billing Address', 'woocommerce' ), 'fields' => array( 'billing_first_name' => array( - 'label' => __( 'First name', 'woocommerce' ), + 'label' => __( 'First name', 'woocommerce' ), 'description' => '' ), 'billing_last_name' => array( - 'label' => __( 'Last name', 'woocommerce' ), + 'label' => __( 'Last name', 'woocommerce' ), 'description' => '' ), 'billing_company' => array( - 'label' => __( 'Company', 'woocommerce' ), + 'label' => __( 'Company', 'woocommerce' ), 'description' => '' ), 'billing_address_1' => array( - 'label' => __( 'Address 1', 'woocommerce' ), + 'label' => __( 'Address 1', 'woocommerce' ), 'description' => '' ), 'billing_address_2' => array( - 'label' => __( 'Address 2', 'woocommerce' ), + 'label' => __( 'Address 2', 'woocommerce' ), 'description' => '' ), 'billing_city' => array( - 'label' => __( 'City', 'woocommerce' ), + 'label' => __( 'City', 'woocommerce' ), 'description' => '' ), 'billing_postcode' => array( - 'label' => __( 'Postcode', 'woocommerce' ), + 'label' => __( 'Postcode', 'woocommerce' ), 'description' => '' ), 'billing_state' => array( - 'label' => __( 'State/County', 'woocommerce' ), + 'label' => __( 'State/County', 'woocommerce' ), 'description' => __( 'State/County or state code', 'woocommerce' ), ), 'billing_country' => array( - 'label' => __( 'Country', 'woocommerce' ), + 'label' => __( 'Country', 'woocommerce' ), 'description' => __( '2 letter Country code', 'woocommerce' ), ), 'billing_phone' => array( - 'label' => __( 'Telephone', 'woocommerce' ), + 'label' => __( 'Telephone', 'woocommerce' ), 'description' => '' ), 'billing_email' => array( - 'label' => __( 'Email', 'woocommerce' ), + 'label' => __( 'Email', 'woocommerce' ), 'description' => '' ) ) @@ -96,39 +96,39 @@ class WC_Admin_Profile { 'title' => __( 'Customer Shipping Address', 'woocommerce' ), 'fields' => array( 'shipping_first_name' => array( - 'label' => __( 'First name', 'woocommerce' ), + 'label' => __( 'First name', 'woocommerce' ), 'description' => '' ), 'shipping_last_name' => array( - 'label' => __( 'Last name', 'woocommerce' ), + 'label' => __( 'Last name', 'woocommerce' ), 'description' => '' ), 'shipping_company' => array( - 'label' => __( 'Company', 'woocommerce' ), + 'label' => __( 'Company', 'woocommerce' ), 'description' => '' ), 'shipping_address_1' => array( - 'label' => __( 'Address 1', 'woocommerce' ), + 'label' => __( 'Address 1', 'woocommerce' ), 'description' => '' ), 'shipping_address_2' => array( - 'label' => __( 'Address 2', 'woocommerce' ), + 'label' => __( 'Address 2', 'woocommerce' ), 'description' => '' ), 'shipping_city' => array( - 'label' => __( 'City', 'woocommerce' ), + 'label' => __( 'City', 'woocommerce' ), 'description' => '' ), 'shipping_postcode' => array( - 'label' => __( 'Postcode', 'woocommerce' ), + 'label' => __( 'Postcode', 'woocommerce' ), 'description' => '' ), 'shipping_state' => array( - 'label' => __( 'State/County', 'woocommerce' ), + 'label' => __( 'State/County', 'woocommerce' ), 'description' => __( 'State/County or state code', 'woocommerce' ) ), 'shipping_country' => array( - 'label' => __( 'Country', 'woocommerce' ), + 'label' => __( 'Country', 'woocommerce' ), 'description' => __( '2 letter Country code', 'woocommerce' ) ) ) @@ -143,8 +143,9 @@ class WC_Admin_Profile { * @param mixed $user User (object) being displayed */ public function add_customer_meta_fields( $user ) { - if ( ! current_user_can( 'manage_woocommerce' ) ) + if ( ! current_user_can( 'manage_woocommerce' ) ) { return; + } $show_fields = $this->get_customer_meta_fields(); @@ -176,12 +177,17 @@ class WC_Admin_Profile { * @param mixed $user_id User ID of the user being saved */ public function save_customer_meta_fields( $user_id ) { - $save_fields = $this->get_customer_meta_fields(); + $save_fields = $this->get_customer_meta_fields(); - foreach( $save_fields as $fieldset ) - foreach( $fieldset['fields'] as $key => $field ) - if ( isset( $_POST[ $key ] ) ) - update_user_meta( $user_id, $key, wc_clean( $_POST[ $key ] ) ); + foreach( $save_fields as $fieldset ) { + + foreach( $fieldset['fields'] as $key => $field ) { + + if ( isset( $_POST[ $key ] ) ) { + update_user_meta( $user_id, $key, wc_clean( $_POST[ $key ] ) ); + } + } + } } /** @@ -192,8 +198,9 @@ class WC_Admin_Profile { */ public function add_api_key_field( $user ) { - if ( ! current_user_can( 'manage_woocommerce' ) ) + if ( ! current_user_can( 'manage_woocommerce' ) ) { return; + } $permissions = array( 'read' => __( 'Read', 'woocommerce' ), diff --git a/includes/admin/class-wc-admin-reports.php b/includes/admin/class-wc-admin-reports.php index 802fe1ae5b6..662749fe261 100644 --- a/includes/admin/class-wc-admin-reports.php +++ b/includes/admin/class-wc-admin-reports.php @@ -4,9 +4,9 @@ * * Functions used for displaying sales and customer reports in admin. * - * @author WooThemes - * @category Admin - * @package WooCommerce/Admin/Reports + * @author WooThemes + * @category Admin + * @package WooCommerce/Admin/Reports * @version 2.0.0 */ @@ -44,13 +44,13 @@ class WC_Admin_Reports { 'orders' => array( 'title' => __( 'Orders', 'woocommerce' ), 'reports' => array( - "sales_by_date" => array( + "sales_by_date" => array( 'title' => __( 'Sales by date', 'woocommerce' ), 'description' => '', 'hide_title' => true, 'callback' => array( __CLASS__, 'get_report' ) ), - "sales_by_product" => array( + "sales_by_product" => array( 'title' => __( 'Sales by product', 'woocommerce' ), 'description' => '', 'hide_title' => true, diff --git a/includes/admin/class-wc-admin-settings.php b/includes/admin/class-wc-admin-settings.php index 7c4de21bb18..38663cdd355 100644 --- a/includes/admin/class-wc-admin-settings.php +++ b/includes/admin/class-wc-admin-settings.php @@ -2,9 +2,9 @@ /** * WooCommerce Admin Settings Class. * - * @author WooThemes - * @category Admin - * @package WooCommerce/Admin + * @author WooThemes + * @category Admin + * @package WooCommerce/Admin * @version 2.2.0 */ @@ -112,8 +112,6 @@ class WC_Admin_Settings { * Settings page. * * Handles the display of the main woocommerce settings page in admin. - * - * @return void */ public static function output() { global $current_section, $current_tab; @@ -766,8 +764,6 @@ class WC_Admin_Settings { * Checks which method we're using to serve downloads * * If using force or x-sendfile, this ensures the .htaccess is in place - * - * @return void */ public static function check_download_folder_protection() { $upload_dir = wp_upload_dir(); diff --git a/includes/admin/class-wc-admin-status.php b/includes/admin/class-wc-admin-status.php index 13429548423..0a0db3df5b6 100644 --- a/includes/admin/class-wc-admin-status.php +++ b/includes/admin/class-wc-admin-status.php @@ -2,9 +2,9 @@ /** * Debug/Status page * - * @author WooThemes - * @category Admin - * @package WooCommerce/Admin/System Status + * @author WooThemes + * @category Admin + * @package WooCommerce/Admin/System Status * @version 2.2.0 */ @@ -197,29 +197,29 @@ class WC_Admin_Status { public static function get_tools() { $tools = array( 'clear_transients' => array( - 'name' => __( 'WC Transients','woocommerce'), - 'button' => __('Clear transients','woocommerce'), - 'desc' => __( 'This tool will clear the product/shop transients cache.', 'woocommerce' ), + 'name' => __( 'WC Transients','woocommerce'), + 'button' => __('Clear transients','woocommerce'), + 'desc' => __( 'This tool will clear the product/shop transients cache.', 'woocommerce' ), ), 'clear_expired_transients' => array( - 'name' => __( 'Expired Transients','woocommerce'), - 'button' => __('Clear expired transients','woocommerce'), - 'desc' => __( 'This tool will clear ALL expired transients from WordPress.', 'woocommerce' ), + 'name' => __( 'Expired Transients','woocommerce'), + 'button' => __('Clear expired transients','woocommerce'), + 'desc' => __( 'This tool will clear ALL expired transients from WordPress.', 'woocommerce' ), ), 'recount_terms' => array( - 'name' => __('Term counts','woocommerce'), - 'button' => __('Recount terms','woocommerce'), - 'desc' => __( 'This tool will recount product terms - useful when changing your settings in a way which hides products from the catalog.', 'woocommerce' ), + 'name' => __('Term counts','woocommerce'), + 'button' => __('Recount terms','woocommerce'), + 'desc' => __( 'This tool will recount product terms - useful when changing your settings in a way which hides products from the catalog.', 'woocommerce' ), ), 'reset_roles' => array( - 'name' => __('Capabilities','woocommerce'), - 'button' => __('Reset capabilities','woocommerce'), - 'desc' => __( 'This tool will reset the admin, customer and shop_manager roles to default. Use this if your users cannot access all of the WooCommerce admin pages.', 'woocommerce' ), + 'name' => __('Capabilities','woocommerce'), + 'button' => __('Reset capabilities','woocommerce'), + 'desc' => __( 'This tool will reset the admin, customer and shop_manager roles to default. Use this if your users cannot access all of the WooCommerce admin pages.', 'woocommerce' ), ), 'clear_sessions' => array( - 'name' => __('Customer Sessions','woocommerce'), - 'button' => __('Clear all sessions','woocommerce'), - 'desc' => __( 'Warning: This tool will delete all customer session data from the database, including any current live carts.', 'woocommerce' ), + 'name' => __('Customer Sessions','woocommerce'), + 'button' => __('Clear all sessions','woocommerce'), + 'desc' => __( 'Warning: This tool will delete all customer session data from the database, including any current live carts.', 'woocommerce' ), ), 'install_pages' => array( 'name' => __( 'Install WooCommerce Pages', 'woocommerce' ), @@ -248,12 +248,15 @@ class WC_Admin_Status { * Show the logs page */ public static function status_logs() { + $logs = self::scan_log_files(); + if ( ! empty( $_POST['log_file'] ) && isset( $logs[ sanitize_title( $_POST['log_file'] ) ] ) ) { $viewed_log = $logs[ sanitize_title( $_POST['log_file'] ) ]; } elseif ( $logs ) { $viewed_log = current( $logs ); } + include_once( 'views/html-admin-page-status-logs.php' ); } @@ -265,6 +268,7 @@ class WC_Admin_Status { * @return string */ public static function get_file_version( $file ) { + // Avoid notices if file does not exist if ( ! file_exists( $file ) ) { return ''; @@ -296,11 +300,16 @@ class WC_Admin_Status { * @return array */ public static function scan_template_files( $template_path ) { + $files = scandir( $template_path ); $result = array(); + if ( $files ) { + foreach ( $files as $key => $value ) { + if ( ! in_array( $value, array( ".",".." ) ) ) { + if ( is_dir( $template_path . DIRECTORY_SEPARATOR . $value ) ) { $sub_files = self::scan_template_files( $template_path . DIRECTORY_SEPARATOR . $value ); foreach ( $sub_files as $sub_file ) { @@ -323,8 +332,11 @@ class WC_Admin_Status { public static function scan_log_files() { $files = @scandir( WC_LOG_DIR ); $result = array(); + if ( $files ) { + foreach ( $files as $key => $value ) { + if ( ! in_array( $value, array( '.', '..' ) ) ) { if ( ! is_dir( $value ) && strstr( $value, '.log' ) ) { $result[ sanitize_title( $value ) ] = $value; diff --git a/includes/admin/class-wc-admin-taxonomies.php b/includes/admin/class-wc-admin-taxonomies.php index f7d9dfced07..f51f810bf6b 100644 --- a/includes/admin/class-wc-admin-taxonomies.php +++ b/includes/admin/class-wc-admin-taxonomies.php @@ -2,11 +2,11 @@ /** * Handles taxonomies in admin * - * @class WC_Admin_Taxonomies - * @version 2.1.0 - * @package WooCommerce/Admin - * @category Class - * @author WooThemes + * @class WC_Admin_Taxonomies + * @version 2.1.0 + * @package WooCommerce/Admin + * @category Class + * @author WooThemes */ if ( ! defined( 'ABSPATH' ) ) { @@ -48,13 +48,12 @@ class WC_Admin_Taxonomies { /** * Order term when created (put in position 0). * - * @access public * @param mixed $term_id * @param mixed $tt_id * @param mixed $taxonomy - * @return void */ public function create_term( $term_id, $tt_id = '', $taxonomy = '' ) { + if ( $taxonomy != 'product_cat' && ! taxonomy_is_product_attribute( $taxonomy ) ) { return; } @@ -67,16 +66,15 @@ class WC_Admin_Taxonomies { /** * When a term is deleted, delete its meta. * - * @access public * @param mixed $term_id - * @return void */ public function delete_term( $term_id ) { $term_id = (int) $term_id; - if ( ! $term_id ) + if ( ! $term_id ) { return; + } global $wpdb; $wpdb->query( "DELETE FROM {$wpdb->woocommerce_termmeta} WHERE `woocommerce_term_id` = " . $term_id ); @@ -84,9 +82,6 @@ class WC_Admin_Taxonomies { /** * Category thumbnail fields. - * - * @access public - * @return void */ public function add_category_fields() { ?> @@ -109,14 +104,15 @@ class WC_Admin_Taxonomies {
    enabled == 'no' ) { + if ( 'no' == $this->enabled ) { return; } @@ -137,8 +151,8 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { echo '

    ' . __( 'Simplify Commerce Error: Please enter your public and private keys', 'woocommerce' ) . '

    '; } - // Show message if enabled and FORCE SSL is disabled and WordpressHTTPS plugin is not detected - elseif ( 'no' == get_option( 'woocommerce_force_ssl_checkout' ) && ! class_exists( 'WordPressHTTPS' ) ) { + // Show message when using standard mode and no SSL on the checkout page + elseif ( 'standard' == $this->mode && 'no' == get_option( 'woocommerce_force_ssl_checkout' ) && ! class_exists( 'WordPressHTTPS' ) ) { echo '

    ' . sprintf( __( 'Simplify Commerce is enabled, but the force SSL option is disabled; your checkout may not be secure! Please enable SSL and ensure your server has a valid SSL certificate - Simplify Commerce will only work in sandbox mode.', 'woocommerce'), admin_url( 'admin.php?page=wc-settings&tab=checkout' ) ) . '

    '; } } @@ -151,7 +165,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { return false; } - if ( ! is_ssl() && 'yes' != $this->sandbox ) { + if ( 'standard' == $this->mode && ! is_ssl() && 'yes' != $this->sandbox ) { return false; } @@ -188,6 +202,24 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { 'default' => 'Pay with your credit card via Simplify Commerce by Mastercard.', 'desc_tip' => true ), + 'mode' => array( + 'title' => __( 'Payment Mode', 'woocommerce' ), + 'label' => __( 'Enable Hosted Payments', 'woocommerce' ), + 'type' => 'select', + 'description' => __( 'Standard will display the credit card fields on your store (SSL required). Hosted Payments will display a Simplify Commerce modal dialog on your store (SSL not required). ', 'woocommerce' ), + 'default' => 'hosted', + 'options' => array( + 'standard' => __( 'Standard', 'woocommerce' ), + 'hosted' => __( 'Hosted Payments', 'woocommerce' ) + ) + ), + 'modal_color' => array( + 'title' => __( 'Modal Color', 'woocommerce' ), + 'type' => 'color', + 'description' => __( 'Set the color of the buttons and titles on the modal dialog.', 'woocommerce' ), + 'default' => '#a46497', + 'desc_tip' => true + ), 'sandbox' => array( 'title' => __( 'Sandbox', 'woocommerce' ), 'label' => __( 'Enable Sandbox Mode', 'woocommerce' ), @@ -240,7 +272,9 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { echo wpautop( wptexturize( trim( $description ) ) ); } - $this->credit_card_form( array( 'fields_have_names' => false ) ); + if ( 'standard' == $this->mode ) { + $this->credit_card_form( array( 'fields_have_names' => false ) ); + } } /** @@ -262,16 +296,18 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { 'card.number' => __( 'Card Number', 'woocommerce' ), 'card.expMonth' => __( 'Expiry Month', 'woocommerce' ), 'card.expYear' => __( 'Expiry Year', 'woocommerce' ), - 'is_invalid' => __( 'is invalid', 'woocommerce' ) + 'is_invalid' => __( 'is invalid', 'woocommerce' ), + 'mode' => $this->mode, + 'is_ssl' => is_ssl() ) ); } /** - * Process the payment - * @param integer $order_id + * Process standard payments + * + * @return array */ - public function process_payment( $order_id ) { - $order = wc_get_order( $order_id ); + protected function process_standard_payments( $order ) { $token = isset( $_POST['simplify_token'] ) ? wc_clean( $_POST['simplify_token'] ) : ''; try { @@ -337,6 +373,81 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { } } + /** + * Process standard payments + * + * @return array + */ + protected function process_hosted_payments( $order ) { + return array( + 'result' => 'success', + 'redirect' => $order->get_checkout_payment_url( true ) + ); + } + + /** + * Process the payment + * + * @param integer $order_id + */ + public function process_payment( $order_id ) { + $order = wc_get_order( $order_id ); + + if ( 'hosted' == $this->mode ) { + return $this->process_hosted_payments( $order ); + } else { + return $this->process_standard_payments( $order ); + } + } + + /** + * Hosted payment args. + * + * @param WC_Order $order + * + * @return array + */ + protected function get_hosted_payments_args( $order ) { + $args = apply_filters( 'woocommerce_simplify_commerce_hosted_args', array( + 'sc-key' => $this->public_key, + 'amount' => $order->order_total * 100, + 'reference' => $order->id, + 'name' => esc_html( get_bloginfo( 'name' ) ), + 'description' => sprintf( __( 'Order #%s', 'woocommerce' ), $order->get_order_number() ), + 'receipt' => 'false', + 'color' => $this->modal_color + ) ); + + return $args; + } + + /** + * Receipt page + * + * @param int $order_id + */ + public function receipt_page( $order_id ) { + $order = wc_get_order( $order_id ); + + echo '

    ' . __( 'Thank you for your order, please click the button below to pay with credit card using Simplify Commerce by MasterCard.', 'woocommerce' ) . '

    '; + + $args = $this->get_hosted_payments_args( $order ); + $button_args = array(); + foreach ( $args as $key => $value ) { + $button_args[] = 'data-' . esc_attr( $key ) . '="' . esc_attr( $value ) . '" '; + } + + echo ' + ' . __( 'Cancel order & restore cart', 'woocommerce' ) . ' + '; + } + + public function return_handler() { + + + exit(); + } + /** * Process refunds * WooCommerce 2.2 or later @@ -383,11 +494,11 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { * @return string */ public function get_icon() { - $icon = 'Visa'; - $icon .= 'Mastercard'; - $icon .= 'Discover'; - $icon .= 'Amex'; - $icon .= 'JCB'; + $icon = 'Visa'; + $icon .= 'Mastercard'; + $icon .= 'Discover'; + $icon .= 'Amex'; + $icon .= 'JCB'; return apply_filters( 'woocommerce_gateway_icon', $icon, $this->id ); } From 4af6f1765d1d984c02805a5f18b32967f9eeaac6 Mon Sep 17 00:00:00 2001 From: Bryan Purcell Date: Tue, 9 Dec 2014 16:11:31 -0600 Subject: [PATCH 379/743] Unit Tests for business logic in the WC_Customer class --- tests/unit-tests/customer.php | 118 ++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 tests/unit-tests/customer.php diff --git a/tests/unit-tests/customer.php b/tests/unit-tests/customer.php new file mode 100644 index 00000000000..08069110610 --- /dev/null +++ b/tests/unit-tests/customer.php @@ -0,0 +1,118 @@ + 'US', + 'state' => 'PA', + 'postcode' => '19123', + 'city' => 'Philadelphia', + 'address' => '123 South Street', + 'address_2' => 'Apt 1', + 'shipping_country' => 'US', + 'shipping_state' => 'PA', + 'shipping_postcode' => '19123', + 'shipping_city' => 'Philadelphia', + 'shipping_address' => '123 South Street', + 'shipping_address_2' => 'Apt 1', + 'is_vat_exempt' => false, + 'calculated_shipping' => false + ); + + //Set up the address assertions for the two taxable addresses + + $base_store_address = array( "GB", "", "", "" ); + $customer_address = array( "US", "PA", "19123", "Philadelphia" ); + + //Initialize the session variables + + WC()->session->set( 'customer', $customer_data ); + + // Create dummy product, and add it to the cart + $product = WC_Helper_Product::create_simple_product(); + WC()->cart->add_to_cart( $product->id, 1 ); + + // Customer is going with the Local Pickup option, and the store calculates tax based on the store base location. + $customer = $this->helper_setup_customer( 'local_pickup', 'billing' ); + $this->assertEquals( $customer->get_taxable_address() , $base_store_address); + + // Customer is going with the Local Pickup option, and the store calculates tax based on the customer's billing address. + $customer = $this->helper_setup_customer( 'local_pickup', 'billing' ); + $this->assertEquals( $customer->get_taxable_address() , $base_store_address); + + // Customer is going with the Free Shipping option, and the store calculates tax based on the customer's billing address. + $customer = $this->helper_setup_customer( 'free_shipping', 'billing' ); + $this->assertEquals( $customer->get_taxable_address() , $customer_address); + + // Customer is going with the Free Shipping option, and the store calculates tax based on the store base location. + $customer = $this->helper_setup_customer( 'free_shipping', 'base' ); + $this->assertEquals( $customer->get_taxable_address() , $base_store_address); + } + /** + * Test the is_customer_outside_base method + */ + public function test_is_customer_outside_base() { + + $customer_data = array( + 'country' => 'US', + 'state' => 'PA', + 'postcode' => '19123', + 'city' => 'Philadelphia', + 'address' => '123 South Street', + 'address_2' => 'Apt 1', + 'shipping_country' => 'US', + 'shipping_state' => 'PA', + 'shipping_postcode' => '19123', + 'shipping_city' => 'Philadelphia', + 'shipping_address' => '123 South Street', + 'shipping_address_2' => 'Apt 1', + 'is_vat_exempt' => false, + 'calculated_shipping' => false + ); + + //Initialize the session variables for the dummy customer. + + WC()->session->set( 'customer', $customer_data ); + + // Create dummy product, and add the product to the cart. + $product = WC_Helper_Product::create_simple_product(); + WC()->cart->add_to_cart( $product->id, 1 ); + + // Customer is going with the Local Pickup option, and the store calculates tax based on the store base location. + $customer = $this->helper_setup_customer( 'local_pickup', 'billing' ); + $this->assertFalse( $customer->is_customer_outside_base() ); + + // Customer is going with the Local Pickup option, and the store calculates tax based on the customer's billing address. + $customer = $this->helper_setup_customer( 'local_pickup', 'billing' ); + $this->assertFalse( $customer->is_customer_outside_base() ); + + // Customer is going with the Free Shipping option, and the store calculates tax based on the customer's billing address. + $customer = $this->helper_setup_customer( 'free_shipping', 'billing' ); + $this->assertTrue( $customer->is_customer_outside_base() ); + + // Customer is going with the Free Shipping option, and the store calculates tax based on the store base location. + $customer = $this->helper_setup_customer( 'free_shipping', 'base' ); + $this->assertFalse( $customer->is_customer_outside_base() ); + } + /** + * Helper function for creating the customer and setting up the tax enviroment based on desired params. + */ + private function helper_setup_customer($shipping_method, $tax_based_on) { + //Set up the environment for our combination + + //Shipping Methods + update_option( 'woocommerce_default_shipping_method', $shipping_method ); + WC()->session->set( 'chosen_shipping_methods', array( $shipping_method ) ); + + //Tax "Based-on" Settings + update_option( 'woocommerce_tax_based_on', $tax_based_on ); + + $customer = new WC_Customer(); + + return $customer; + } +} \ No newline at end of file From 18fe337facd4b8096d2d7dbd79e0fcdf0c63d05e Mon Sep 17 00:00:00 2001 From: Bryan Purcell Date: Tue, 9 Dec 2014 19:50:31 -0600 Subject: [PATCH 380/743] Refactoring the WC_Customer Unit Tests --- tests/unit-tests/customer.php | 43 ++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/tests/unit-tests/customer.php b/tests/unit-tests/customer.php index 08069110610..7df36f1e853 100644 --- a/tests/unit-tests/customer.php +++ b/tests/unit-tests/customer.php @@ -32,24 +32,27 @@ class WC_Tests_Customer extends WC_Unit_Test_Case { WC()->session->set( 'customer', $customer_data ); + //Create a dummy customer to use for testing! + $customer = new WC_Customer(); + // Create dummy product, and add it to the cart $product = WC_Helper_Product::create_simple_product(); WC()->cart->add_to_cart( $product->id, 1 ); // Customer is going with the Local Pickup option, and the store calculates tax based on the store base location. - $customer = $this->helper_setup_customer( 'local_pickup', 'billing' ); + $this->helper_setup_shipping_tax_env( 'local_pickup', 'billing' ); $this->assertEquals( $customer->get_taxable_address() , $base_store_address); // Customer is going with the Local Pickup option, and the store calculates tax based on the customer's billing address. - $customer = $this->helper_setup_customer( 'local_pickup', 'billing' ); + $this->helper_setup_shipping_tax_env( 'local_pickup', 'billing' ); $this->assertEquals( $customer->get_taxable_address() , $base_store_address); // Customer is going with the Free Shipping option, and the store calculates tax based on the customer's billing address. - $customer = $this->helper_setup_customer( 'free_shipping', 'billing' ); + $this->helper_setup_shipping_tax_env( 'free_shipping', 'billing' ); $this->assertEquals( $customer->get_taxable_address() , $customer_address); // Customer is going with the Free Shipping option, and the store calculates tax based on the store base location. - $customer = $this->helper_setup_customer( 'free_shipping', 'base' ); + $this->helper_setup_shipping_tax_env( 'free_shipping', 'base' ); $this->assertEquals( $customer->get_taxable_address() , $base_store_address); } /** @@ -78,31 +81,39 @@ class WC_Tests_Customer extends WC_Unit_Test_Case { WC()->session->set( 'customer', $customer_data ); + //Create a dummy customer to use for testing! + $customer = new WC_Customer(); + // Create dummy product, and add the product to the cart. $product = WC_Helper_Product::create_simple_product(); WC()->cart->add_to_cart( $product->id, 1 ); // Customer is going with the Local Pickup option, and the store calculates tax based on the store base location. - $customer = $this->helper_setup_customer( 'local_pickup', 'billing' ); - $this->assertFalse( $customer->is_customer_outside_base() ); + $this->helper_setup_shipping_tax_env( 'local_pickup', 'billing' ); + $this->assertEquals( $customer->is_customer_outside_base(), false ); // Customer is going with the Local Pickup option, and the store calculates tax based on the customer's billing address. - $customer = $this->helper_setup_customer( 'local_pickup', 'billing' ); - $this->assertFalse( $customer->is_customer_outside_base() ); + $this->helper_setup_shipping_tax_env( 'local_pickup', 'billing' ); + $this->assertEquals( $customer->is_customer_outside_base(), false ); // Customer is going with the Free Shipping option, and the store calculates tax based on the customer's billing address. - $customer = $this->helper_setup_customer( 'free_shipping', 'billing' ); - $this->assertTrue( $customer->is_customer_outside_base() ); + $this->helper_setup_shipping_tax_env( 'free_shipping', 'billing' ); + $this->assertEquals( $customer->is_customer_outside_base(), true ); // Customer is going with the Free Shipping option, and the store calculates tax based on the store base location. - $customer = $this->helper_setup_customer( 'free_shipping', 'base' ); - $this->assertFalse( $customer->is_customer_outside_base() ); + $this->helper_setup_shipping_tax_env( 'free_shipping', 'base' ); + $this->assertEquals( $customer->is_customer_outside_base(), false ); } + /** * Helper function for creating the customer and setting up the tax enviroment based on desired params. + * + * @param string $shipping_method Shipping Method slug + * @param string $tax_based_on either 'base' or 'billing.' base refers to tax computed based on the shop location, 'billing' computes tax based on the customer's billing address. + * @return void */ - private function helper_setup_customer($shipping_method, $tax_based_on) { - //Set up the environment for our combination + + private function helper_setup_shipping_tax_env($shipping_method, $tax_based_on) { //Shipping Methods update_option( 'woocommerce_default_shipping_method', $shipping_method ); @@ -110,9 +121,5 @@ class WC_Tests_Customer extends WC_Unit_Test_Case { //Tax "Based-on" Settings update_option( 'woocommerce_tax_based_on', $tax_based_on ); - - $customer = new WC_Customer(); - - return $customer; } } \ No newline at end of file From e8a347ed1879da764717027e7cfbbec286a83e8b Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 10 Dec 2014 10:07:45 -0200 Subject: [PATCH 381/743] Created the simplify commerce hosted payments return handler --- .../class-wc-gateway-simplify-commerce.php | 65 +++++++++++++++---- 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php b/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php index e9b628d87f3..b8490670525 100644 --- a/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php +++ b/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php @@ -52,8 +52,8 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { $this->mode = $this->get_option( 'mode', 'standard' ); $this->modal_color = $this->get_option( 'modal_color', '#a46497' ); $this->sandbox = $this->get_option( 'sandbox' ); - $this->private_key = $this->sandbox == 'no' ? $this->get_option( 'private_key' ) : $this->get_option( 'sandbox_private_key' ); $this->public_key = $this->sandbox == 'no' ? $this->get_option( 'public_key' ) : $this->get_option( 'sandbox_public_key' ); + $this->private_key = $this->sandbox == 'no' ? $this->get_option( 'private_key' ) : $this->get_option( 'sandbox_private_key' ); $this->init_simplify_sdk(); @@ -336,16 +336,9 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { 'card.addressZip' => $order->billing_postcode ) ); - if ( 'APPROVED' == $payment->paymentStatus ) { - // Payment complete - $order->payment_complete( $payment->id ); - - // Add order note - $order->add_order_note( sprintf( __( 'Simplify payment approved (ID: %s, Auth Code: %s)', 'woocommerce' ), $payment->id, $payment->authCode ) ); - - // Remove cart - WC()->cart->empty_cart(); + $order_complete = $this->process_order_status( $payment->id, $payment->paymentStatus, $payment->authCode ); + if ( $order_complete ) { // Return thank you page redirect return array( 'result' => 'success', @@ -434,20 +427,68 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { $args = $this->get_hosted_payments_args( $order ); $button_args = array(); foreach ( $args as $key => $value ) { - $button_args[] = 'data-' . esc_attr( $key ) . '="' . esc_attr( $value ) . '" '; + $button_args[] = 'data-' . esc_attr( $key ) . '="' . esc_attr( $value ) . '"'; } echo ' - ' . __( 'Cancel order & restore cart', 'woocommerce' ) . ' + ' . __( 'Cancel order & restore cart', 'woocommerce' ) . ' '; } + /** + * Return handler for Hosted Payments. + */ public function return_handler() { + @ob_clean(); + header( 'HTTP/1.1 200 OK' ); + if ( isset( $_REQUEST['reference'] ) && isset( $_REQUEST['paymentId'] ) && isset( $_REQUEST['signature'] ) ) { + $signature = strtoupper( md5( $_REQUEST['amount'] . $_REQUEST['reference'] . $_REQUEST['paymentId'] . $_REQUEST['paymentDate'] . $_REQUEST['paymentStatus'] . $this->private_key ) ); + $order_id = asbint( $_REQUEST['reference'] ); + $order = wc_get_order( $order_id ); + if ( $signature === $_REQUEST['signature'] ) { + $order_complete = $this->process_order_status( $_REQUEST['paymentId'], $_REQUEST['paymentStatus'], $_REQUEST['paymentDate'] ); + + if ( ! $order_complete ) { + $order->update_status( 'failed', __( 'Payment was declined by Simplify Commerce.', 'woocommerce' ) ); + } + + wp_redirect( $this->get_return_url( $order ) ); + exit(); + } + } + + wp_redirect( get_permalink( wc_get_page_id( 'cart' ) ) ); exit(); } + /** + * Process the order status. + * + * @param string $payment_id + * @param string $status + * @param string $auth_code + * + * @return bool + */ + public function process_order_status( $payment_id, $status, $auth_code ) { + if ( 'APPROVED' == $status ) { + // Payment complete + $order->payment_complete( $payment_id ); + + // Add order note + $order->add_order_note( sprintf( __( 'Simplify payment approved (ID: %s, Auth Code: %s)', 'woocommerce' ), $payment_id, $auth_code ) ); + + // Remove cart + WC()->cart->empty_cart(); + + return true; + } + + return false; + } + /** * Process refunds * WooCommerce 2.2 or later From fe34eb7bf8ed7b616f8f1021e81e41a31d662cf9 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 10 Dec 2014 14:44:59 +0000 Subject: [PATCH 382/743] Fix state box by seeing if states is empty object --- assets/js/admin/meta-boxes-order.js | 2 +- assets/js/admin/meta-boxes-order.min.js | 2 +- assets/js/frontend/country-select.js | 2 +- assets/js/frontend/country-select.min.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/js/admin/meta-boxes-order.js b/assets/js/admin/meta-boxes-order.js index f1474109bdc..286fc0739d5 100644 --- a/assets/js/admin/meta-boxes-order.js +++ b/assets/js/admin/meta-boxes-order.js @@ -114,7 +114,7 @@ jQuery( function ( $ ) { // Remove the previous Chosen DOM element $parent.show().find( '.chosen-container' ).remove(); - if ( states[ country ] ) { + if ( ! $.isEmptyObject( states[ country ] ) ) { var $states_select = $( '' ), state = states[ country ]; diff --git a/assets/js/admin/meta-boxes-order.min.js b/assets/js/admin/meta-boxes-order.min.js index 3a0e528baeb..b2abec9296d 100644 --- a/assets/js/admin/meta-boxes-order.min.js +++ b/assets/js/admin/meta-boxes-order.min.js @@ -1 +1 @@ -jQuery(function(a){function b(){a("#woocommerce-order-items").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}function c(){a("#woocommerce-order-items").unblock()}function d(){a("#tiptip_holder").removeAttr("style"),a("#tiptip_arrow").removeAttr("style"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}function e(){var e={order_id:woocommerce_admin_meta_boxes.post_id,action:"woocommerce_load_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}a("#woocommerce-order-actions input, #woocommerce-order-actions a").click(function(){window.onbeforeunload=""}),a("a.edit_address").click(function(b){b.preventDefault(),a(this).hide(),a(this).closest(".order_data_column").find("div.address").hide(),a(this).closest(".order_data_column").find("div.edit_address").show()});var f=null,g={};"undefined"!=typeof woocommerce_admin_meta_boxes_order&&"undefined"!=typeof woocommerce_admin_meta_boxes_order.countries&&(f=a.parseJSON(woocommerce_admin_meta_boxes_order.countries.replace(/"/g,'"'))),a(".js_field-country").chosen(g).change(function(b,c){if("undefined"==typeof c&&(c=!1),null!==f){var d=a(this),e=d.val(),h=d.parents(".edit_address").find(".js_field-state"),i=h.parent(),j=h.attr("name"),k=h.attr("id"),l=d.data("woocommerce.stickState-"+e)?d.data("woocommerce.stickState-"+e):h.val(),m=h.attr("placeholder");if(c&&d.data("woocommerce.stickState-"+e,l),i.show().find(".chosen-container").remove(),f[e]){var n=a(''),o=f[e];n.append(a('")),a.each(o,function(b){n.append(a('"))}),n.val(l),h.replaceWith(n),n.show().chosen(g).hide().trigger("chosen:updated")}else h.replaceWith('');a("body").trigger("contry-change.woocommerce",[e,a(this).closest("div")])}}).trigger("change",[!0]),a("body").on("change","select.js_field-state",function(){var b=a(this),c=b.val(),d=b.parents(".edit_address").find(".js_field-country"),e=d.val();d.data("woocommerce.stickState-"+e,c)}).on("click","a.edit-order-item",function(){return a(this).closest("tr").find(".view").hide(),a(this).closest("tr").find(".edit").show(),a(this).hide(),a("button.add-line-item").click(),a("button.cancel-action").attr("data-reload",!0),!1}).on("click",".woocommerce_order_items a.delete-order-item",function(){var d=window.confirm(woocommerce_admin_meta_boxes.remove_item_notice);if(d){var e=a(this).closest("tr.item, tr.fee, tr.shipping"),f=e.attr("data-order_item_id");b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){e.remove(),c()}})}return!1}).on("click","#order_refunds .delete_refund",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_refund)){var c=a(this).closest("tr.refund"),d=c.attr("data-order_refund_id");b();var f={action:"woocommerce_delete_refund",refund_id:d,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(){e()}})}return!1}).on("change",".woocommerce_order_items input.quantity",function(){var b=a(this).closest("tr.item"),c=a(this).val(),d=a(this).attr("data-qty"),e=a("input.line_total",b),f=a("input.line_subtotal",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/d;e.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var h=accounting.unformat(f.attr("data-subtotal"),woocommerce_admin.mon_decimal_point)/d;f.val(parseFloat(accounting.formatNumber(h*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/d;e>0&&b.val(parseFloat(accounting.formatNumber(e*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var f=a("input.line_subtotal_tax",a(this)),g=accounting.unformat(f.attr("data-subtotal_tax"),woocommerce_admin.mon_decimal_point)/d;g>0&&f.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("quantity_changed")}).on("change",".woocommerce_order_items input.refund_order_item_qty",function(){var b=a(this).closest("tr.item"),c=b.find("input.quantity").val(),d=a(this).val(),e=a("input.line_total",b),f=a("input.refund_line_total",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/c;f.val(parseFloat(accounting.formatNumber(g*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=a("input.refund_line_tax",a(this)),f=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/c;f>0&&e.val(parseFloat(accounting.formatNumber(f*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("refund_quantity_changed")}).on("change",".woocommerce_order_items .refund input",function(){var b=0,c=a(".woocommerce_order_items").find("tr.item, tr.fee, tr.shipping");c.each(function(){var c=a(this),d=c.find(".refund input:not(.refund_order_item_qty)");d.each(function(c,d){b+=parseFloat(accounting.unformat(a(d).val()||0,woocommerce_admin.mon_decimal_point))})}),a("#refund_amount").val(accounting.formatNumber(b,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change()}).on("click",".woocommerce_order_items button.add_order_item_meta",function(){var d=a(this),e=d.closest("tr.item"),f={order_item_id:e.attr("data-order_item_id"),action:"woocommerce_add_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(a){e.find("tbody.meta_items").append(a),c()}}),!1}).on("click",".woocommerce_order_items button.remove_order_item_meta",function(){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_meta)){var d=a(this).closest("tr"),e={meta_id:d.attr("data-meta_id"),action:"woocommerce_remove_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(){d.hide(),c()}})}return!1}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){var b=a(this).next();(""===b.val()||b.is(".match-total"))&&b.val(a(this).val()).addClass("match-total")}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){a(this).removeClass("match-total")}),a("#woocommerce-order-items").on("click","button.add-line-item",function(){return a("div.wc-order-add-item").slideDown(),a("div.wc-order-bulk-actions").slideUp(),!1}).on("click","button.refund-items",function(){return a("div.wc-order-refund-items").slideDown(),a("div.wc-order-bulk-actions").slideUp(),a("div.wc-order-totals-items").slideUp(),a("#woocommerce-order-items div.refund").show(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").hide(),!1}).on("click",".cancel-action",function(){return a(this).closest("div.wc-order-data-row").slideUp(),a("div.wc-order-bulk-actions").slideDown(),a("div.wc-order-totals-items").slideDown(),a("#woocommerce-order-items div.refund").hide(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").show(),"true"===a(this).attr("data-reload")&&e(),!1}).on("click","button.add-order-item",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-products"}),!1}).on("click","button.add-order-fee",function(){b();var d={action:"woocommerce_add_order_fee",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_fee_line_items").append(b),c()}),!1}).on("click","button.add-order-shipping",function(){b();var d={action:"woocommerce_add_order_shipping",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_shipping_line_items").append(b),c()}),!1}).on("click","button.add-order-tax",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-tax"}),!1}).on("click","input.check-column",function(){a(this).is(":checked")?a("#woocommerce-order-items").find(".check-column input").attr("checked","checked"):a("#woocommerce-order-items").find(".check-column input").removeAttr("checked")}).on("click",".do_bulk_action",function(){var d=a(this).closest(".bulk-actions").find("select").val(),e=a("#woocommerce-order-items").find(".check-column input:checked"),f=[];if(a(e).each(function(){var b=a(this).closest("tr");b.attr("data-order_item_id")&&f.push(b.attr("data-order_item_id"))}),0===f.length)return void window.alert(woocommerce_admin_meta_boxes.i18n_select_items);if("delete"===d){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_notice)){b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){a(e).each(function(){a(this).closest("tr").remove()}),c()}})}}else if("reduce_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_reduce_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}else if("increase_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_increase_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}return!1}).on("click","button.calculate-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_totals)){b();var c=0,d=0,e=0;a(".woocommerce_order_items tr.shipping input.line_total").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),e+=parseFloat(b)}),a(".woocommerce_order_items input.line_tax").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),d+=parseFloat(b)}),a(".woocommerce_order_items tr.item, .woocommerce_order_items tr.fee").each(function(){var b=a(this).find("input.line_total").val()||"0";c+=accounting.unformat(b.replace(",","."))}),"yes"===woocommerce_admin_meta_boxes.round_at_subtotal&&(d=parseFloat(accounting.toFixed(d,woocommerce_admin_meta_boxes.rounding_precision))),a("#_order_total").val(accounting.formatNumber(c+d+e,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change(),a("button.save-action").click()}return!1}).on("click","button.save-action",function(){var e={order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),action:"woocommerce_save_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c(),a(".woocommerce_order_items").stupidtable()}}),a(this).trigger("items_saved"),!1}).on("click","a.delete-order-tax",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_tax)){b();var e={action:"woocommerce_remove_order_tax",rate_id:a(this).attr("data-rate_id"),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}).on("click","button.calculate-tax-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_line_taxes)){b();var e=a("#_shipping_country").val(),f=a("#_billing_country").val(),g=woocommerce_admin_meta_boxes.base_country,h="",i="",j="";e?(g=e,h=a("#_shipping_state").val(),i=a("#_shipping_postcode").val(),j=a("#_shipping_city").val()):f&&(g=f,h=a("#_billing_state").val(),i=a("#_billing_postcode").val(),j=a("#_billing_city").val());var k={action:"woocommerce_calc_line_taxes",order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),country:g,state:h,postcode:i,city:j,security:woocommerce_admin_meta_boxes.calc_totals_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:k,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}),a("body").on("change keyup",".wc-order-refund-items #refund_amount",function(){var b=accounting.unformat(a(this).val(),woocommerce_admin.mon_decimal_point);a("button .wc-order-refund-amount .amount").text(accounting.formatMoney(b,{symbol:woocommerce_admin_meta_boxes.currency_format_symbol,decimal:woocommerce_admin_meta_boxes.currency_format_decimal_sep,thousand:woocommerce_admin_meta_boxes.currency_format_thousand_sep,precision:woocommerce_admin_meta_boxes.currency_format_num_decimals,format:woocommerce_admin_meta_boxes.currency_format}))}).on("click",".wc-order-refund-items button.do-api-refund, .wc-order-refund-items button.do-manual-refund",function(){if(b(),window.confirm(woocommerce_admin_meta_boxes.i18n_do_refund)){var d=a("input#refund_amount").val(),f=a("input#refund_reason").val(),g={},h={},i={};a(".refund input.refund_order_item_qty").each(function(b,c){a(c).closest("tr").data("order_item_id")&&c.value&&(g[a(c).closest("tr").data("order_item_id")]=c.value)}),a(".refund input.refund_line_total").each(function(b,c){a(c).closest("tr").data("order_item_id")&&(h[a(c).closest("tr").data("order_item_id")]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point))}),a(".refund input.refund_line_tax").each(function(b,c){if(a(c).closest("tr").data("order_item_id")){var d=a(c).data("tax_id");i[a(c).closest("tr").data("order_item_id")]||(i[a(c).closest("tr").data("order_item_id")]={}),i[a(c).closest("tr").data("order_item_id")][d]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point)}});var j={action:"woocommerce_refund_line_items",order_id:woocommerce_admin_meta_boxes.post_id,refund_amount:d,refund_reason:f,line_item_qtys:JSON.stringify(g,null,""),line_item_totals:JSON.stringify(h,null,""),line_item_tax_totals:JSON.stringify(i,null,""),api_refund:a(this).is(".do-api-refund"),restock_refunded_items:a("#restock_refunded_items:checked").size()?"true":"false",security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,j,function(a){a===!0?e():a.error?(window.alert(a.error),c()):console.log(a)})}else c()}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-products"===f){var g=a("select#add_item_id").val();if(g){var h=g.length;b(),a.each(g,function(b,e){var f={action:"woocommerce_add_order_item",item_to_add:e,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,f,function(b){a("table.woocommerce_order_items tbody#order_line_items").append(b),--h||(a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","").val(""),d(),a("select#add_item_id").trigger("chosen:updated"),c())})})}else a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","red")}}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-tax"===f){var g=a("#manual_tax_rate_id").val(),h=a("input[name=add_order_tax]:checked").val();if(g&&(h=g),!h)return!1;var i=a(".order-tax-id").map(function(){return a(this).val()}).get();if(-1===a.inArray(h,i)){b();var j={action:"woocommerce_add_order_tax",rate_id:h,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:j,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}else window.alert(woocommerce_admin_meta_boxes.i18n_tax_rate_already_exists)}}),a("span.inline_total").closest(".totals_group").find("input").change(),a(".order_download_permissions").on("click","button.grant_access",function(){var b=a("select#grant_access_id").val();if(b){a(".order_download_permissions").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_grant_access_to_download",product_ids:b,loop:a(".order_download_permissions .wc-metabox").size(),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.grant_access_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(b){b?a(".order_download_permissions .wc-metaboxes").append(b):window.alert(woocommerce_admin_meta_boxes.i18n_download_permission_fail),a(".date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,showOn:"button",buttonImage:woocommerce_admin_meta_boxes.calendar_image,buttonImageOnly:!0}),a("#grant_access_id").val("").trigger("chosen:updated"),a(".order_download_permissions").unblock()}),!1}}).on("click","button.revoke_access",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_permission_revoke)){var b=a(this).parent().parent(),c=a(this).attr("rel").split(",")[0],d=a(this).attr("rel").split(",")[1];if(c>0){a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var e={action:"woocommerce_revoke_access_to_download",product_id:c,download_id:d,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.revoke_access_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,e,function(){a(b).fadeOut("300",function(){a(b).remove()})})}else a(b).fadeOut("300",function(){a(b).remove()})}return!1}),a("button.load_customer_billing").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_billing)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"billing",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_billing_first_name").val(c.billing_first_name).change(),a("input#_billing_last_name").val(c.billing_last_name).change(),a("input#_billing_company").val(c.billing_company).change(),a("input#_billing_address_1").val(c.billing_address_1).change(),a("input#_billing_address_2").val(c.billing_address_2).change(),a("input#_billing_city").val(c.billing_city).change(),a("input#_billing_postcode").val(c.billing_postcode).change(),a("#_billing_country").val(c.billing_country).change().trigger("chosen:updated"),a("#_billing_state").val(c.billing_state).change().trigger("chosen:updated"),a("input#_billing_email").val(c.billing_email).change(),a("input#_billing_phone").val(c.billing_phone).change()),a(".edit_address").unblock()}})}return!1}),a("button.load_customer_shipping").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_shipping)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"shipping",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_shipping_first_name").val(c.shipping_first_name).change(),a("input#_shipping_last_name").val(c.shipping_last_name).change(),a("input#_shipping_company").val(c.shipping_company).change(),a("input#_shipping_address_1").val(c.shipping_address_1).change(),a("input#_shipping_address_2").val(c.shipping_address_2).change(),a("input#_shipping_city").val(c.shipping_city).change(),a("input#_shipping_postcode").val(c.shipping_postcode).change(),a("#_shipping_country").val(c.shipping_country).change().trigger("chosen:updated"),a("#_shipping_state").val(c.shipping_state).change().trigger("chosen:updated")),a(".edit_address").unblock()}})}return!1}),a("button.billing-same-as-shipping").on("click",function(){return window.confirm(woocommerce_admin_meta_boxes.copy_billing)&&(a("input#_shipping_first_name").val(a("input#_billing_first_name").val()).change(),a("input#_shipping_last_name").val(a("input#_billing_last_name").val()).change(),a("input#_shipping_company").val(a("input#_billing_company").val()).change(),a("input#_shipping_address_1").val(a("input#_billing_address_1").val()).change(),a("input#_shipping_address_2").val(a("input#_billing_address_2").val()).change(),a("input#_shipping_city").val(a("input#_billing_city").val()).change(),a("input#_shipping_postcode").val(a("input#_billing_postcode").val()).change(),a("#_shipping_country").val(a("#_billing_country").val()).change().trigger("chosen:updated"),a("#_shipping_state").val(a("#_billing_state").val()).change().trigger("chosen:updated")),!1}),a(".totals_group").on("click","a.add_total_row",function(){return a(this).closest(".totals_group").find(".total_rows").append(a(this).data("row")),!1}),a(".total_rows").on("click","a.delete_total_row",function(){var b=a(this).closest(".total_row"),c=b.attr("data-order_item_id");return c?b.append('').hide():b.remove(),!1}),a("#woocommerce-order-notes").on("click","a.add_note",function(){if(a("textarea#add_order_note").val()){a("#woocommerce-order-notes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b={action:"woocommerce_add_order_note",post_id:woocommerce_admin_meta_boxes.post_id,note:a("textarea#add_order_note").val(),note_type:a("select#order_note_type").val(),security:woocommerce_admin_meta_boxes.add_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,b,function(b){a("ul.order_notes").prepend(b),a("#woocommerce-order-notes").unblock(),a("#add_order_note").val("")}),!1}}).on("click","a.delete_note",function(){var b=a(this).closest("li.note");a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_delete_order_note",note_id:a(b).attr("rel"),security:woocommerce_admin_meta_boxes.delete_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(){a(b).remove()}),!1}),a(".woocommerce_order_items").stupidtable()}); \ No newline at end of file +jQuery(function(a){function b(){a("#woocommerce-order-items").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}function c(){a("#woocommerce-order-items").unblock()}function d(){a("#tiptip_holder").removeAttr("style"),a("#tiptip_arrow").removeAttr("style"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}function e(){var e={order_id:woocommerce_admin_meta_boxes.post_id,action:"woocommerce_load_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}a("#woocommerce-order-actions input, #woocommerce-order-actions a").click(function(){window.onbeforeunload=""}),a("a.edit_address").click(function(b){b.preventDefault(),a(this).hide(),a(this).closest(".order_data_column").find("div.address").hide(),a(this).closest(".order_data_column").find("div.edit_address").show()});var f=null,g={};"undefined"!=typeof woocommerce_admin_meta_boxes_order&&"undefined"!=typeof woocommerce_admin_meta_boxes_order.countries&&(f=a.parseJSON(woocommerce_admin_meta_boxes_order.countries.replace(/"/g,'"'))),a(".js_field-country").chosen(g).change(function(b,c){if("undefined"==typeof c&&(c=!1),null!==f){var d=a(this),e=d.val(),h=d.parents(".edit_address").find(".js_field-state"),i=h.parent(),j=h.attr("name"),k=h.attr("id"),l=d.data("woocommerce.stickState-"+e)?d.data("woocommerce.stickState-"+e):h.val(),m=h.attr("placeholder");if(c&&d.data("woocommerce.stickState-"+e,l),i.show().find(".chosen-container").remove(),a.isEmptyObject(f[e]))h.replaceWith('');else{var n=a(''),o=f[e];n.append(a('")),a.each(o,function(b){n.append(a('"))}),n.val(l),h.replaceWith(n),n.show().chosen(g).hide().trigger("chosen:updated")}a("body").trigger("contry-change.woocommerce",[e,a(this).closest("div")])}}).trigger("change",[!0]),a("body").on("change","select.js_field-state",function(){var b=a(this),c=b.val(),d=b.parents(".edit_address").find(".js_field-country"),e=d.val();d.data("woocommerce.stickState-"+e,c)}).on("click","a.edit-order-item",function(){return a(this).closest("tr").find(".view").hide(),a(this).closest("tr").find(".edit").show(),a(this).hide(),a("button.add-line-item").click(),a("button.cancel-action").attr("data-reload",!0),!1}).on("click",".woocommerce_order_items a.delete-order-item",function(){var d=window.confirm(woocommerce_admin_meta_boxes.remove_item_notice);if(d){var e=a(this).closest("tr.item, tr.fee, tr.shipping"),f=e.attr("data-order_item_id");b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){e.remove(),c()}})}return!1}).on("click","#order_refunds .delete_refund",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_refund)){var c=a(this).closest("tr.refund"),d=c.attr("data-order_refund_id");b();var f={action:"woocommerce_delete_refund",refund_id:d,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(){e()}})}return!1}).on("change",".woocommerce_order_items input.quantity",function(){var b=a(this).closest("tr.item"),c=a(this).val(),d=a(this).attr("data-qty"),e=a("input.line_total",b),f=a("input.line_subtotal",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/d;e.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var h=accounting.unformat(f.attr("data-subtotal"),woocommerce_admin.mon_decimal_point)/d;f.val(parseFloat(accounting.formatNumber(h*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/d;e>0&&b.val(parseFloat(accounting.formatNumber(e*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point));var f=a("input.line_subtotal_tax",a(this)),g=accounting.unformat(f.attr("data-subtotal_tax"),woocommerce_admin.mon_decimal_point)/d;g>0&&f.val(parseFloat(accounting.formatNumber(g*c,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("quantity_changed")}).on("change",".woocommerce_order_items input.refund_order_item_qty",function(){var b=a(this).closest("tr.item"),c=b.find("input.quantity").val(),d=a(this).val(),e=a("input.line_total",b),f=a("input.refund_line_total",b),g=accounting.unformat(e.attr("data-total"),woocommerce_admin.mon_decimal_point)/c;f.val(parseFloat(accounting.formatNumber(g*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point)),a("td.line_tax",b).each(function(){var b=a("input.line_tax",a(this)),e=a("input.refund_line_tax",a(this)),f=accounting.unformat(b.attr("data-total_tax"),woocommerce_admin.mon_decimal_point)/c;f>0&&e.val(parseFloat(accounting.formatNumber(f*d,woocommerce_admin_meta_boxes.rounding_precision,"")).toString().replace(".",woocommerce_admin.mon_decimal_point))}),a(this).trigger("refund_quantity_changed")}).on("change",".woocommerce_order_items .refund input",function(){var b=0,c=a(".woocommerce_order_items").find("tr.item, tr.fee, tr.shipping");c.each(function(){var c=a(this),d=c.find(".refund input:not(.refund_order_item_qty)");d.each(function(c,d){b+=parseFloat(accounting.unformat(a(d).val()||0,woocommerce_admin.mon_decimal_point))})}),a("#refund_amount").val(accounting.formatNumber(b,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change()}).on("click",".woocommerce_order_items button.add_order_item_meta",function(){var d=a(this),e=d.closest("tr.item"),f={order_item_id:e.attr("data-order_item_id"),action:"woocommerce_add_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:f,type:"POST",success:function(a){e.find("tbody.meta_items").append(a),c()}}),!1}).on("click",".woocommerce_order_items button.remove_order_item_meta",function(){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_meta)){var d=a(this).closest("tr"),e={meta_id:d.attr("data-meta_id"),action:"woocommerce_remove_order_item_meta",security:woocommerce_admin_meta_boxes.order_item_nonce};b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(){d.hide(),c()}})}return!1}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){var b=a(this).next();(""===b.val()||b.is(".match-total"))&&b.val(a(this).val()).addClass("match-total")}).on("keyup",".woocommerce_order_items .split-input input:eq(0)",function(){a(this).removeClass("match-total")}),a("#woocommerce-order-items").on("click","button.add-line-item",function(){return a("div.wc-order-add-item").slideDown(),a("div.wc-order-bulk-actions").slideUp(),!1}).on("click","button.refund-items",function(){return a("div.wc-order-refund-items").slideDown(),a("div.wc-order-bulk-actions").slideUp(),a("div.wc-order-totals-items").slideUp(),a("#woocommerce-order-items div.refund").show(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").hide(),!1}).on("click",".cancel-action",function(){return a(this).closest("div.wc-order-data-row").slideUp(),a("div.wc-order-bulk-actions").slideDown(),a("div.wc-order-totals-items").slideDown(),a("#woocommerce-order-items div.refund").hide(),a(".wc-order-edit-line-item .wc-order-edit-line-item-actions").show(),"true"===a(this).attr("data-reload")&&e(),!1}).on("click","button.add-order-item",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-products"}),!1}).on("click","button.add-order-fee",function(){b();var d={action:"woocommerce_add_order_fee",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_fee_line_items").append(b),c()}),!1}).on("click","button.add-order-shipping",function(){b();var d={action:"woocommerce_add_order_shipping",order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,d,function(b){a("table.woocommerce_order_items tbody#order_shipping_line_items").append(b),c()}),!1}).on("click","button.add-order-tax",function(){return a(this).WCBackboneModal({template:"#wc-modal-add-tax"}),!1}).on("click","input.check-column",function(){a(this).is(":checked")?a("#woocommerce-order-items").find(".check-column input").attr("checked","checked"):a("#woocommerce-order-items").find(".check-column input").removeAttr("checked")}).on("click",".do_bulk_action",function(){var d=a(this).closest(".bulk-actions").find("select").val(),e=a("#woocommerce-order-items").find(".check-column input:checked"),f=[];if(a(e).each(function(){var b=a(this).closest("tr");b.attr("data-order_item_id")&&f.push(b.attr("data-order_item_id"))}),0===f.length)return void window.alert(woocommerce_admin_meta_boxes.i18n_select_items);if("delete"===d){if(window.confirm(woocommerce_admin_meta_boxes.remove_item_notice)){b();var g={order_item_ids:f,action:"woocommerce_remove_order_item",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(){a(e).each(function(){a(this).closest("tr").remove()}),c()}})}}else if("reduce_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_reduce_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}else if("increase_stock"===d){b();var h={};a(e).each(function(){var b=a(this).closest("tr.item, tr.fee"),c=b.find("input.quantity");h[b.attr("data-order_item_id")]=c.val()});var g={order_id:woocommerce_admin_meta_boxes.post_id,order_item_ids:f,order_item_qty:h,action:"woocommerce_increase_order_item_stock",security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:g,type:"POST",success:function(a){window.alert(a),c()}})}return!1}).on("click","button.calculate-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_totals)){b();var c=0,d=0,e=0;a(".woocommerce_order_items tr.shipping input.line_total").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),e+=parseFloat(b)}),a(".woocommerce_order_items input.line_tax").each(function(){var b=a(this).val()||"0";b=accounting.unformat(b,woocommerce_admin.mon_decimal_point),d+=parseFloat(b)}),a(".woocommerce_order_items tr.item, .woocommerce_order_items tr.fee").each(function(){var b=a(this).find("input.line_total").val()||"0";c+=accounting.unformat(b.replace(",","."))}),"yes"===woocommerce_admin_meta_boxes.round_at_subtotal&&(d=parseFloat(accounting.toFixed(d,woocommerce_admin_meta_boxes.rounding_precision))),a("#_order_total").val(accounting.formatNumber(c+d+e,woocommerce_admin_meta_boxes.currency_format_num_decimals,"",woocommerce_admin.mon_decimal_point)).change(),a("button.save-action").click()}return!1}).on("click","button.save-action",function(){var e={order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),action:"woocommerce_save_order_items",security:woocommerce_admin_meta_boxes.order_item_nonce};return b(),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c(),a(".woocommerce_order_items").stupidtable()}}),a(this).trigger("items_saved"),!1}).on("click","a.delete-order-tax",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_delete_tax)){b();var e={action:"woocommerce_remove_order_tax",rate_id:a(this).attr("data-rate_id"),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:e,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}).on("click","button.calculate-tax-action",function(){if(window.confirm(woocommerce_admin_meta_boxes.calc_line_taxes)){b();var e=a("#_shipping_country").val(),f=a("#_billing_country").val(),g=woocommerce_admin_meta_boxes.base_country,h="",i="",j="";e?(g=e,h=a("#_shipping_state").val(),i=a("#_shipping_postcode").val(),j=a("#_shipping_city").val()):f&&(g=f,h=a("#_billing_state").val(),i=a("#_billing_postcode").val(),j=a("#_billing_city").val());var k={action:"woocommerce_calc_line_taxes",order_id:woocommerce_admin_meta_boxes.post_id,items:a("table.woocommerce_order_items :input[name], .wc-order-totals-items :input[name]").serialize(),country:g,state:h,postcode:i,city:j,security:woocommerce_admin_meta_boxes.calc_totals_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:k,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}return!1}),a("body").on("change keyup",".wc-order-refund-items #refund_amount",function(){var b=accounting.unformat(a(this).val(),woocommerce_admin.mon_decimal_point);a("button .wc-order-refund-amount .amount").text(accounting.formatMoney(b,{symbol:woocommerce_admin_meta_boxes.currency_format_symbol,decimal:woocommerce_admin_meta_boxes.currency_format_decimal_sep,thousand:woocommerce_admin_meta_boxes.currency_format_thousand_sep,precision:woocommerce_admin_meta_boxes.currency_format_num_decimals,format:woocommerce_admin_meta_boxes.currency_format}))}).on("click",".wc-order-refund-items button.do-api-refund, .wc-order-refund-items button.do-manual-refund",function(){if(b(),window.confirm(woocommerce_admin_meta_boxes.i18n_do_refund)){var d=a("input#refund_amount").val(),f=a("input#refund_reason").val(),g={},h={},i={};a(".refund input.refund_order_item_qty").each(function(b,c){a(c).closest("tr").data("order_item_id")&&c.value&&(g[a(c).closest("tr").data("order_item_id")]=c.value)}),a(".refund input.refund_line_total").each(function(b,c){a(c).closest("tr").data("order_item_id")&&(h[a(c).closest("tr").data("order_item_id")]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point))}),a(".refund input.refund_line_tax").each(function(b,c){if(a(c).closest("tr").data("order_item_id")){var d=a(c).data("tax_id");i[a(c).closest("tr").data("order_item_id")]||(i[a(c).closest("tr").data("order_item_id")]={}),i[a(c).closest("tr").data("order_item_id")][d]=accounting.unformat(c.value,woocommerce_admin.mon_decimal_point)}});var j={action:"woocommerce_refund_line_items",order_id:woocommerce_admin_meta_boxes.post_id,refund_amount:d,refund_reason:f,line_item_qtys:JSON.stringify(g,null,""),line_item_totals:JSON.stringify(h,null,""),line_item_tax_totals:JSON.stringify(i,null,""),api_refund:a(this).is(".do-api-refund"),restock_refunded_items:a("#restock_refunded_items:checked").size()?"true":"false",security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,j,function(a){a===!0?e():a.error?(window.alert(a.error),c()):console.log(a)})}else c()}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-products"===f){var g=a("select#add_item_id").val();if(g){var h=g.length;b(),a.each(g,function(b,e){var f={action:"woocommerce_add_order_item",item_to_add:e,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,f,function(b){a("table.woocommerce_order_items tbody#order_line_items").append(b),--h||(a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","").val(""),d(),a("select#add_item_id").trigger("chosen:updated"),c())})})}else a("select#add_item_id, #add_item_id_chosen .chosen-choices").css("border-color","red")}}),a("body").on("wc_backbone_modal_response",function(e,f){if("#wc-modal-add-tax"===f){var g=a("#manual_tax_rate_id").val(),h=a("input[name=add_order_tax]:checked").val();if(g&&(h=g),!h)return!1;var i=a(".order-tax-id").map(function(){return a(this).val()}).get();if(-1===a.inArray(h,i)){b();var j={action:"woocommerce_add_order_tax",rate_id:h,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.order_item_nonce};a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:j,type:"POST",success:function(b){a("#woocommerce-order-items .inside").empty(),a("#woocommerce-order-items .inside").append(b),d(),c()}})}else window.alert(woocommerce_admin_meta_boxes.i18n_tax_rate_already_exists)}}),a("span.inline_total").closest(".totals_group").find("input").change(),a(".order_download_permissions").on("click","button.grant_access",function(){var b=a("select#grant_access_id").val();if(b){a(".order_download_permissions").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_grant_access_to_download",product_ids:b,loop:a(".order_download_permissions .wc-metabox").size(),order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.grant_access_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(b){b?a(".order_download_permissions .wc-metaboxes").append(b):window.alert(woocommerce_admin_meta_boxes.i18n_download_permission_fail),a(".date-picker").datepicker({dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,showOn:"button",buttonImage:woocommerce_admin_meta_boxes.calendar_image,buttonImageOnly:!0}),a("#grant_access_id").val("").trigger("chosen:updated"),a(".order_download_permissions").unblock()}),!1}}).on("click","button.revoke_access",function(){if(window.confirm(woocommerce_admin_meta_boxes.i18n_permission_revoke)){var b=a(this).parent().parent(),c=a(this).attr("rel").split(",")[0],d=a(this).attr("rel").split(",")[1];if(c>0){a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var e={action:"woocommerce_revoke_access_to_download",product_id:c,download_id:d,order_id:woocommerce_admin_meta_boxes.post_id,security:woocommerce_admin_meta_boxes.revoke_access_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,e,function(){a(b).fadeOut("300",function(){a(b).remove()})})}else a(b).fadeOut("300",function(){a(b).remove()})}return!1}),a("button.load_customer_billing").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_billing)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"billing",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_billing_first_name").val(c.billing_first_name).change(),a("input#_billing_last_name").val(c.billing_last_name).change(),a("input#_billing_company").val(c.billing_company).change(),a("input#_billing_address_1").val(c.billing_address_1).change(),a("input#_billing_address_2").val(c.billing_address_2).change(),a("input#_billing_city").val(c.billing_city).change(),a("input#_billing_postcode").val(c.billing_postcode).change(),a("#_billing_country").val(c.billing_country).change().trigger("chosen:updated"),a("#_billing_state").val(c.billing_state).change().trigger("chosen:updated"),a("input#_billing_email").val(c.billing_email).change(),a("input#_billing_phone").val(c.billing_phone).change()),a(".edit_address").unblock()}})}return!1}),a("button.load_customer_shipping").on("click",function(){if(window.confirm(woocommerce_admin_meta_boxes.load_shipping)){var b=a("#customer_user").val();if(!b)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;var c={user_id:b,type_to_load:"shipping",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce};a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:c,type:"POST",success:function(b){var c=b;c&&(a("input#_shipping_first_name").val(c.shipping_first_name).change(),a("input#_shipping_last_name").val(c.shipping_last_name).change(),a("input#_shipping_company").val(c.shipping_company).change(),a("input#_shipping_address_1").val(c.shipping_address_1).change(),a("input#_shipping_address_2").val(c.shipping_address_2).change(),a("input#_shipping_city").val(c.shipping_city).change(),a("input#_shipping_postcode").val(c.shipping_postcode).change(),a("#_shipping_country").val(c.shipping_country).change().trigger("chosen:updated"),a("#_shipping_state").val(c.shipping_state).change().trigger("chosen:updated")),a(".edit_address").unblock()}})}return!1}),a("button.billing-same-as-shipping").on("click",function(){return window.confirm(woocommerce_admin_meta_boxes.copy_billing)&&(a("input#_shipping_first_name").val(a("input#_billing_first_name").val()).change(),a("input#_shipping_last_name").val(a("input#_billing_last_name").val()).change(),a("input#_shipping_company").val(a("input#_billing_company").val()).change(),a("input#_shipping_address_1").val(a("input#_billing_address_1").val()).change(),a("input#_shipping_address_2").val(a("input#_billing_address_2").val()).change(),a("input#_shipping_city").val(a("input#_billing_city").val()).change(),a("input#_shipping_postcode").val(a("input#_billing_postcode").val()).change(),a("#_shipping_country").val(a("#_billing_country").val()).change().trigger("chosen:updated"),a("#_shipping_state").val(a("#_billing_state").val()).change().trigger("chosen:updated")),!1}),a(".totals_group").on("click","a.add_total_row",function(){return a(this).closest(".totals_group").find(".total_rows").append(a(this).data("row")),!1}),a(".total_rows").on("click","a.delete_total_row",function(){var b=a(this).closest(".total_row"),c=b.attr("data-order_item_id");return c?b.append('').hide():b.remove(),!1}),a("#woocommerce-order-notes").on("click","a.add_note",function(){if(a("textarea#add_order_note").val()){a("#woocommerce-order-notes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b={action:"woocommerce_add_order_note",post_id:woocommerce_admin_meta_boxes.post_id,note:a("textarea#add_order_note").val(),note_type:a("select#order_note_type").val(),security:woocommerce_admin_meta_boxes.add_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,b,function(b){a("ul.order_notes").prepend(b),a("#woocommerce-order-notes").unblock(),a("#add_order_note").val("")}),!1}}).on("click","a.delete_note",function(){var b=a(this).closest("li.note");a(b).block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_delete_order_note",note_id:a(b).attr("rel"),security:woocommerce_admin_meta_boxes.delete_order_note_nonce};return a.post(woocommerce_admin_meta_boxes.ajax_url,c,function(){a(b).remove()}),!1}),a(".woocommerce_order_items").stupidtable()}); \ No newline at end of file diff --git a/assets/js/frontend/country-select.js b/assets/js/frontend/country-select.js index 9c4ce1a1709..cdcd57808f0 100644 --- a/assets/js/frontend/country-select.js +++ b/assets/js/frontend/country-select.js @@ -20,7 +20,7 @@ jQuery( function( $ ) { placeholder = $statebox.attr( 'placeholder' ); if ( states[ country ] ) { - if ( states[ country ].length === 0 ) { + if ( $.isEmptyObject( states[ country ] ) ) { $statebox.parent().hide().find( '.chosen-container' ).remove(); $statebox.replaceWith( '' ); diff --git a/assets/js/frontend/country-select.min.js b/assets/js/frontend/country-select.min.js index 4fffbfb7dbd..d2b86684d3e 100644 --- a/assets/js/frontend/country-select.min.js +++ b/assets/js/frontend/country-select.min.js @@ -1 +1 @@ -jQuery(function(a){if("undefined"==typeof wc_country_select_params)return!1;var b=wc_country_select_params.countries.replace(/"/g,'"'),c=a.parseJSON(b);a("select.country_to_state, input.country_to_state").change(function(){var b=a(this).val(),d=a(this).closest("div").find("#billing_state, #shipping_state, #calc_shipping_state"),e=d.parent(),f=d.attr("name"),g=d.attr("id"),h=d.val(),i=d.attr("placeholder");if(c[b])if(0===c[b].length)d.parent().hide().find(".chosen-container").remove(),d.replaceWith(''),a("body").trigger("country_to_state_changed",[b,a(this).closest("div")]);else{var j="",k=c[b];for(var l in k)k.hasOwnProperty(l)&&(j=j+'");d.parent().show(),d.is("input")&&(d.replaceWith(''),d=a(this).closest("div").find("#billing_state, #shipping_state, #calc_shipping_state")),d.html('"+j),d.val(h),a("body").trigger("country_to_state_changed",[b,a(this).closest("div")])}else d.is("select")?(e.show().find(".chosen-container").remove(),d.replaceWith(''),a("body").trigger("country_to_state_changed",[b,a(this).closest("div")])):d.is(".hidden")&&(e.show().find(".chosen-container").remove(),d.replaceWith(''),a("body").trigger("country_to_state_changed",[b,a(this).closest("div")]));a("body").trigger("country_to_state_changing",[b,a(this).closest("div")])}),a(function(){a("select.country_to_state, input.country_to_state").change()})}); \ No newline at end of file +jQuery(function(a){if("undefined"==typeof wc_country_select_params)return!1;var b=wc_country_select_params.countries.replace(/"/g,'"'),c=a.parseJSON(b);a("select.country_to_state, input.country_to_state").change(function(){var b=a(this).val(),d=a(this).closest("div").find("#billing_state, #shipping_state, #calc_shipping_state"),e=d.parent(),f=d.attr("name"),g=d.attr("id"),h=d.val(),i=d.attr("placeholder");if(c[b])if(a.isEmptyObject(c[b]))d.parent().hide().find(".chosen-container").remove(),d.replaceWith(''),a("body").trigger("country_to_state_changed",[b,a(this).closest("div")]);else{var j="",k=c[b];for(var l in k)k.hasOwnProperty(l)&&(j=j+'");d.parent().show(),d.is("input")&&(d.replaceWith(''),d=a(this).closest("div").find("#billing_state, #shipping_state, #calc_shipping_state")),d.html('"+j),d.val(h),a("body").trigger("country_to_state_changed",[b,a(this).closest("div")])}else d.is("select")?(e.show().find(".chosen-container").remove(),d.replaceWith(''),a("body").trigger("country_to_state_changed",[b,a(this).closest("div")])):d.is(".hidden")&&(e.show().find(".chosen-container").remove(),d.replaceWith(''),a("body").trigger("country_to_state_changed",[b,a(this).closest("div")]));a("body").trigger("country_to_state_changing",[b,a(this).closest("div")])}),a(function(){a("select.country_to_state, input.country_to_state").change()})}); \ No newline at end of file From 0e3cb2498ea7a4bcfb8c74618ce562d5a42c4122 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 10 Dec 2014 16:46:25 +0000 Subject: [PATCH 383/743] set timezone_name_from_abbr 3rd arg to 0 Closes #6897 --- includes/wc-formatting-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/wc-formatting-functions.php b/includes/wc-formatting-functions.php index 883a20d20fc..39c3fd2fda7 100644 --- a/includes/wc-formatting-functions.php +++ b/includes/wc-formatting-functions.php @@ -420,7 +420,7 @@ function wc_timezone_string() { $utc_offset *= 3600; // attempt to guess the timezone string from the UTC offset - $timezone = timezone_name_from_abbr( '', $utc_offset, -1 ); + $timezone = timezone_name_from_abbr( '', $utc_offset, 0 ); // last try, guess timezone string manually if ( false === $timezone ) { From fd15ac4c646c2368ba43b69e7e017ecab6e90e15 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 10 Dec 2014 16:54:08 +0000 Subject: [PATCH 384/743] Allow a cancelled order to be marked paid, if there is a payment delay Closes #6810 --- includes/abstracts/abstract-wc-order.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/abstracts/abstract-wc-order.php b/includes/abstracts/abstract-wc-order.php index 2552c52453f..f934a19240e 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -2124,7 +2124,7 @@ abstract class WC_Abstract_Order { unset( WC()->session->order_awaiting_payment ); } - $valid_order_statuses = apply_filters( 'woocommerce_valid_order_statuses_for_payment_complete', array( 'on-hold', 'pending', 'failed' ), $this ); + $valid_order_statuses = apply_filters( 'woocommerce_valid_order_statuses_for_payment_complete', array( 'on-hold', 'pending', 'failed', 'cancelled' ), $this ); if ( $this->id && $this->has_status( $valid_order_statuses ) ) { From cb7cd8f765398a80a0f5e25c448719832172b2ee Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 10 Dec 2014 15:04:57 -0200 Subject: [PATCH 385/743] Fixed the process order status method in simplify commerce --- .../class-wc-gateway-simplify-commerce.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php b/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php index b8490670525..cd8e7d99775 100644 --- a/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php +++ b/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php @@ -336,7 +336,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { 'card.addressZip' => $order->billing_postcode ) ); - $order_complete = $this->process_order_status( $payment->id, $payment->paymentStatus, $payment->authCode ); + $order_complete = $this->process_order_status( $order, $payment->id, $payment->paymentStatus, $payment->authCode ); if ( $order_complete ) { // Return thank you page redirect @@ -436,7 +436,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { } /** - * Return handler for Hosted Payments. + * Return handler for Hosted Payments */ public function return_handler() { @ob_clean(); @@ -444,11 +444,11 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { if ( isset( $_REQUEST['reference'] ) && isset( $_REQUEST['paymentId'] ) && isset( $_REQUEST['signature'] ) ) { $signature = strtoupper( md5( $_REQUEST['amount'] . $_REQUEST['reference'] . $_REQUEST['paymentId'] . $_REQUEST['paymentDate'] . $_REQUEST['paymentStatus'] . $this->private_key ) ); - $order_id = asbint( $_REQUEST['reference'] ); + $order_id = absint( $_REQUEST['reference'] ); $order = wc_get_order( $order_id ); if ( $signature === $_REQUEST['signature'] ) { - $order_complete = $this->process_order_status( $_REQUEST['paymentId'], $_REQUEST['paymentStatus'], $_REQUEST['paymentDate'] ); + $order_complete = $this->process_order_status( $order, $_REQUEST['paymentId'], $_REQUEST['paymentStatus'], $_REQUEST['paymentDate'] ); if ( ! $order_complete ) { $order->update_status( 'failed', __( 'Payment was declined by Simplify Commerce.', 'woocommerce' ) ); @@ -464,15 +464,16 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { } /** - * Process the order status. + * Process the order status * - * @param string $payment_id - * @param string $status - * @param string $auth_code + * @param WC_Order $order + * @param string $payment_id + * @param string $status + * @param string $auth_code * * @return bool */ - public function process_order_status( $payment_id, $status, $auth_code ) { + public function process_order_status( $order, $payment_id, $status, $auth_code ) { if ( 'APPROVED' == $status ) { // Payment complete $order->payment_complete( $payment_id ); From a5d70fa24c10d0277dc4c2b2edd9d23ff5eb8f8f Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 10 Dec 2014 15:23:36 -0200 Subject: [PATCH 386/743] Fixed API products when save multiple images from the media library, closes #6792 --- includes/api/class-wc-api-products.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/api/class-wc-api-products.php b/includes/api/class-wc-api-products.php index 5a39d4f2327..bc183c7ca7a 100644 --- a/includes/api/class-wc-api-products.php +++ b/includes/api/class-wc-api-products.php @@ -1604,9 +1604,11 @@ class WC_API_Products extends WC_API_Resource { if ( is_wp_error( $upload ) ) { return new WP_Error( 'woocommerce_api_cannot_upload_product_image', $upload->get_error_message(), array( 'status' => 400 ) ); } - } - $gallery[] = $this->set_product_image_as_attachment( $upload, $id ); + $gallery[] = $this->set_product_image_as_attachment( $upload, $id ); + } else { + $gallery[] = $attachment_id; + } } } From 7450828304524f39c6bdf5ee73fc855721155d42 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 10 Dec 2014 15:40:18 -0200 Subject: [PATCH 387/743] Show the shipping calculator only in cart page --- templates/cart/cart-shipping.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/cart/cart-shipping.php b/templates/cart/cart-shipping.php index 821260d3393..f2e0da5ba90 100644 --- a/templates/cart/cart-shipping.php +++ b/templates/cart/cart-shipping.php @@ -98,6 +98,8 @@ if ( ! defined( 'ABSPATH' ) ) { ?> - + + + From 51c5c65c9acc3b28e7f5aea401c9b88233517ed2 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 10 Dec 2014 15:47:35 -0200 Subject: [PATCH 388/743] [Tests] removed deprecated tax method --- tests/unit-tests/tax.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tests/unit-tests/tax.php b/tests/unit-tests/tax.php index b96d2696317..5e87d153e53 100644 --- a/tests/unit-tests/tax.php +++ b/tests/unit-tests/tax.php @@ -244,13 +244,6 @@ class WC_Tests_Tax extends WC_Unit_Test_Case { WC_Tax::_delete_tax_rate( $tax_rate_id ); } - /** - * Customer Location - */ - public function test_get_customer_location() { - $this->assertEquals( WC_Tax::get_customer_location(), array( 'GB', '', '', '' ) ); - } - /** * Test rate labels */ From 130ddb2b5647f791e4a5782ffccf9cdb99d14353 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 10 Dec 2014 16:09:01 -0200 Subject: [PATCH 389/743] [Tests] Fixed the tests for wc_timezone_string() --- tests/unit-tests/formatting-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit-tests/formatting-functions.php b/tests/unit-tests/formatting-functions.php index 378ae0a6a3b..0d607d349dd 100644 --- a/tests/unit-tests/formatting-functions.php +++ b/tests/unit-tests/formatting-functions.php @@ -423,7 +423,7 @@ class WC_Tests_Formatting_Functions extends WC_Unit_Test_Case { // test with manually set UTC offset update_option( 'gmt_offset', -4 ); - $this->assertEquals( 'America/Boa_Vista', wc_timezone_string() ); + $this->assertEquals( 'America/Halifax', wc_timezone_string() ); // test with invalid offset update_option( 'gmt_offset', 99 ); From 53b1c6642708086036a8ceb69b40bf97ec3f9c1d Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 10 Dec 2014 16:28:30 -0200 Subject: [PATCH 390/743] [API] Added parent_id in products endpoint, closes #6786 --- includes/api/class-wc-api-products.php | 6 ++++++ readme.txt | 1 + 2 files changed, 7 insertions(+) diff --git a/includes/api/class-wc-api-products.php b/includes/api/class-wc-api-products.php index bc183c7ca7a..ce664235324 100644 --- a/includes/api/class-wc-api-products.php +++ b/includes/api/class-wc-api-products.php @@ -567,6 +567,7 @@ class WC_API_Products extends WC_API_Resource { 'related_ids' => array_map( 'absint', array_values( $product->get_related() ) ), 'upsell_ids' => array_map( 'absint', $product->get_upsells() ), 'cross_sell_ids' => array_map( 'absint', $product->get_cross_sells() ), + 'parent_id' => $product->post->post_parent, 'categories' => wp_get_post_terms( $product->id, 'product_cat', array( 'fields' => 'names' ) ), 'tags' => wp_get_post_terms( $product->id, 'product_tag', array( 'fields' => 'names' ) ), 'images' => $this->get_images( $product ), @@ -871,6 +872,11 @@ class WC_API_Products extends WC_API_Resource { } } + // Product parent ID for groups + if ( isset( $data['parent_id'] ) ) { + wp_update_post( array( 'ID' => $id, 'post_parent' => absint( $data['parent_id'] ) ) ); + } + // Update parent if grouped so price sorting works and stays in sync with the cheapest child $_product = wc_get_product( $id ); if ( $_product->post->post_parent > 0 || $product_type == 'grouped' ) { diff --git a/readme.txt b/readme.txt index 7d2dc95de72..a796cd9b39a 100644 --- a/readme.txt +++ b/readme.txt @@ -162,6 +162,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Tweak - Added 'stupidtable' script to allow order item sorting on the order screen (by name, cost, qty). * Tweak - In the cart, add variation selected data to the permalink. * Dev - API - Look up product by sku. +* Dev - API - New parent_id param for products API. * Dev - Made template debug mode set WC_TEMPLATE_DEBUG_MODE constant and remove all overrides for all template loading functions. * Dev - Switched to .scss from .less for all styles. * Dev - Included bourbon for scss mixins. From ff86dec2846d6576469c3f4f7f85a4e125cbf45c Mon Sep 17 00:00:00 2001 From: boolah Date: Wed, 10 Dec 2014 21:43:26 +0000 Subject: [PATCH 391/743] Make custom event 'woocommerce_variation_select_change' for theme developers as last thing we trigger. #6833 --- assets/js/frontend/add-to-cart-variation.js | 7 ++++--- assets/js/frontend/add-to-cart-variation.min.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/js/frontend/add-to-cart-variation.js b/assets/js/frontend/add-to-cart-variation.js index a78496efddb..4b601d280c1 100644 --- a/assets/js/frontend/add-to-cart-variation.js +++ b/assets/js/frontend/add-to-cart-variation.js @@ -76,9 +76,7 @@ else $variation_form.find( 'input[name=variation_id]' ).val( '' ).change(); - $variation_form - .trigger( 'woocommerce_variation_select_change' ) - .trigger( 'check_variations', [ '', false ] ); + $variation_form.trigger( 'check_variations', [ '', false ] ); $( this ).blur(); @@ -86,6 +84,9 @@ $.uniform.update(); } + // Custom event for when variation selection has been changed + $variation_form.trigger( 'woocommerce_variation_select_change' ); + } ) // Upon gaining focus diff --git a/assets/js/frontend/add-to-cart-variation.min.js b/assets/js/frontend/add-to-cart-variation.min.js index d1ff2ba6270..fffad0e2de6 100644 --- a/assets/js/frontend/add-to-cart-variation.min.js +++ b/assets/js/frontend/add-to-cart-variation.min.js @@ -1,4 +1,4 @@ /*! * Variations Plugin */ -!function(a,b,c,d){a.fn.wc_variation_form=function(){return a.fn.wc_variation_form.find_matching_variations=function(b,c){for(var d=[],e=0;e0?$variation_form.find("input.variation_id").val("").change():$variation_form.find("input[name=variation_id]").val("").change(),$variation_form.trigger("woocommerce_variation_select_change").trigger("check_variations",["",!1]),a(this).blur(),a().uniform&&a.isFunction(a.uniform.update)&&a.uniform.update()}).on("focusin touchstart",".variations select",function(){$variation_form=a(this).closest(".variations_form"),attribute_name="undefined"!=typeof a(this).data("attribute_name")?a(this).data("attribute_name"):a(this).attr("name"),$variation_form.trigger("woocommerce_variation_select_focusin").trigger("check_variations",[attribute_name,!0])}).on("check_variations",function(c,d,e){var f=!0,g=!1,h={},i=a(this),j=i.find(".reset_variations");i.find(".variations select").each(function(){attribute_name="undefined"!=typeof a(this).data("attribute_name")?a(this).data("attribute_name"):a(this).attr("name"),0===a(this).val().length?f=!1:g=!0,d&&attribute_name===d?(f=!1,h[attribute_name]=""):(value=a(this).val(),h[attribute_name]=value)});var k=parseInt(i.data("product_id")),l=i.data("product_variations");l||(l=b.product_variations.product_id),l||(l=b.product_variations),l||(l=b["product_variations_"+k]);var m=a.fn.wc_variation_form.find_matching_variations(l,h);if(f){var n=m.shift();n?($variation_input=i.find(i.find("input.variation_id").length>0?"input.variation_id":"input[name=variation_id]"),$variation_input.val(n.variation_id).change(),i.trigger("found_variation",[n])):(i.find(".variations select").val(""),e||i.trigger("reset_image"),alert(wc_add_to_cart_variation_params.i18n_no_matching_variations_text))}else i.trigger("update_variation_values",[m]),e||i.trigger("reset_image"),d||i.find(".single_variation_wrap").slideUp(200);g?"hidden"===j.css("visibility")&&j.css("visibility","visible").hide().fadeIn():j.css("visibility","hidden")}).on("reset_image",function(){var b=a(this).closest(".product"),c=b.find("div.images img:eq(0)"),e=b.find("div.images a.zoom:eq(0)"),f=c.attr("data-o_src"),g=c.attr("data-o_title"),h=c.attr("data-o_alt"),i=e.attr("data-o_href");f!==d&&c.attr("src",f),i!==d&&e.attr("href",i),g!==d&&(c.attr("title",g),e.attr("title",g)),h!==d&&c.attr("alt",h)}).on("update_variation_values",function(b,c){$variation_form=a(this).closest(".variations_form"),$variation_form.find(".variations select").each(function(b,d){current_attr_select=a(d),current_attr_select.data("attribute_options")||current_attr_select.data("attribute_options",current_attr_select.find("option:gt(0)").get()),current_attr_select.find("option:gt(0)").remove(),current_attr_select.append(current_attr_select.data("attribute_options")),current_attr_select.find("option:gt(0)").removeClass("attached"),current_attr_select.find("option:gt(0)").removeClass("enabled"),current_attr_select.find("option:gt(0)").removeAttr("disabled"),current_attr_name="undefined"!=typeof current_attr_select.data("attribute_name")?current_attr_select.data("attribute_name"):current_attr_select.attr("name");for(var e in c)if("undefined"!=typeof c[e]){var f=c[e].attributes;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];g==current_attr_name&&(variation_active=c[e].variation_is_active?"enabled":"",h?(h=a("
    ").html(h).text(),h=h.replace(/'/g,"\\'"),h=h.replace(/"/g,'\\"'),current_attr_select.find('option[value="'+h+'"]').addClass("attached "+variation_active)):current_attr_select.find("option:gt(0)").addClass("attached "+variation_active))}}current_attr_select.find("option:gt(0):not(.attached)").remove(),current_attr_select.find("option:gt(0):not(.enabled)").attr("disabled","disabled")}),$variation_form.trigger("woocommerce_update_variation_values")}).on("found_variation",function(b,c){var e=a(this),f=a(this).closest(".product"),g=f.find("div.images img:eq(0)"),h=f.find("div.images a.zoom:eq(0)"),i=g.attr("data-o_src"),j=g.attr("data-o_title"),k=g.attr("data-o_alt"),l=h.attr("data-o_href"),m=c.image_src,n=c.image_link,o=c.image_title,p=c.image_alt;e.find(".variations_button").show(),e.find(".single_variation").html(c.price_html+c.availability_html),i===d&&(i=g.attr("src")?g.attr("src"):"",g.attr("data-o_src",i)),l===d&&(l=h.attr("href")?h.attr("href"):"",h.attr("data-o_href",l)),j===d&&(j=g.attr("title")?g.attr("title"):"",g.attr("data-o_title",j)),k===d&&(k=g.attr("alt")?g.attr("alt"):"",g.attr("data-o_alt",k)),m&&m.length>1?(g.attr("src",m).attr("alt",p).attr("title",o),h.attr("href",n).attr("title",o)):(g.attr("src",i).attr("alt",k).attr("title",j),h.attr("href",l).attr("title",j));var q=e.find(".single_variation_wrap"),r=f.find(".product_meta").find(".sku"),s=f.find(".product_weight"),t=f.find(".product_dimensions");r.attr("data-o_sku")||r.attr("data-o_sku",r.text()),s.attr("data-o_weight")||s.attr("data-o_weight",s.text()),t.attr("data-o_dimensions")||t.attr("data-o_dimensions",t.text()),r.text(c.sku?c.sku:r.attr("data-o_sku")),s.text(c.weight?c.weight:s.attr("data-o_weight")),t.text(c.dimensions?c.dimensions:t.attr("data-o_dimensions")),q.find(".quantity").show(),c.is_purchasable&&c.is_in_stock&&c.variation_is_visible||e.find(".variations_button").hide(),c.variation_is_visible||e.find(".single_variation").html("

    "+wc_add_to_cart_variation_params.i18n_unavailable_text+"

    "),c.min_qty?q.find(".quantity input.qty").attr("min",c.min_qty).val(c.min_qty):q.find(".quantity input.qty").removeAttr("min"),c.max_qty?q.find(".quantity input.qty").attr("max",c.max_qty):q.find(".quantity input.qty").removeAttr("max"),"yes"===c.is_sold_individually&&(q.find(".quantity input.qty").val("1"),q.find(".quantity").hide()),q.slideDown(200).trigger("show_variation",[c])}),$form.trigger("wc_variation_form"),$form},a(function(){return"undefined"==typeof wc_add_to_cart_variation_params?!1:(a(".variations_form").wc_variation_form(),void a(".variations_form .variations select").change())})}(jQuery,window,document); \ No newline at end of file +!function(a,b,c,d){a.fn.wc_variation_form=function(){return a.fn.wc_variation_form.find_matching_variations=function(b,c){for(var d=[],e=0;e0?$variation_form.find("input.variation_id").val("").change():$variation_form.find("input[name=variation_id]").val("").change(),$variation_form.trigger("check_variations",["",!1]),a(this).blur(),a().uniform&&a.isFunction(a.uniform.update)&&a.uniform.update(),$variation_form.trigger("woocommerce_variation_select_change")}).on("focusin touchstart",".variations select",function(){$variation_form=a(this).closest(".variations_form"),attribute_name="undefined"!=typeof a(this).data("attribute_name")?a(this).data("attribute_name"):a(this).attr("name"),$variation_form.trigger("woocommerce_variation_select_focusin").trigger("check_variations",[attribute_name,!0])}).on("check_variations",function(c,d,e){var f=!0,g=!1,h={},i=a(this),j=i.find(".reset_variations");i.find(".variations select").each(function(){attribute_name="undefined"!=typeof a(this).data("attribute_name")?a(this).data("attribute_name"):a(this).attr("name"),0===a(this).val().length?f=!1:g=!0,d&&attribute_name===d?(f=!1,h[attribute_name]=""):(value=a(this).val(),h[attribute_name]=value)});var k=parseInt(i.data("product_id")),l=i.data("product_variations");l||(l=b.product_variations.product_id),l||(l=b.product_variations),l||(l=b["product_variations_"+k]);var m=a.fn.wc_variation_form.find_matching_variations(l,h);if(f){var n=m.shift();n?($variation_input=i.find(i.find("input.variation_id").length>0?"input.variation_id":"input[name=variation_id]"),$variation_input.val(n.variation_id).change(),i.trigger("found_variation",[n])):(i.find(".variations select").val(""),e||i.trigger("reset_image"),alert(wc_add_to_cart_variation_params.i18n_no_matching_variations_text))}else i.trigger("update_variation_values",[m]),e||i.trigger("reset_image"),d||i.find(".single_variation_wrap").slideUp(200);g?"hidden"===j.css("visibility")&&j.css("visibility","visible").hide().fadeIn():j.css("visibility","hidden")}).on("reset_image",function(){var b=a(this).closest(".product"),c=b.find("div.images img:eq(0)"),e=b.find("div.images a.zoom:eq(0)"),f=c.attr("data-o_src"),g=c.attr("data-o_title"),h=c.attr("data-o_alt"),i=e.attr("data-o_href");f!==d&&c.attr("src",f),i!==d&&e.attr("href",i),g!==d&&(c.attr("title",g),e.attr("title",g)),h!==d&&c.attr("alt",h)}).on("update_variation_values",function(b,c){$variation_form=a(this).closest(".variations_form"),$variation_form.find(".variations select").each(function(b,d){current_attr_select=a(d),current_attr_select.data("attribute_options")||current_attr_select.data("attribute_options",current_attr_select.find("option:gt(0)").get()),current_attr_select.find("option:gt(0)").remove(),current_attr_select.append(current_attr_select.data("attribute_options")),current_attr_select.find("option:gt(0)").removeClass("attached"),current_attr_select.find("option:gt(0)").removeClass("enabled"),current_attr_select.find("option:gt(0)").removeAttr("disabled"),current_attr_name="undefined"!=typeof current_attr_select.data("attribute_name")?current_attr_select.data("attribute_name"):current_attr_select.attr("name");for(var e in c)if("undefined"!=typeof c[e]){var f=c[e].attributes;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];g==current_attr_name&&(variation_active=c[e].variation_is_active?"enabled":"",h?(h=a("
    ").html(h).text(),h=h.replace(/'/g,"\\'"),h=h.replace(/"/g,'\\"'),current_attr_select.find('option[value="'+h+'"]').addClass("attached "+variation_active)):current_attr_select.find("option:gt(0)").addClass("attached "+variation_active))}}current_attr_select.find("option:gt(0):not(.attached)").remove(),current_attr_select.find("option:gt(0):not(.enabled)").attr("disabled","disabled")}),$variation_form.trigger("woocommerce_update_variation_values")}).on("found_variation",function(b,c){var e=a(this),f=a(this).closest(".product"),g=f.find("div.images img:eq(0)"),h=f.find("div.images a.zoom:eq(0)"),i=g.attr("data-o_src"),j=g.attr("data-o_title"),k=g.attr("data-o_alt"),l=h.attr("data-o_href"),m=c.image_src,n=c.image_link,o=c.image_title,p=c.image_alt;e.find(".variations_button").show(),e.find(".single_variation").html(c.price_html+c.availability_html),i===d&&(i=g.attr("src")?g.attr("src"):"",g.attr("data-o_src",i)),l===d&&(l=h.attr("href")?h.attr("href"):"",h.attr("data-o_href",l)),j===d&&(j=g.attr("title")?g.attr("title"):"",g.attr("data-o_title",j)),k===d&&(k=g.attr("alt")?g.attr("alt"):"",g.attr("data-o_alt",k)),m&&m.length>1?(g.attr("src",m).attr("alt",p).attr("title",o),h.attr("href",n).attr("title",o)):(g.attr("src",i).attr("alt",k).attr("title",j),h.attr("href",l).attr("title",j));var q=e.find(".single_variation_wrap"),r=f.find(".product_meta").find(".sku"),s=f.find(".product_weight"),t=f.find(".product_dimensions");r.attr("data-o_sku")||r.attr("data-o_sku",r.text()),s.attr("data-o_weight")||s.attr("data-o_weight",s.text()),t.attr("data-o_dimensions")||t.attr("data-o_dimensions",t.text()),r.text(c.sku?c.sku:r.attr("data-o_sku")),s.text(c.weight?c.weight:s.attr("data-o_weight")),t.text(c.dimensions?c.dimensions:t.attr("data-o_dimensions")),q.find(".quantity").show(),c.is_purchasable&&c.is_in_stock&&c.variation_is_visible||e.find(".variations_button").hide(),c.variation_is_visible||e.find(".single_variation").html("

    "+wc_add_to_cart_variation_params.i18n_unavailable_text+"

    "),c.min_qty?q.find(".quantity input.qty").attr("min",c.min_qty).val(c.min_qty):q.find(".quantity input.qty").removeAttr("min"),c.max_qty?q.find(".quantity input.qty").attr("max",c.max_qty):q.find(".quantity input.qty").removeAttr("max"),"yes"===c.is_sold_individually&&(q.find(".quantity input.qty").val("1"),q.find(".quantity").hide()),q.slideDown(200).trigger("show_variation",[c])}),$form.trigger("wc_variation_form"),$form},a(function(){return"undefined"==typeof wc_add_to_cart_variation_params?!1:(a(".variations_form").wc_variation_form(),void a(".variations_form .variations select").change())})}(jQuery,window,document); \ No newline at end of file From 0213fcce85094d5d6bfdd28788e9cac3a6290e53 Mon Sep 17 00:00:00 2001 From: Bryan Purcell Date: Wed, 10 Dec 2014 17:02:43 -0600 Subject: [PATCH 392/743] Refactoring, resetting settings after test. Testing multiple combinations of store default shipping methods, moving helper methods to a unit test Helper Class. --- tests/bootstrap.php | 1 + .../helpers/class-wc-helper-customer.php | 90 +++++++++++ tests/unit-tests/customer.php | 146 ++++++++++++------ 3 files changed, 188 insertions(+), 49 deletions(-) create mode 100644 tests/framework/helpers/class-wc-helper-customer.php diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 191e0164701..41d00277b16 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -100,6 +100,7 @@ class WC_Unit_Tests_Bootstrap { require_once( $this->tests_dir . '/framework/helpers/class-wc-helper-coupon.php' ); require_once( $this->tests_dir . '/framework/helpers/class-wc-helper-fee.php' ); require_once( $this->tests_dir . '/framework/helpers/class-wc-helper-shipping.php' ); + require_once( $this->tests_dir . '/framework/helpers/class-wc-helper-customer.php' ); } /** diff --git a/tests/framework/helpers/class-wc-helper-customer.php b/tests/framework/helpers/class-wc-helper-customer.php new file mode 100644 index 00000000000..c7c698f2a71 --- /dev/null +++ b/tests/framework/helpers/class-wc-helper-customer.php @@ -0,0 +1,90 @@ +session->get( 'customer' ); + } + + /** + * Get the store's default shipping method. + * + * @return string + */ + + public static function get_default_shipping_method() { + get_option( 'woocommerce_default_shipping_method' ); + } + + + /** + * Get the user's chosen shipping method. + * + * @return array + */ + + public static function get_chosen_shipping_methods() { + return WC()->session->get( 'chosen_shipping_methods' ); + } + + /** + * Get the "Tax Based On" WooCommerce option. + * + * @return string base or billing + */ + + public static function get_tax_based_on() { + return get_option( 'woocommerce_tax_based_on' ); + } + + /** + * Set the the current customer's billing details in the session + * + * @param string $default_shipping_method Shipping Method slug + */ + + public static function set_customer_details( $customer_details ) { + WC()->session->set( 'customer', $customer_details ); + } + + /** + * Set the store's default shipping method. + * + * @param string $default_shipping_method Shipping Method slug + */ + + public static function set_default_shipping_method( $default_shipping_method ) { + update_option( 'woocommerce_default_shipping_method', $default_shipping_method ); + } + + /** + * Set the user's chosen shipping method. + * + * @param string $chosen_shipping_method Shipping Method slug + */ + + public static function set_chosen_shipping_methods( $chosen_shipping_methods ) { + WC()->session->set( 'chosen_shipping_methods', $chosen_shipping_methods ); + } + + /** + * Set the "Tax Based On" WooCommerce option. + * + * @param string $default_shipping_method Shipping Method slug + */ + + public static function set_tax_based_on( $default_shipping_method ) { + update_option( 'woocommerce_tax_based_on', $default_shipping_method ); + } +} diff --git a/tests/unit-tests/customer.php b/tests/unit-tests/customer.php index 7df36f1e853..1befe3299a3 100644 --- a/tests/unit-tests/customer.php +++ b/tests/unit-tests/customer.php @@ -23,37 +23,69 @@ class WC_Tests_Customer extends WC_Unit_Test_Case { 'calculated_shipping' => false ); - //Set up the address assertions for the two taxable addresses - $base_store_address = array( "GB", "", "", "" ); $customer_address = array( "US", "PA", "19123", "Philadelphia" ); - //Initialize the session variables + //Initialize the session variables for the dummy customer. + + // Get the original settings for the session and the options + $original_default_shipping_method = WC_Helper_Customer::get_default_shipping_method(); + $original_chosen_shipping_methods = WC_Helper_Customer::get_chosen_shipping_methods(); + $original_tax_based_on = WC_Helper_Customer::get_tax_based_on(); + $original_customer_details = WC_Helper_Customer::get_customer_details(); - WC()->session->set( 'customer', $customer_data ); + WC_Helper_Customer::set_customer_details( $customer_data ); //Create a dummy customer to use for testing! $customer = new WC_Customer(); - // Create dummy product, and add it to the cart + // Create dummy product, and add the product to the cart. $product = WC_Helper_Product::create_simple_product(); + WC()->cart->add_to_cart( $product->id, 1 ); - // Customer is going with the Local Pickup option, and the store calculates tax based on the store base location. - $this->helper_setup_shipping_tax_env( 'local_pickup', 'billing' ); - $this->assertEquals( $customer->get_taxable_address() , $base_store_address); - - // Customer is going with the Local Pickup option, and the store calculates tax based on the customer's billing address. - $this->helper_setup_shipping_tax_env( 'local_pickup', 'billing' ); - $this->assertEquals( $customer->get_taxable_address() , $base_store_address); - - // Customer is going with the Free Shipping option, and the store calculates tax based on the customer's billing address. - $this->helper_setup_shipping_tax_env( 'free_shipping', 'billing' ); - $this->assertEquals( $customer->get_taxable_address() , $customer_address); + //Run through these tests twice - with two different selections for the store's default shipping options - // Customer is going with the Free Shipping option, and the store calculates tax based on the store base location. - $this->helper_setup_shipping_tax_env( 'free_shipping', 'base' ); - $this->assertEquals( $customer->get_taxable_address() , $base_store_address); + foreach( array('local_pickup') as $default_shipping_option ) { + + WC_Helper_Customer::get_default_shipping_method( $default_shipping_option ); + + // Customer is going with the Local Pickup option, and the store calculates tax based on the store location. + + WC_Helper_Customer::set_chosen_shipping_methods( array( 'local_pickup' ) ); + WC_Helper_Customer::set_tax_based_on( 'base' ); + + $this->assertEquals( $customer->get_taxable_address(), $base_store_address ); + + // Customer is going with the Local Pickup option, and the store calculates tax based on the customer's billing address. + + WC_Helper_Customer::set_chosen_shipping_methods( array( 'local_pickup' ) ); + WC_Helper_Customer::set_tax_based_on( 'billing' ); + + $this->assertEquals( $customer->get_taxable_address(), $base_store_address ); + + // Customer is going with the Free Shipping option, and the store calculates tax based on the customer's billing address. + + WC_Helper_Customer::set_chosen_shipping_methods( array( 'free_shipping' ) ); + WC_Helper_Customer::set_tax_based_on( 'billing' ); + + $this->assertEquals( $customer->get_taxable_address(), $customer_address ); + + // Customer is going with the Free Shipping option, and the store calculates tax based on the store base location. + + WC_Helper_Customer::set_chosen_shipping_methods( array( 'free_shipping' ) ); + WC_Helper_Customer::set_tax_based_on( 'base' ); + + $this->assertEquals( $customer->get_taxable_address(), $base_store_address ); + + } + + //Reset the session and the options. + + WC_Helper_Customer::set_default_shipping_method( $original_default_shipping_method ); + WC_Helper_Customer::set_chosen_shipping_methods( $original_chosen_shipping_methods ); + WC_Helper_Customer::set_tax_based_on( $original_tax_based_on ); + WC_Helper_Customer::set_customer_details( $original_customer_details ); } /** * Test the is_customer_outside_base method @@ -79,47 +111,63 @@ class WC_Tests_Customer extends WC_Unit_Test_Case { //Initialize the session variables for the dummy customer. - WC()->session->set( 'customer', $customer_data ); + // Get the original settings for the session and the options + $original_default_shipping_method = WC_Helper_Customer::get_default_shipping_method(); + $original_chosen_shipping_methods = WC_Helper_Customer::get_chosen_shipping_methods(); + $original_tax_based_on = WC_Helper_Customer::get_tax_based_on(); + $original_customer_details = WC_Helper_Customer::get_customer_details(); + + WC_Helper_Customer::set_customer_details( $customer_data ); //Create a dummy customer to use for testing! $customer = new WC_Customer(); // Create dummy product, and add the product to the cart. $product = WC_Helper_Product::create_simple_product(); + WC()->cart->add_to_cart( $product->id, 1 ); - // Customer is going with the Local Pickup option, and the store calculates tax based on the store base location. - $this->helper_setup_shipping_tax_env( 'local_pickup', 'billing' ); - $this->assertEquals( $customer->is_customer_outside_base(), false ); - - // Customer is going with the Local Pickup option, and the store calculates tax based on the customer's billing address. - $this->helper_setup_shipping_tax_env( 'local_pickup', 'billing' ); - $this->assertEquals( $customer->is_customer_outside_base(), false ); - - // Customer is going with the Free Shipping option, and the store calculates tax based on the customer's billing address. - $this->helper_setup_shipping_tax_env( 'free_shipping', 'billing' ); - $this->assertEquals( $customer->is_customer_outside_base(), true ); - - // Customer is going with the Free Shipping option, and the store calculates tax based on the store base location. - $this->helper_setup_shipping_tax_env( 'free_shipping', 'base' ); - $this->assertEquals( $customer->is_customer_outside_base(), false ); - } + //Run through these tests twice - with two different selections for the store's default shipping options - /** - * Helper function for creating the customer and setting up the tax enviroment based on desired params. - * - * @param string $shipping_method Shipping Method slug - * @param string $tax_based_on either 'base' or 'billing.' base refers to tax computed based on the shop location, 'billing' computes tax based on the customer's billing address. - * @return void - */ + foreach( array('local_pickup', 'free_shipping') as $default_shipping_option ) { - private function helper_setup_shipping_tax_env($shipping_method, $tax_based_on) { + WC_Helper_Customer::get_default_shipping_method( $default_shipping_option ); - //Shipping Methods - update_option( 'woocommerce_default_shipping_method', $shipping_method ); - WC()->session->set( 'chosen_shipping_methods', array( $shipping_method ) ); + // Customer is going with the Local Pickup option, and the store calculates tax based on the store location. - //Tax "Based-on" Settings - update_option( 'woocommerce_tax_based_on', $tax_based_on ); + WC_Helper_Customer::set_chosen_shipping_methods( array( 'local_pickup' ) ); + WC_Helper_Customer::set_tax_based_on( 'base' ); + + $this->assertEquals( $customer->is_customer_outside_base(), false ); + + // Customer is going with the Local Pickup option, and the store calculates tax based on the customer's billing address. + + WC_Helper_Customer::set_chosen_shipping_methods( array( 'local_pickup' ) ); + WC_Helper_Customer::set_tax_based_on( 'billing' ); + + $this->assertEquals( $customer->is_customer_outside_base(), false ); + + // Customer is going with the Free Shipping option, and the store calculates tax based on the customer's billing address. + + WC_Helper_Customer::set_chosen_shipping_methods( array( 'free_shipping' ) ); + WC_Helper_Customer::set_tax_based_on( 'billing' ); + + $this->assertEquals( $customer->is_customer_outside_base(), true ); + + // Customer is going with the Free Shipping option, and the store calculates tax based on the store base location. + + WC_Helper_Customer::set_chosen_shipping_methods( array( 'free_shipping' ) ); + WC_Helper_Customer::set_tax_based_on( 'base' ); + + $this->assertEquals( $customer->is_customer_outside_base(), false ); + + } + + //Reset the session and the options. + + WC_Helper_Customer::set_default_shipping_method( $original_default_shipping_method ); + WC_Helper_Customer::set_chosen_shipping_methods( $original_chosen_shipping_methods ); + WC_Helper_Customer::set_tax_based_on( $original_tax_based_on ); + WC_Helper_Customer::set_customer_details( $original_customer_details ); } } \ No newline at end of file From b0c2f05a6aaf7b78c58f79ee9ff77c50d9249a63 Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Wed, 26 Nov 2014 13:25:15 -0800 Subject: [PATCH 393/743] Use post type label for "Save Order" button To improve compatibility with custom order types Conflicts: includes/admin/meta-boxes/class-wc-meta-box-order-actions.php --- includes/admin/meta-boxes/class-wc-meta-box-order-actions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php b/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php index 0b585c1e2df..456265dace3 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php @@ -23,6 +23,7 @@ class WC_Meta_Box_Order_Actions { * Output the metabox */ public static function output( $post ) { + $order_type_object = get_post_type_object( $post->post_type ); ?>
      @@ -71,7 +72,7 @@ class WC_Meta_Box_Order_Actions { } ?>
    - + ID ); ?> From 3fd9bc90276c148ccc297a3918922fda8bce7ea3 Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Wed, 26 Nov 2014 13:27:49 -0800 Subject: [PATCH 394/743] Display order filters for custom order types That declare they are using order-meta-boxes (and therefore, are assumed to be exposing the Edit Order interface and a list table) --- includes/admin/class-wc-admin-post-types.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 9c3030e45d7..0d3191afbbc 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -1400,18 +1400,12 @@ class WC_Admin_Post_Types { public function restrict_manage_posts() { global $typenow, $wp_query; - switch ( $typenow ) { - case 'product' : - $this->product_filters(); - break; - case 'shop_coupon' : - $this->shop_coupon_filters(); - break; - case 'shop_order' : - $this->shop_order_filters(); - break; - default : - break; + if ( in_array( $typenow, wc_get_order_types( 'order-meta-boxes' ) ) ) { + $this->shop_order_filters(); + } elseif ( 'product' == $typenow ) { + $this->product_filters(); + } elseif( 'shop_coupon' == $typenow ) { + $this->shop_coupon_filters(); } } From a141c79d104de9b78475c6dc7824b1f6c3d2c0b0 Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Wed, 26 Nov 2014 13:29:14 -0800 Subject: [PATCH 395/743] Change insert button label for custom order types --- includes/admin/class-wc-admin-post-types.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 0d3191afbbc..2eff9acecf9 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -1942,7 +1942,7 @@ class WC_Admin_Post_Types { public function change_insert_into_post( $strings ) { global $post_type; - if ( in_array( $post_type, array( 'product', 'shop_order', 'shop_coupon' ) ) ) { + if ( in_array( $post_type, array( 'product', 'shop_coupon' ) ) || in_array( $post_type, wc_get_order_types() ) ) { $obj = get_post_type_object( $post_type ); $strings['insertIntoPost'] = sprintf( __( 'Insert into %s', 'woocommerce' ), $obj->labels->singular_name ); From 2eca3fd76557d5e10c742955293c13a50931ea87 Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Wed, 26 Nov 2014 13:30:33 -0800 Subject: [PATCH 396/743] Apply request filters for custom order types --- includes/admin/class-wc-admin-post-types.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 2eff9acecf9..dbf3c374491 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -1588,7 +1588,7 @@ class WC_Admin_Post_Types { $vars['meta_value'] = wc_clean( $_GET['coupon_type'] ); } - } elseif ( 'shop_order' === $typenow ) { + } elseif ( in_array( $typenow, wc_get_order_types( 'order-meta-boxes' ) ) ) { // Filter the orders by the posted customer. if ( isset( $_GET['_customer_user'] ) && $_GET['_customer_user'] > 0 ) { From ac42a295202c70912f7a3c28f65eecb6a098304f Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Wed, 26 Nov 2014 13:33:24 -0800 Subject: [PATCH 397/743] Delete order items for custom order types --- includes/admin/class-wc-admin-post-types.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index dbf3c374491..c8054a31a41 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -1825,7 +1825,7 @@ class WC_Admin_Post_Types { $post_type = get_post_type( $id ); - if ( 'shop_order' == $post_type ) { + if ( in_array( $post_type, wc_get_order_types( 'order-count' ) ) ) { // Delete count - meta doesn't work on trashed posts $user_id = get_post_meta( $id, '_customer_user', true ); @@ -1859,7 +1859,7 @@ class WC_Admin_Post_Types { $post_type = get_post_type( $id ); - if ( 'shop_order' == $post_type ) { + if ( in_array( $post_type, wc_get_order_types( 'order-count' ) ) ) { // Delete count - meta doesn't work on trashed posts $user_id = get_post_meta( $id, '_customer_user', true ); @@ -1886,7 +1886,7 @@ class WC_Admin_Post_Types { public function delete_order_items( $postid ) { global $wpdb; - if ( get_post_type( $postid ) == 'shop_order' ) { + if ( in_array( get_post_type( $postid ), wc_get_order_types() ) ) { do_action( 'woocommerce_delete_order_items', $postid ); $wpdb->query( " From 1f2375f7e486171c8ede5dcac30d02d2fe0e3e32 Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Wed, 26 Nov 2014 13:35:17 -0800 Subject: [PATCH 398/743] Make no order notes label more generic To account for it being displayed on custom order type Add/Edit screens where the order type is not referred to as an 'Order' (e.g. a 'Subscription', 'Refund' or 'Pre-order'). --- includes/admin/meta-boxes/class-wc-meta-box-order-notes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-order-notes.php b/includes/admin/meta-boxes/class-wc-meta-box-order-notes.php index 512621045cb..4601547637a 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-order-notes.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-order-notes.php @@ -58,7 +58,7 @@ class WC_Meta_Box_Order_Notes { } } else { - echo '
  • ' . __( 'There are no notes for this order yet.', 'woocommerce' ) . '
  • '; + echo '
  • ' . __( 'There are no notes yet.', 'woocommerce' ) . '
  • '; } echo ''; From e4b104d153b73b320ce75af621b50f69b1ae3e7b Mon Sep 17 00:00:00 2001 From: thenbrent Date: Tue, 7 Oct 2014 15:22:16 +1000 Subject: [PATCH 399/743] Use order type's singular label for meta box names --- includes/admin/class-wc-admin-meta-boxes.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/admin/class-wc-admin-meta-boxes.php b/includes/admin/class-wc-admin-meta-boxes.php index 4fb05081842..faa318b21e7 100644 --- a/includes/admin/class-wc-admin-meta-boxes.php +++ b/includes/admin/class-wc-admin-meta-boxes.php @@ -107,11 +107,12 @@ class WC_Admin_Meta_Boxes { // Orders foreach ( wc_get_order_types( 'order-meta-boxes' ) as $type ) { - add_meta_box( 'woocommerce-order-data', __( 'Order Data', 'woocommerce' ), 'WC_Meta_Box_Order_Data::output', $type, 'normal', 'high' ); - add_meta_box( 'woocommerce-order-items', __( 'Order Items', 'woocommerce' ), 'WC_Meta_Box_Order_Items::output', $type, 'normal', 'high' ); - add_meta_box( 'woocommerce-order-notes', __( 'Order Notes', 'woocommerce' ), 'WC_Meta_Box_Order_Notes::output', $type, 'side', 'default' ); + $order_type_object = get_post_type_object( $type ); + add_meta_box( 'woocommerce-order-data', sprintf( __( '%s Data', 'woocommerce' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Data::output', $type, 'normal', 'high' ); + add_meta_box( 'woocommerce-order-items', sprintf( __( '%s Items', 'woocommerce' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Items::output', $type, 'normal', 'high' ); + add_meta_box( 'woocommerce-order-notes', sprintf( __( '%s Notes', 'woocommerce' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Notes::output', $type, 'side', 'default' ); add_meta_box( 'woocommerce-order-downloads', __( 'Downloadable Product Permissions', 'woocommerce' ) . ' [?]', 'WC_Meta_Box_Order_Downloads::output', $type, 'normal', 'default' ); - add_meta_box( 'woocommerce-order-actions', __( 'Order Actions', 'woocommerce' ), 'WC_Meta_Box_Order_Actions::output', $type, 'side', 'high' ); + add_meta_box( 'woocommerce-order-actions', sprintf( __( '%s Actions', 'woocommerce' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Actions::output', $type, 'side', 'high' ); } // Coupons From 40de60ea3e8764a8280e155d7c600636585b61ce Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Wed, 26 Nov 2014 13:53:06 -0800 Subject: [PATCH 400/743] Give child class access to billing/shipping fields So that custom order types can extend `WC_Meta_Box_Order_Data` for their own purposes without having to redefine all the billing/shipping fields --- includes/admin/meta-boxes/class-wc-meta-box-order-data.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-order-data.php b/includes/admin/meta-boxes/class-wc-meta-box-order-data.php index a1b131e25a2..b8d4e62667c 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-order-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-order-data.php @@ -24,14 +24,14 @@ class WC_Meta_Box_Order_Data { * * @var array */ - private static $billing_fields = array(); + protected static $billing_fields = array(); /** * Shipping fields * * @var array */ - private static $shipping_fields = array(); + protected static $shipping_fields = array(); /** * Init billing and shipping fields we display + save From 1e8f25defa35a5016f10cc53511ca47b84bde07c Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Wed, 26 Nov 2014 14:22:38 -0800 Subject: [PATCH 401/743] Use wc_get_order() not new WC_Order() Because an order might be a custom order type --- includes/class-wc-ajax.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 238d79b0cd7..86578c2ddf6 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -1063,7 +1063,7 @@ class WC_AJAX { $order_id = absint( $_POST['order_id'] ); $rate_id = absint( $_POST['rate_id'] ); - $order = new WC_Order( $order_id ); + $order = wc_get_order( $order_id ); $data = get_post_meta( $order_id ); // Add new tax @@ -1109,7 +1109,7 @@ class WC_AJAX { wc_delete_order_item( $rate_id ); // Return HTML items - $order = new WC_Order( $order_id ); + $order = wc_get_order( $order_id ); $data = get_post_meta( $order_id ); include( 'admin/meta-boxes/views/html-order-items.php' ); @@ -1375,7 +1375,7 @@ class WC_AJAX { wc_save_order_items( $order_id, $items ); // Return HTML items - $order = new WC_Order( $order_id ); + $order = wc_get_order( $order_id ); $data = get_post_meta( $order_id ); include( 'admin/meta-boxes/views/html-order-items.php' ); @@ -1399,7 +1399,7 @@ class WC_AJAX { wc_save_order_items( $order_id, $items ); // Return HTML items - $order = new WC_Order( $order_id ); + $order = wc_get_order( $order_id ); $data = get_post_meta( $order_id ); include( 'admin/meta-boxes/views/html-order-items.php' ); } @@ -1415,7 +1415,7 @@ class WC_AJAX { // Return HTML items $order_id = absint( $_POST['order_id'] ); - $order = new WC_Order( $order_id ); + $order = wc_get_order( $order_id ); $data = get_post_meta( $order_id ); include( 'admin/meta-boxes/views/html-order-items.php' ); From bc9821253f4507b94b302ae8b0e2ede3b199e897 Mon Sep 17 00:00:00 2001 From: Bryan Purcell Date: Wed, 10 Dec 2014 23:54:06 -0600 Subject: [PATCH 402/743] Refactoring and fixing bugs in WC_Customer Unit Tests --- .../helpers/class-wc-helper-customer.php | 77 ++++++--- tests/unit-tests/customer.php | 155 +++++------------- 2 files changed, 95 insertions(+), 137 deletions(-) diff --git a/tests/framework/helpers/class-wc-helper-customer.php b/tests/framework/helpers/class-wc-helper-customer.php index c7c698f2a71..99e2cc87365 100644 --- a/tests/framework/helpers/class-wc-helper-customer.php +++ b/tests/framework/helpers/class-wc-helper-customer.php @@ -8,26 +8,65 @@ class WC_Helper_Customer { /** - * Get the the current customer's billing details from the session + * Create a mock customer for testing purposes. + * + * @return WC_Customer + */ + + public static function create_mock_customer() { + + $customer_data = array( + 'country' => 'US', + 'state' => 'PA', + 'postcode' => '19123', + 'city' => 'Philadelphia', + 'address' => '123 South Street', + 'address_2' => 'Apt 1', + 'shipping_country' => 'US', + 'shipping_state' => 'PA', + 'shipping_postcode' => '19123', + 'shipping_city' => 'Philadelphia', + 'shipping_address' => '123 South Street', + 'shipping_address_2' => 'Apt 1', + 'is_vat_exempt' => false, + 'calculated_shipping' => false + ); + + WC_Helper_Customer::set_customer_details( $customer_data ); + + return new WC_Customer(); + } + + /** + * Get the expected output for the mock customer's shipping destination. + * + * @return array + */ + + public static function get_expected_customer_location() { + return array( "US", "PA", "19123", "Philadelphia" ); + } + + /** + * Get the expected output for the store's base location settings. + * + * @return array + */ + + public static function get_expected_store_location() { + return array( "GB", "", "", "" ); + } + + /** + * Get the customer's shipping and billing info from the session. * * @return array */ public static function get_customer_details() { - WC()->session->get( 'customer' ); + return WC()->session->get( 'customer' ); } - /** - * Get the store's default shipping method. - * - * @return string - */ - - public static function get_default_shipping_method() { - get_option( 'woocommerce_default_shipping_method' ); - } - - /** * Get the user's chosen shipping method. * @@ -49,7 +88,7 @@ class WC_Helper_Customer { } /** - * Set the the current customer's billing details in the session + * Set the the current customer's billing details in the session. * * @param string $default_shipping_method Shipping Method slug */ @@ -58,16 +97,6 @@ class WC_Helper_Customer { WC()->session->set( 'customer', $customer_details ); } - /** - * Set the store's default shipping method. - * - * @param string $default_shipping_method Shipping Method slug - */ - - public static function set_default_shipping_method( $default_shipping_method ) { - update_option( 'woocommerce_default_shipping_method', $default_shipping_method ); - } - /** * Set the user's chosen shipping method. * diff --git a/tests/unit-tests/customer.php b/tests/unit-tests/customer.php index 1befe3299a3..4b1976e73de 100644 --- a/tests/unit-tests/customer.php +++ b/tests/unit-tests/customer.php @@ -6,166 +6,95 @@ class WC_Tests_Customer extends WC_Unit_Test_Case { */ public function test_get_taxable_address() { - $customer_data = array( - 'country' => 'US', - 'state' => 'PA', - 'postcode' => '19123', - 'city' => 'Philadelphia', - 'address' => '123 South Street', - 'address_2' => 'Apt 1', - 'shipping_country' => 'US', - 'shipping_state' => 'PA', - 'shipping_postcode' => '19123', - 'shipping_city' => 'Philadelphia', - 'shipping_address' => '123 South Street', - 'shipping_address_2' => 'Apt 1', - 'is_vat_exempt' => false, - 'calculated_shipping' => false - ); - - $base_store_address = array( "GB", "", "", "" ); - $customer_address = array( "US", "PA", "19123", "Philadelphia" ); - - //Initialize the session variables for the dummy customer. + $base_store_address = WC_Helper_Customer::get_expected_store_location(); + $customer_address = WC_Helper_Customer::get_expected_customer_location(); - // Get the original settings for the session and the options - $original_default_shipping_method = WC_Helper_Customer::get_default_shipping_method(); + // Get the original settings for the session and the WooCommerce options $original_chosen_shipping_methods = WC_Helper_Customer::get_chosen_shipping_methods(); $original_tax_based_on = WC_Helper_Customer::get_tax_based_on(); $original_customer_details = WC_Helper_Customer::get_customer_details(); - WC_Helper_Customer::set_customer_details( $customer_data ); - - //Create a dummy customer to use for testing! - $customer = new WC_Customer(); + $customer = WC_Helper_Customer::create_mock_customer(); // Create dummy product, and add the product to the cart. + $product = WC_Helper_Product::create_simple_product(); - WC()->cart->add_to_cart( $product->id, 1 ); - //Run through these tests twice - with two different selections for the store's default shipping options + // Customer is going with the Local Pickup option, and the store calculates tax based on the store location. - foreach( array('local_pickup') as $default_shipping_option ) { + WC_Helper_Customer::set_chosen_shipping_methods( array( 'local_pickup' ) ); + WC_Helper_Customer::set_tax_based_on( 'base' ); + $this->assertEquals( $customer->get_taxable_address(), $base_store_address ); - WC_Helper_Customer::get_default_shipping_method( $default_shipping_option ); + // Customer is going with the Local Pickup option, and the store calculates tax based on the customer's billing address. - // Customer is going with the Local Pickup option, and the store calculates tax based on the store location. + WC_Helper_Customer::set_chosen_shipping_methods( array( 'local_pickup' ) ); + WC_Helper_Customer::set_tax_based_on( 'billing' ); + $this->assertEquals( $customer->get_taxable_address(), $base_store_address ); - WC_Helper_Customer::set_chosen_shipping_methods( array( 'local_pickup' ) ); - WC_Helper_Customer::set_tax_based_on( 'base' ); + // Customer is going with the Free Shipping option, and the store calculates tax based on the customer's billing address. - $this->assertEquals( $customer->get_taxable_address(), $base_store_address ); - - // Customer is going with the Local Pickup option, and the store calculates tax based on the customer's billing address. + WC_Helper_Customer::set_chosen_shipping_methods( array( 'free_shipping' ) ); + WC_Helper_Customer::set_tax_based_on( 'billing' ); + $this->assertEquals( $customer->get_taxable_address(), $customer_address ); - WC_Helper_Customer::set_chosen_shipping_methods( array( 'local_pickup' ) ); - WC_Helper_Customer::set_tax_based_on( 'billing' ); + // Customer is going with the Free Shipping option, and the store calculates tax based on the store base location. - $this->assertEquals( $customer->get_taxable_address(), $base_store_address ); - - // Customer is going with the Free Shipping option, and the store calculates tax based on the customer's billing address. + WC_Helper_Customer::set_chosen_shipping_methods( array( 'free_shipping' ) ); + WC_Helper_Customer::set_tax_based_on( 'base' ); + $this->assertEquals( $customer->get_taxable_address(), $base_store_address ); - WC_Helper_Customer::set_chosen_shipping_methods( array( 'free_shipping' ) ); - WC_Helper_Customer::set_tax_based_on( 'billing' ); + //Now reset the settings back to the way they were before this test - $this->assertEquals( $customer->get_taxable_address(), $customer_address ); - - // Customer is going with the Free Shipping option, and the store calculates tax based on the store base location. - - WC_Helper_Customer::set_chosen_shipping_methods( array( 'free_shipping' ) ); - WC_Helper_Customer::set_tax_based_on( 'base' ); - - $this->assertEquals( $customer->get_taxable_address(), $base_store_address ); - - } - - //Reset the session and the options. - - WC_Helper_Customer::set_default_shipping_method( $original_default_shipping_method ); WC_Helper_Customer::set_chosen_shipping_methods( $original_chosen_shipping_methods ); WC_Helper_Customer::set_tax_based_on( $original_tax_based_on ); WC_Helper_Customer::set_customer_details( $original_customer_details ); } + /** * Test the is_customer_outside_base method */ public function test_is_customer_outside_base() { - $customer_data = array( - 'country' => 'US', - 'state' => 'PA', - 'postcode' => '19123', - 'city' => 'Philadelphia', - 'address' => '123 South Street', - 'address_2' => 'Apt 1', - 'shipping_country' => 'US', - 'shipping_state' => 'PA', - 'shipping_postcode' => '19123', - 'shipping_city' => 'Philadelphia', - 'shipping_address' => '123 South Street', - 'shipping_address_2' => 'Apt 1', - 'is_vat_exempt' => false, - 'calculated_shipping' => false - ); - - //Initialize the session variables for the dummy customer. - - // Get the original settings for the session and the options - $original_default_shipping_method = WC_Helper_Customer::get_default_shipping_method(); + // Get the original settings for the session and the WooCommerce options $original_chosen_shipping_methods = WC_Helper_Customer::get_chosen_shipping_methods(); $original_tax_based_on = WC_Helper_Customer::get_tax_based_on(); $original_customer_details = WC_Helper_Customer::get_customer_details(); - WC_Helper_Customer::set_customer_details( $customer_data ); - - //Create a dummy customer to use for testing! - $customer = new WC_Customer(); + $customer = WC_Helper_Customer::create_mock_customer(); // Create dummy product, and add the product to the cart. $product = WC_Helper_Product::create_simple_product(); WC()->cart->add_to_cart( $product->id, 1 ); - //Run through these tests twice - with two different selections for the store's default shipping options + // Customer is going with the Local Pickup option, and the store calculates tax based on the store location. - foreach( array('local_pickup', 'free_shipping') as $default_shipping_option ) { + WC_Helper_Customer::set_chosen_shipping_methods( array( 'local_pickup' ) ); + WC_Helper_Customer::set_tax_based_on( 'base' ); + $this->assertEquals( $customer->is_customer_outside_base(), false ); - WC_Helper_Customer::get_default_shipping_method( $default_shipping_option ); + // Customer is going with the Local Pickup option, and the store calculates tax based on the customer's billing address. - // Customer is going with the Local Pickup option, and the store calculates tax based on the store location. + WC_Helper_Customer::set_chosen_shipping_methods( array( 'local_pickup' ) ); + WC_Helper_Customer::set_tax_based_on( 'billing' ); + $this->assertEquals( $customer->is_customer_outside_base(), false ); - WC_Helper_Customer::set_chosen_shipping_methods( array( 'local_pickup' ) ); - WC_Helper_Customer::set_tax_based_on( 'base' ); + // Customer is going with the Free Shipping option, and the store calculates tax based on the customer's billing address. - $this->assertEquals( $customer->is_customer_outside_base(), false ); - - // Customer is going with the Local Pickup option, and the store calculates tax based on the customer's billing address. + WC_Helper_Customer::set_chosen_shipping_methods( array( 'free_shipping' ) ); + WC_Helper_Customer::set_tax_based_on( 'billing' ); + $this->assertEquals( $customer->is_customer_outside_base(), true ); - WC_Helper_Customer::set_chosen_shipping_methods( array( 'local_pickup' ) ); - WC_Helper_Customer::set_tax_based_on( 'billing' ); + // Customer is going with the Free Shipping option, and the store calculates tax based on the store base location. - $this->assertEquals( $customer->is_customer_outside_base(), false ); - - // Customer is going with the Free Shipping option, and the store calculates tax based on the customer's billing address. + WC_Helper_Customer::set_chosen_shipping_methods( array( 'free_shipping' ) ); + WC_Helper_Customer::set_tax_based_on( 'base' ); + $this->assertEquals( $customer->is_customer_outside_base(), false ); - WC_Helper_Customer::set_chosen_shipping_methods( array( 'free_shipping' ) ); - WC_Helper_Customer::set_tax_based_on( 'billing' ); + //Now reset the settings back to the way they were before this test - $this->assertEquals( $customer->is_customer_outside_base(), true ); - - // Customer is going with the Free Shipping option, and the store calculates tax based on the store base location. - - WC_Helper_Customer::set_chosen_shipping_methods( array( 'free_shipping' ) ); - WC_Helper_Customer::set_tax_based_on( 'base' ); - - $this->assertEquals( $customer->is_customer_outside_base(), false ); - - } - - //Reset the session and the options. - - WC_Helper_Customer::set_default_shipping_method( $original_default_shipping_method ); WC_Helper_Customer::set_chosen_shipping_methods( $original_chosen_shipping_methods ); WC_Helper_Customer::set_tax_based_on( $original_tax_based_on ); WC_Helper_Customer::set_customer_details( $original_customer_details ); From 54d50d830799d3154927952d3175a525a295fbed Mon Sep 17 00:00:00 2001 From: Bryan Purcell Date: Thu, 11 Dec 2014 00:00:49 -0600 Subject: [PATCH 403/743] Clearing out the cart, and the mock product --- tests/unit-tests/customer.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/unit-tests/customer.php b/tests/unit-tests/customer.php index 4b1976e73de..d28e46689ee 100644 --- a/tests/unit-tests/customer.php +++ b/tests/unit-tests/customer.php @@ -50,6 +50,12 @@ class WC_Tests_Customer extends WC_Unit_Test_Case { WC_Helper_Customer::set_chosen_shipping_methods( $original_chosen_shipping_methods ); WC_Helper_Customer::set_tax_based_on( $original_tax_based_on ); WC_Helper_Customer::set_customer_details( $original_customer_details ); + + // Clean up the cart + WC()->cart->empty_cart(); + + // Clean up product + WC_Helper_Product::delete_product( $product->id ); } /** @@ -98,5 +104,11 @@ class WC_Tests_Customer extends WC_Unit_Test_Case { WC_Helper_Customer::set_chosen_shipping_methods( $original_chosen_shipping_methods ); WC_Helper_Customer::set_tax_based_on( $original_tax_based_on ); WC_Helper_Customer::set_customer_details( $original_customer_details ); + + // Clean up the cart + WC()->cart->empty_cart(); + + // Clean up product + WC_Helper_Product::delete_product( $product->id ); } } \ No newline at end of file From 538d514cc0aed2d39fd451d240251dd8f26f150b Mon Sep 17 00:00:00 2001 From: boohoogal Date: Thu, 11 Dec 2014 10:00:53 +0000 Subject: [PATCH 404/743] As suggested kept original event and created new event 'woocommerce_variation_has_changed' for after selection has been fully applied. #6833 --- assets/js/frontend/add-to-cart-variation.js | 6 ++++-- assets/js/frontend/add-to-cart-variation.min.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/js/frontend/add-to-cart-variation.js b/assets/js/frontend/add-to-cart-variation.js index 4b601d280c1..6dd2982f44e 100644 --- a/assets/js/frontend/add-to-cart-variation.js +++ b/assets/js/frontend/add-to-cart-variation.js @@ -76,7 +76,9 @@ else $variation_form.find( 'input[name=variation_id]' ).val( '' ).change(); - $variation_form.trigger( 'check_variations', [ '', false ] ); + $variation_form + .trigger( 'woocommerce_variation_select_change' ) + .trigger( 'check_variations', [ '', false ] ); $( this ).blur(); @@ -85,7 +87,7 @@ } // Custom event for when variation selection has been changed - $variation_form.trigger( 'woocommerce_variation_select_change' ); + $variation_form.trigger( 'woocommerce_variation_has_changed' ); } ) diff --git a/assets/js/frontend/add-to-cart-variation.min.js b/assets/js/frontend/add-to-cart-variation.min.js index fffad0e2de6..74421943ada 100644 --- a/assets/js/frontend/add-to-cart-variation.min.js +++ b/assets/js/frontend/add-to-cart-variation.min.js @@ -1,4 +1,4 @@ /*! * Variations Plugin */ -!function(a,b,c,d){a.fn.wc_variation_form=function(){return a.fn.wc_variation_form.find_matching_variations=function(b,c){for(var d=[],e=0;e0?$variation_form.find("input.variation_id").val("").change():$variation_form.find("input[name=variation_id]").val("").change(),$variation_form.trigger("check_variations",["",!1]),a(this).blur(),a().uniform&&a.isFunction(a.uniform.update)&&a.uniform.update(),$variation_form.trigger("woocommerce_variation_select_change")}).on("focusin touchstart",".variations select",function(){$variation_form=a(this).closest(".variations_form"),attribute_name="undefined"!=typeof a(this).data("attribute_name")?a(this).data("attribute_name"):a(this).attr("name"),$variation_form.trigger("woocommerce_variation_select_focusin").trigger("check_variations",[attribute_name,!0])}).on("check_variations",function(c,d,e){var f=!0,g=!1,h={},i=a(this),j=i.find(".reset_variations");i.find(".variations select").each(function(){attribute_name="undefined"!=typeof a(this).data("attribute_name")?a(this).data("attribute_name"):a(this).attr("name"),0===a(this).val().length?f=!1:g=!0,d&&attribute_name===d?(f=!1,h[attribute_name]=""):(value=a(this).val(),h[attribute_name]=value)});var k=parseInt(i.data("product_id")),l=i.data("product_variations");l||(l=b.product_variations.product_id),l||(l=b.product_variations),l||(l=b["product_variations_"+k]);var m=a.fn.wc_variation_form.find_matching_variations(l,h);if(f){var n=m.shift();n?($variation_input=i.find(i.find("input.variation_id").length>0?"input.variation_id":"input[name=variation_id]"),$variation_input.val(n.variation_id).change(),i.trigger("found_variation",[n])):(i.find(".variations select").val(""),e||i.trigger("reset_image"),alert(wc_add_to_cart_variation_params.i18n_no_matching_variations_text))}else i.trigger("update_variation_values",[m]),e||i.trigger("reset_image"),d||i.find(".single_variation_wrap").slideUp(200);g?"hidden"===j.css("visibility")&&j.css("visibility","visible").hide().fadeIn():j.css("visibility","hidden")}).on("reset_image",function(){var b=a(this).closest(".product"),c=b.find("div.images img:eq(0)"),e=b.find("div.images a.zoom:eq(0)"),f=c.attr("data-o_src"),g=c.attr("data-o_title"),h=c.attr("data-o_alt"),i=e.attr("data-o_href");f!==d&&c.attr("src",f),i!==d&&e.attr("href",i),g!==d&&(c.attr("title",g),e.attr("title",g)),h!==d&&c.attr("alt",h)}).on("update_variation_values",function(b,c){$variation_form=a(this).closest(".variations_form"),$variation_form.find(".variations select").each(function(b,d){current_attr_select=a(d),current_attr_select.data("attribute_options")||current_attr_select.data("attribute_options",current_attr_select.find("option:gt(0)").get()),current_attr_select.find("option:gt(0)").remove(),current_attr_select.append(current_attr_select.data("attribute_options")),current_attr_select.find("option:gt(0)").removeClass("attached"),current_attr_select.find("option:gt(0)").removeClass("enabled"),current_attr_select.find("option:gt(0)").removeAttr("disabled"),current_attr_name="undefined"!=typeof current_attr_select.data("attribute_name")?current_attr_select.data("attribute_name"):current_attr_select.attr("name");for(var e in c)if("undefined"!=typeof c[e]){var f=c[e].attributes;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];g==current_attr_name&&(variation_active=c[e].variation_is_active?"enabled":"",h?(h=a("
    ").html(h).text(),h=h.replace(/'/g,"\\'"),h=h.replace(/"/g,'\\"'),current_attr_select.find('option[value="'+h+'"]').addClass("attached "+variation_active)):current_attr_select.find("option:gt(0)").addClass("attached "+variation_active))}}current_attr_select.find("option:gt(0):not(.attached)").remove(),current_attr_select.find("option:gt(0):not(.enabled)").attr("disabled","disabled")}),$variation_form.trigger("woocommerce_update_variation_values")}).on("found_variation",function(b,c){var e=a(this),f=a(this).closest(".product"),g=f.find("div.images img:eq(0)"),h=f.find("div.images a.zoom:eq(0)"),i=g.attr("data-o_src"),j=g.attr("data-o_title"),k=g.attr("data-o_alt"),l=h.attr("data-o_href"),m=c.image_src,n=c.image_link,o=c.image_title,p=c.image_alt;e.find(".variations_button").show(),e.find(".single_variation").html(c.price_html+c.availability_html),i===d&&(i=g.attr("src")?g.attr("src"):"",g.attr("data-o_src",i)),l===d&&(l=h.attr("href")?h.attr("href"):"",h.attr("data-o_href",l)),j===d&&(j=g.attr("title")?g.attr("title"):"",g.attr("data-o_title",j)),k===d&&(k=g.attr("alt")?g.attr("alt"):"",g.attr("data-o_alt",k)),m&&m.length>1?(g.attr("src",m).attr("alt",p).attr("title",o),h.attr("href",n).attr("title",o)):(g.attr("src",i).attr("alt",k).attr("title",j),h.attr("href",l).attr("title",j));var q=e.find(".single_variation_wrap"),r=f.find(".product_meta").find(".sku"),s=f.find(".product_weight"),t=f.find(".product_dimensions");r.attr("data-o_sku")||r.attr("data-o_sku",r.text()),s.attr("data-o_weight")||s.attr("data-o_weight",s.text()),t.attr("data-o_dimensions")||t.attr("data-o_dimensions",t.text()),r.text(c.sku?c.sku:r.attr("data-o_sku")),s.text(c.weight?c.weight:s.attr("data-o_weight")),t.text(c.dimensions?c.dimensions:t.attr("data-o_dimensions")),q.find(".quantity").show(),c.is_purchasable&&c.is_in_stock&&c.variation_is_visible||e.find(".variations_button").hide(),c.variation_is_visible||e.find(".single_variation").html("

    "+wc_add_to_cart_variation_params.i18n_unavailable_text+"

    "),c.min_qty?q.find(".quantity input.qty").attr("min",c.min_qty).val(c.min_qty):q.find(".quantity input.qty").removeAttr("min"),c.max_qty?q.find(".quantity input.qty").attr("max",c.max_qty):q.find(".quantity input.qty").removeAttr("max"),"yes"===c.is_sold_individually&&(q.find(".quantity input.qty").val("1"),q.find(".quantity").hide()),q.slideDown(200).trigger("show_variation",[c])}),$form.trigger("wc_variation_form"),$form},a(function(){return"undefined"==typeof wc_add_to_cart_variation_params?!1:(a(".variations_form").wc_variation_form(),void a(".variations_form .variations select").change())})}(jQuery,window,document); \ No newline at end of file +!function(a,b,c,d){a.fn.wc_variation_form=function(){return a.fn.wc_variation_form.find_matching_variations=function(b,c){for(var d=[],e=0;e0?$variation_form.find("input.variation_id").val("").change():$variation_form.find("input[name=variation_id]").val("").change(),$variation_form.trigger("woocommerce_variation_select_change").trigger("check_variations",["",!1]),a(this).blur(),a().uniform&&a.isFunction(a.uniform.update)&&a.uniform.update(),$variation_form.trigger("woocommerce_variation_has_changed")}).on("focusin touchstart",".variations select",function(){$variation_form=a(this).closest(".variations_form"),attribute_name="undefined"!=typeof a(this).data("attribute_name")?a(this).data("attribute_name"):a(this).attr("name"),$variation_form.trigger("woocommerce_variation_select_focusin").trigger("check_variations",[attribute_name,!0])}).on("check_variations",function(c,d,e){var f=!0,g=!1,h={},i=a(this),j=i.find(".reset_variations");i.find(".variations select").each(function(){attribute_name="undefined"!=typeof a(this).data("attribute_name")?a(this).data("attribute_name"):a(this).attr("name"),0===a(this).val().length?f=!1:g=!0,d&&attribute_name===d?(f=!1,h[attribute_name]=""):(value=a(this).val(),h[attribute_name]=value)});var k=parseInt(i.data("product_id")),l=i.data("product_variations");l||(l=b.product_variations.product_id),l||(l=b.product_variations),l||(l=b["product_variations_"+k]);var m=a.fn.wc_variation_form.find_matching_variations(l,h);if(f){var n=m.shift();n?($variation_input=i.find(i.find("input.variation_id").length>0?"input.variation_id":"input[name=variation_id]"),$variation_input.val(n.variation_id).change(),i.trigger("found_variation",[n])):(i.find(".variations select").val(""),e||i.trigger("reset_image"),alert(wc_add_to_cart_variation_params.i18n_no_matching_variations_text))}else i.trigger("update_variation_values",[m]),e||i.trigger("reset_image"),d||i.find(".single_variation_wrap").slideUp(200);g?"hidden"===j.css("visibility")&&j.css("visibility","visible").hide().fadeIn():j.css("visibility","hidden")}).on("reset_image",function(){var b=a(this).closest(".product"),c=b.find("div.images img:eq(0)"),e=b.find("div.images a.zoom:eq(0)"),f=c.attr("data-o_src"),g=c.attr("data-o_title"),h=c.attr("data-o_alt"),i=e.attr("data-o_href");f!==d&&c.attr("src",f),i!==d&&e.attr("href",i),g!==d&&(c.attr("title",g),e.attr("title",g)),h!==d&&c.attr("alt",h)}).on("update_variation_values",function(b,c){$variation_form=a(this).closest(".variations_form"),$variation_form.find(".variations select").each(function(b,d){current_attr_select=a(d),current_attr_select.data("attribute_options")||current_attr_select.data("attribute_options",current_attr_select.find("option:gt(0)").get()),current_attr_select.find("option:gt(0)").remove(),current_attr_select.append(current_attr_select.data("attribute_options")),current_attr_select.find("option:gt(0)").removeClass("attached"),current_attr_select.find("option:gt(0)").removeClass("enabled"),current_attr_select.find("option:gt(0)").removeAttr("disabled"),current_attr_name="undefined"!=typeof current_attr_select.data("attribute_name")?current_attr_select.data("attribute_name"):current_attr_select.attr("name");for(var e in c)if("undefined"!=typeof c[e]){var f=c[e].attributes;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];g==current_attr_name&&(variation_active=c[e].variation_is_active?"enabled":"",h?(h=a("
    ").html(h).text(),h=h.replace(/'/g,"\\'"),h=h.replace(/"/g,'\\"'),current_attr_select.find('option[value="'+h+'"]').addClass("attached "+variation_active)):current_attr_select.find("option:gt(0)").addClass("attached "+variation_active))}}current_attr_select.find("option:gt(0):not(.attached)").remove(),current_attr_select.find("option:gt(0):not(.enabled)").attr("disabled","disabled")}),$variation_form.trigger("woocommerce_update_variation_values")}).on("found_variation",function(b,c){var e=a(this),f=a(this).closest(".product"),g=f.find("div.images img:eq(0)"),h=f.find("div.images a.zoom:eq(0)"),i=g.attr("data-o_src"),j=g.attr("data-o_title"),k=g.attr("data-o_alt"),l=h.attr("data-o_href"),m=c.image_src,n=c.image_link,o=c.image_title,p=c.image_alt;e.find(".variations_button").show(),e.find(".single_variation").html(c.price_html+c.availability_html),i===d&&(i=g.attr("src")?g.attr("src"):"",g.attr("data-o_src",i)),l===d&&(l=h.attr("href")?h.attr("href"):"",h.attr("data-o_href",l)),j===d&&(j=g.attr("title")?g.attr("title"):"",g.attr("data-o_title",j)),k===d&&(k=g.attr("alt")?g.attr("alt"):"",g.attr("data-o_alt",k)),m&&m.length>1?(g.attr("src",m).attr("alt",p).attr("title",o),h.attr("href",n).attr("title",o)):(g.attr("src",i).attr("alt",k).attr("title",j),h.attr("href",l).attr("title",j));var q=e.find(".single_variation_wrap"),r=f.find(".product_meta").find(".sku"),s=f.find(".product_weight"),t=f.find(".product_dimensions");r.attr("data-o_sku")||r.attr("data-o_sku",r.text()),s.attr("data-o_weight")||s.attr("data-o_weight",s.text()),t.attr("data-o_dimensions")||t.attr("data-o_dimensions",t.text()),r.text(c.sku?c.sku:r.attr("data-o_sku")),s.text(c.weight?c.weight:s.attr("data-o_weight")),t.text(c.dimensions?c.dimensions:t.attr("data-o_dimensions")),q.find(".quantity").show(),c.is_purchasable&&c.is_in_stock&&c.variation_is_visible||e.find(".variations_button").hide(),c.variation_is_visible||e.find(".single_variation").html("

    "+wc_add_to_cart_variation_params.i18n_unavailable_text+"

    "),c.min_qty?q.find(".quantity input.qty").attr("min",c.min_qty).val(c.min_qty):q.find(".quantity input.qty").removeAttr("min"),c.max_qty?q.find(".quantity input.qty").attr("max",c.max_qty):q.find(".quantity input.qty").removeAttr("max"),"yes"===c.is_sold_individually&&(q.find(".quantity input.qty").val("1"),q.find(".quantity").hide()),q.slideDown(200).trigger("show_variation",[c])}),$form.trigger("wc_variation_form"),$form},a(function(){return"undefined"==typeof wc_add_to_cart_variation_params?!1:(a(".variations_form").wc_variation_form(),void a(".variations_form .variations select").change())})}(jQuery,window,document); \ No newline at end of file From 65dbab486c169a7d44ed36664c15e883419bbc4e Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 11 Dec 2014 11:05:56 +0000 Subject: [PATCH 405/743] [2.2] Don't force tax_rate_id to an integer. Allow strings. Used in Taxamo extension. --- includes/admin/meta-boxes/views/html-order-fee.php | 6 ++---- includes/admin/meta-boxes/views/html-order-item.php | 6 +++--- includes/admin/meta-boxes/views/html-order-shipping.php | 6 ++---- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/includes/admin/meta-boxes/views/html-order-fee.php b/includes/admin/meta-boxes/views/html-order-fee.php index bdc7a775da7..88eee69e579 100644 --- a/includes/admin/meta-boxes/views/html-order-fee.php +++ b/includes/admin/meta-boxes/views/html-order-fee.php @@ -52,9 +52,7 @@ if ( ! defined( 'ABSPATH' ) ) { foreach ( $order_taxes as $tax_item ) : $tax_item_id = $tax_item['rate_id']; $tax_item_total = isset( $tax_data['total'][ $tax_item_id ] ) ? $tax_data['total'][ $tax_item_id ] : ''; - ?> -
    diff --git a/includes/admin/meta-boxes/views/html-order-item.php b/includes/admin/meta-boxes/views/html-order-item.php index 4b4bed5daf3..bddc9969c92 100644 --- a/includes/admin/meta-boxes/views/html-order-item.php +++ b/includes/admin/meta-boxes/views/html-order-item.php @@ -248,14 +248,14 @@ if ( ! defined( 'ABSPATH' ) ) { -
    From 051d3078ad96a267c8e2fcdad805cca647926f21 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Thu, 11 Dec 2014 10:54:07 -0200 Subject: [PATCH 406/743] [API] Prevented errors with deleted products in the orders endpoint, closes #6813 --- includes/api/class-wc-api-orders.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/includes/api/class-wc-api-orders.php b/includes/api/class-wc-api-orders.php index cfe07c74ff9..ab6305414a3 100644 --- a/includes/api/class-wc-api-orders.php +++ b/includes/api/class-wc-api-orders.php @@ -201,9 +201,17 @@ class WC_API_Orders extends WC_API_Resource { ); // add line items - foreach( $order->get_items() as $item_id => $item ) { + foreach ( $order->get_items() as $item_id => $item ) { - $product = $order->get_product_from_item( $item ); + $product = $order->get_product_from_item( $item ); + $product_id = null; + $product_sku = null; + + // Check if the product exists. + if ( is_object( $product ) ) { + $product_id = ( isset( $product->variation_id ) ) ? $product->variation_id : $product->id; + $product_sku = $product->get_sku(); + } $meta = new WC_Order_Item_Meta( $item['item_meta'], $product ); @@ -229,8 +237,8 @@ class WC_API_Orders extends WC_API_Resource { 'quantity' => (int) $item['qty'], 'tax_class' => ( ! empty( $item['tax_class'] ) ) ? $item['tax_class'] : null, 'name' => $item['name'], - 'product_id' => ( isset( $product->variation_id ) ) ? $product->variation_id : $product->id, - 'sku' => is_object( $product ) ? $product->get_sku() : null, + 'product_id' => $product_id, + 'sku' => $product_sku, 'meta' => $item_meta, ); } From 100b95ae4f59d02615958b1623baa5e7e1d9c42e Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 11 Dec 2014 14:54:56 +0000 Subject: [PATCH 407/743] Tweak the get magic method in product class --- includes/abstracts/abstract-wc-product.php | 25 +++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/includes/abstracts/abstract-wc-product.php b/includes/abstracts/abstract-wc-product.php index f12c7f36d6e..94cad701115 100644 --- a/includes/abstracts/abstract-wc-product.php +++ b/includes/abstracts/abstract-wc-product.php @@ -57,31 +57,30 @@ class WC_Product { * @return mixed */ public function __get( $key ) { + $this->$key = get_post_meta( $this->id, '_' . $key, true ); // Get values or default if not set if ( in_array( $key, array( 'downloadable', 'virtual', 'backorders', 'manage_stock', 'featured', 'sold_individually' ) ) ) { - $value = ( $value = get_post_meta( $this->id, '_' . $key, true ) ) ? $value : 'no'; + $this->$key = $this->$key ? $this->$key : 'no'; } elseif ( in_array( $key, array( 'product_attributes', 'crosssell_ids', 'upsell_ids' ) ) ) { - $value = ( $value = get_post_meta( $this->id, '_' . $key, true ) ) ? $value : array(); + $this->$key = $this->$key ? $this->$key : array(); - } elseif ( 'visibility' == $key ) { - $value = ( $value = get_post_meta( $this->id, '_visibility', true ) ) ? $value : 'hidden'; + } elseif ( 'visibility' === $key ) { + $this->$key = $this->$key ? $this->$key : 'hidden'; - } elseif ( 'stock' == $key ) { - $value = ( $value = get_post_meta( $this->id, '_stock', true ) ) ? $value : 0; + } elseif ( 'stock' === $key ) { + $this->$key = $this->$key ? $this->$key : 0; - } elseif ( 'stock_status' == $key ) { - $value = ( $value = get_post_meta( $this->id, '_stock_status', true ) ) ? $value : 'instock'; + } elseif ( 'stock_status' === $key ) { + $this->$key = $this->$key ? $this->$key : 'instock'; - } elseif ( 'tax_status' == $key ) { - $value = ( $value = get_post_meta( $this->id, '_tax_status', true ) ) ? $value : 'taxable'; + } elseif ( 'tax_status' === $key ) { + $this->$key = $this->$key ? $this->$key : 'taxable'; - } else { - $value = get_post_meta( $this->id, '_' . $key, true ); } - return $value; + return $this->$key; } /** From 48bf608120912c2aefea1aad9989ac9d930cbef5 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 12 Dec 2014 01:22:42 -0200 Subject: [PATCH 408/743] [API] Improved the params in orders api actions --- includes/api/class-wc-api-orders.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/api/class-wc-api-orders.php b/includes/api/class-wc-api-orders.php index ab6305414a3..d0570cc2070 100644 --- a/includes/api/class-wc-api-orders.php +++ b/includes/api/class-wc-api-orders.php @@ -448,7 +448,7 @@ class WC_API_Orders extends WC_API_Resource { wc_delete_shop_order_transients( $order->id ); - do_action( 'woocommerce_api_create_order', $order->id, $data ); + do_action( 'woocommerce_api_create_order', $order->id, $data, $this ); return $this->get_order( $order->id ); @@ -600,7 +600,7 @@ class WC_API_Orders extends WC_API_Resource { wc_delete_shop_order_transients( $order->id ); - do_action( 'woocommerce_api_edit_order', $order->id, $data ); + do_action( 'woocommerce_api_edit_order', $order->id, $data, $this ); return $this->get_order( $id ); From 7cf69a337b62c4de7817615fdbd7d709560d4620 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 12 Dec 2014 01:56:28 -0200 Subject: [PATCH 409/743] Updated the hosted payments option description on simplify commerce gateway --- .../simplify-commerce/class-wc-gateway-simplify-commerce.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php b/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php index cd8e7d99775..26884178dd4 100644 --- a/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php +++ b/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php @@ -206,7 +206,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { 'title' => __( 'Payment Mode', 'woocommerce' ), 'label' => __( 'Enable Hosted Payments', 'woocommerce' ), 'type' => 'select', - 'description' => __( 'Standard will display the credit card fields on your store (SSL required). Hosted Payments will display a Simplify Commerce modal dialog on your store (SSL not required). ', 'woocommerce' ), + 'description' => sprintf( __( 'Standard will display the credit card fields on your store (SSL required). %1$s Hosted Payments will display a Simplify Commerce modal dialog on your store (if SSL) or will redirect the customer to Simplify Commerce hosted page (if not SSL). %1$s Note: Hosted Payments need a new API Key pair with the hosted payments flag selected and a Redirect URL that can be set up going to "Setting -> Account Settings -> Merchant Settings" as %2$s. %3$sFor more details check the Simplify Commerce docs%4$s.', 'woocommerce' ), '
    ', '' . WC()->api_request_url( 'WC_Gateway_Simplify_Commerce' ) . '', '', '' ), 'default' => 'hosted', 'options' => array( 'standard' => __( 'Standard', 'woocommerce' ), From 19a059bbc32f08c2339b931a6421db2102d23622 Mon Sep 17 00:00:00 2001 From: Bryce Date: Fri, 12 Dec 2014 16:56:05 +0700 Subject: [PATCH 410/743] Remove outline when stars are clicked --- assets/css/woocommerce.css | 2 +- assets/css/woocommerce.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/css/woocommerce.css b/assets/css/woocommerce.css index 48abf50c0bf..86fe46f0224 100644 --- a/assets/css/woocommerce.css +++ b/assets/css/woocommerce.css @@ -1 +1 @@ -@charset "UTF-8";@-moz-keyframes spin{100%{-moz-transform:rotate(360deg)}}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}p.demo_store{position:fixed;top:0;left:0;right:0;margin:0;width:100%;font-size:1em;padding:1em 0;text-align:center;background-color:#a46497;color:#fff;z-index:99998;box-shadow:0 1px 1em rgba(0,0,0,.2)}.admin-bar p.demo_store{top:32px}.clear{clear:both}.woocommerce .blockUI.blockOverlay{position:relative}.woocommerce .blockUI.blockOverlay:before,.woocommerce .loader:before{height:1em;width:1em;position:absolute;top:50%;left:50%;margin-left:-.5em;margin-top:-.5em;display:block;-webkit-animation:spin 1s ease-in-out infinite;-moz-animation:spin 1s ease-in-out infinite;animation:spin 1s ease-in-out infinite;content:"";background:url(../images/icons/loader.svg) center center/cover;line-height:1;text-align:center;font-size:2em;color:rgba(0,0,0,.75)}.woocommerce a.remove{display:block;font-size:1.5em;height:1em;width:1em;text-align:center;line-height:1;border-radius:100%;color:red!important;text-decoration:none;font-weight:700}.woocommerce a.remove:hover{color:#fff!important;background:red}.woocommerce .woocommerce-error,.woocommerce .woocommerce-info,.woocommerce .woocommerce-message{padding:1em 2em 1em 3.5em!important;margin:0 0 2em!important;position:relative;background-color:#f7f6f7;color:#515151;border-top:3px solid #a46497;list-style:none!important;width:auto}.woocommerce .woocommerce-error:after,.woocommerce .woocommerce-error:before,.woocommerce .woocommerce-info:after,.woocommerce .woocommerce-info:before,.woocommerce .woocommerce-message:after,.woocommerce .woocommerce-message:before{content:" ";display:table}.woocommerce .woocommerce-error:after,.woocommerce .woocommerce-info:after,.woocommerce .woocommerce-message:after{clear:both}.woocommerce .woocommerce-error:before,.woocommerce .woocommerce-info:before,.woocommerce .woocommerce-message:before{font-family:WooCommerce;content:"\e028";display:inline-block;position:absolute;top:1em;left:1.5em}.woocommerce .woocommerce-error .button,.woocommerce .woocommerce-info .button,.woocommerce .woocommerce-message .button{float:right}.woocommerce .woocommerce-error li,.woocommerce .woocommerce-info li,.woocommerce .woocommerce-message li{list-style:none!important;padding-left:0!important;margin-left:0!important}.woocommerce .woocommerce-message{border-top-color:#8fae1b}.woocommerce .woocommerce-message:before{content:"\e015";color:#8fae1b}.woocommerce .woocommerce-info{border-top-color:#1e85be}.woocommerce .woocommerce-info:before{color:#1e85be}.woocommerce .woocommerce-error{border-top-color:#b81c23}.woocommerce .woocommerce-error:before{content:"\e016";color:#b81c23}.woocommerce small.note{display:block;color:#777;font-size:.857em;margin-top:10px}.woocommerce .woocommerce-breadcrumb{margin:0 0 1em;padding:0;font-size:.92em;color:#777}.woocommerce .woocommerce-breadcrumb:after,.woocommerce .woocommerce-breadcrumb:before{content:" ";display:table}.woocommerce .woocommerce-breadcrumb:after{clear:both}.woocommerce .woocommerce-breadcrumb a{color:#777}.woocommerce .quantity .qty{width:2.618em;text-align:center}.woocommerce div.product{margin-bottom:0;position:relative}.woocommerce div.product .product_title{clear:none;margin-top:0;padding:0}.woocommerce div.product p.price,.woocommerce div.product span.price{color:#77a464;font-size:1.25em}.woocommerce div.product p.price ins,.woocommerce div.product span.price ins{background:inherit;font-weight:700}.woocommerce div.product p.price del,.woocommerce div.product span.price del{opacity:.5;display:block}.woocommerce div.product p.stock{font-size:.92em}.woocommerce div.product .stock{color:#77a464}.woocommerce div.product .out-of-stock{color:red}.woocommerce div.product .woocommerce-product-rating{margin-bottom:1.618em}.woocommerce div.product div.images{margin-bottom:2em}.woocommerce div.product div.images img{display:block;width:100%;height:auto;box-shadow:none}.woocommerce div.product div.images div.thumbnails{padding-top:1em}.woocommerce div.product div.summary{margin-bottom:2em}.woocommerce div.product div.social{text-align:right;margin:0 0 1em}.woocommerce div.product div.social span{margin:0 0 0 2px}.woocommerce div.product div.social span span{margin:0}.woocommerce div.product div.social span .stButton .chicklets{padding-left:16px;width:0}.woocommerce div.product div.social iframe{float:left;margin-top:3px}.woocommerce div.product .woocommerce-tabs ul.tabs{list-style:none;padding:0 0 0 1em;margin:0 0 1.618em;overflow:hidden;position:relative}.woocommerce div.product .woocommerce-tabs ul.tabs li{border:1px solid #d3ced2;background-color:#ebe9eb;display:inline-block;position:relative;z-index:0;border-radius:4px 4px 0 0;margin:0 -5px;padding:0 1em}.woocommerce div.product .woocommerce-tabs ul.tabs li a{display:inline-block;padding:.5em 0;font-weight:700;color:#515151;text-decoration:none}.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover{text-decoration:none;color:#6b6b6b}.woocommerce div.product .woocommerce-tabs ul.tabs li.active{background:#fff;z-index:2;border-bottom-color:#fff}.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{color:inherit;text-shadow:inherit}.woocommerce div.product .woocommerce-tabs ul.tabs li.active:before{box-shadow:2px 2px 0 #fff}.woocommerce div.product .woocommerce-tabs ul.tabs li.active:after{box-shadow:-2px 2px 0 #fff}.woocommerce div.product .woocommerce-tabs ul.tabs li:after,.woocommerce div.product .woocommerce-tabs ul.tabs li:before{border:1px solid #d3ced2;position:absolute;bottom:-1px;width:5px;height:5px;content:" "}.woocommerce div.product .woocommerce-tabs ul.tabs li:before{left:-6px;-webkit-border-bottom-right-radius:4px;-moz-border-bottom-right-radius:4px;border-bottom-right-radius:4px;border-width:0 1px 1px 0;box-shadow:2px 2px 0 #ebe9eb}.woocommerce div.product .woocommerce-tabs ul.tabs li:after{right:-6px;-webkit-border-bottom-left-radius:4px;-moz-border-bottom-left-radius:4px;border-bottom-left-radius:4px;border-width:0 0 1px 1px;box-shadow:-2px 2px 0 #ebe9eb}.woocommerce div.product .woocommerce-tabs ul.tabs:before{position:absolute;content:" ";width:100%;bottom:0;left:0;border-bottom:1px solid #d3ced2;z-index:1}.woocommerce div.product .woocommerce-tabs .panel{margin:0 0 2em;padding:0}.woocommerce div.product p.cart{margin-bottom:2em}.woocommerce div.product p.cart:after,.woocommerce div.product p.cart:before{content:" ";display:table}.woocommerce div.product p.cart:after{clear:both}.woocommerce div.product form.cart{margin-bottom:2em}.woocommerce div.product form.cart:after,.woocommerce div.product form.cart:before{content:" ";display:table}.woocommerce div.product form.cart:after{clear:both}.woocommerce div.product form.cart div.quantity{float:left;margin:0 4px 0 0}.woocommerce div.product form.cart table{border-width:0 0 1px}.woocommerce div.product form.cart table td{padding-left:0}.woocommerce div.product form.cart table div.quantity{float:none;margin:0}.woocommerce div.product form.cart table small.stock{display:block;float:none}.woocommerce div.product form.cart .variations{margin-bottom:1em}.woocommerce div.product form.cart .variations label{font-weight:700}.woocommerce div.product form.cart .variations select{width:100%;float:left}.woocommerce div.product form.cart .variations td.label{padding-right:1em}.woocommerce div.product form.cart .variations td{vertical-align:top}.woocommerce div.product form.cart .button{vertical-align:middle;float:left}.woocommerce div.product form.cart .group_table td.label{padding-right:1em;padding-left:1em}.woocommerce div.product form.cart .group_table td{vertical-align:top;padding-bottom:.5em;border:0}.woocommerce span.onsale{min-height:3.236em;min-width:3.236em;padding:.202em;font-weight:700;position:absolute;text-align:center;line-height:3.236;top:-.5em;left:-.5em;margin:0;border-radius:100%;background-color:#77a464;color:#fff;font-size:.857em;-webkit-font-smoothing:antialiased}.woocommerce .products ul,.woocommerce ul.products{margin:0 0 1em;padding:0;list-style:none;clear:both}.woocommerce .products ul:after,.woocommerce .products ul:before,.woocommerce ul.products:after,.woocommerce ul.products:before{content:" ";display:table}.woocommerce .products ul:after,.woocommerce ul.products:after{clear:both}.woocommerce .products ul li,.woocommerce ul.products li{list-style:none}.woocommerce ul.products li.product .onsale{top:0;right:0;left:auto;margin:-.5em -.5em 0 0}.woocommerce ul.products li.product h3{padding:.5em 0;margin:0;font-size:1em}.woocommerce ul.products li.product a{text-decoration:none}.woocommerce ul.products li.product a img{width:100%;height:auto;display:block;margin:0 0 1em;box-shadow:none}.woocommerce ul.products li.product strong{display:block}.woocommerce ul.products li.product .star-rating{font-size:.857em}.woocommerce ul.products li.product .button{margin-top:1em}.woocommerce ul.products li.product .price{color:#77a464;display:block;font-weight:400;margin-bottom:.5em;font-size:.857em}.woocommerce ul.products li.product .price del{color:inherit;opacity:.5;display:block}.woocommerce ul.products li.product .price ins{background:0 0;font-weight:700}.woocommerce ul.products li.product .price .from{font-size:.67em;margin:-2px 0 0;text-transform:uppercase;color:rgba(132,132,132,.5)}.woocommerce .woocommerce-ordering,.woocommerce .woocommerce-result-count{margin:0 0 1em}.woocommerce .woocommerce-ordering select{vertical-align:top}.woocommerce nav.woocommerce-pagination{text-align:center}.woocommerce nav.woocommerce-pagination ul{display:inline-block;white-space:nowrap;padding:0;clear:both;border:1px solid #d3ced2;border-right:0;margin:1px}.woocommerce nav.woocommerce-pagination ul li{border-right:1px solid #d3ced2;padding:0;margin:0;float:left;display:inline;overflow:hidden}.woocommerce nav.woocommerce-pagination ul li a,.woocommerce nav.woocommerce-pagination ul li span{margin:0;text-decoration:none;line-height:1;font-size:1em;font-weight:400;padding:.5em;min-width:1em;display:block}.woocommerce nav.woocommerce-pagination ul li a:focus,.woocommerce nav.woocommerce-pagination ul li a:hover,.woocommerce nav.woocommerce-pagination ul li span.current{background:#ebe9eb;color:#8a7e88}.woocommerce #respond input#submit,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button{font-size:100%;margin:0;line-height:1;cursor:pointer;position:relative;font-family:inherit;text-decoration:none;overflow:visible;padding:.618em 1em;font-weight:700;border-radius:3px;left:auto;color:#515151;background-color:#ebe9eb;border:0;white-space:nowrap;display:inline-block;background-image:none;box-shadow:none;-webkit-box-shadow:none;text-shadow:none}.woocommerce #respond input#submit.loading,.woocommerce a.button.loading,.woocommerce button.button.loading,.woocommerce input.button.loading{opacity:.25;padding-right:2.618em}.woocommerce #respond input#submit.loading:after,.woocommerce a.button.loading:after,.woocommerce button.button.loading:after,.woocommerce input.button.loading:after{font-family:WooCommerce;content:"\e01c";vertical-align:top;-webkit-font-smoothing:antialiased;font-weight:400;position:absolute;top:.618em;right:1em;-webkit-animation:spin 2s linear infinite;-moz-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.woocommerce #respond input#submit.added:after,.woocommerce a.button.added:after,.woocommerce button.button.added:after,.woocommerce input.button.added:after{font-family:WooCommerce;content:"\e017";margin-left:.53em;vertical-align:bottom}.woocommerce #respond input#submit:hover,.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover{background-color:#dad8da;text-decoration:none;background-image:none;color:#515151}.woocommerce #respond input#submit.alt,.woocommerce a.button.alt,.woocommerce button.button.alt,.woocommerce input.button.alt{background-color:#a46497;color:#fff;-webkit-font-smoothing:antialiased}.woocommerce #respond input#submit.alt:hover,.woocommerce a.button.alt:hover,.woocommerce button.button.alt:hover,.woocommerce input.button.alt:hover{background-color:#935386;color:#fff}.woocommerce #respond input#submit.alt.disabled,.woocommerce #respond input#submit.alt.disabled:hover,.woocommerce #respond input#submit.alt:disabled,.woocommerce #respond input#submit.alt:disabled:hover,.woocommerce #respond input#submit.alt:disabled[disabled],.woocommerce #respond input#submit.alt:disabled[disabled]:hover,.woocommerce a.button.alt.disabled,.woocommerce a.button.alt.disabled:hover,.woocommerce a.button.alt:disabled,.woocommerce a.button.alt:disabled:hover,.woocommerce a.button.alt:disabled[disabled],.woocommerce a.button.alt:disabled[disabled]:hover,.woocommerce button.button.alt.disabled,.woocommerce button.button.alt.disabled:hover,.woocommerce button.button.alt:disabled,.woocommerce button.button.alt:disabled:hover,.woocommerce button.button.alt:disabled[disabled],.woocommerce button.button.alt:disabled[disabled]:hover,.woocommerce input.button.alt.disabled,.woocommerce input.button.alt.disabled:hover,.woocommerce input.button.alt:disabled,.woocommerce input.button.alt:disabled:hover,.woocommerce input.button.alt:disabled[disabled],.woocommerce input.button.alt:disabled[disabled]:hover{background-color:#a46497;color:#fff}.woocommerce #respond input#submit.disabled,.woocommerce #respond input#submit:disabled,.woocommerce #respond input#submit:disabled[disabled],.woocommerce a.button.disabled,.woocommerce a.button:disabled,.woocommerce a.button:disabled[disabled],.woocommerce button.button.disabled,.woocommerce button.button:disabled,.woocommerce button.button:disabled[disabled],.woocommerce input.button.disabled,.woocommerce input.button:disabled,.woocommerce input.button:disabled[disabled]{color:inherit;cursor:not-allowed;opacity:.5}.woocommerce #respond input#submit.disabled:hover,.woocommerce #respond input#submit:disabled:hover,.woocommerce #respond input#submit:disabled[disabled]:hover,.woocommerce a.button.disabled:hover,.woocommerce a.button:disabled:hover,.woocommerce a.button:disabled[disabled]:hover,.woocommerce button.button.disabled:hover,.woocommerce button.button:disabled:hover,.woocommerce button.button:disabled[disabled]:hover,.woocommerce input.button.disabled:hover,.woocommerce input.button:disabled:hover,.woocommerce input.button:disabled[disabled]:hover{color:inherit;background-color:#ebe9eb}.woocommerce .cart .button,.woocommerce .cart input.button{float:none}.woocommerce a.added_to_cart{padding-top:.5em;white-space:nowrap;display:inline-block}.woocommerce #reviews h2 small{float:right;color:#777;font-size:15px;margin:10px 0 0}.woocommerce #reviews h2 small a{text-decoration:none;color:#777}.woocommerce #reviews h3{margin:0}.woocommerce #reviews #respond{margin:0;border:0;padding:0}.woocommerce #reviews #comment{height:75px}.woocommerce #reviews #comments .add_review:after,.woocommerce #reviews #comments .add_review:before{content:" ";display:table}.woocommerce #reviews #comments .add_review:after{clear:both}.woocommerce #reviews #comments h2{clear:none}.woocommerce #reviews #comments ol.commentlist{margin:0;width:100%;background:0 0;list-style:none}.woocommerce #reviews #comments ol.commentlist:after,.woocommerce #reviews #comments ol.commentlist:before{content:" ";display:table}.woocommerce #reviews #comments ol.commentlist:after{clear:both}.woocommerce #reviews #comments ol.commentlist li{padding:0;margin:0 0 20px;position:relative;background:0;border:0}.woocommerce #reviews #comments ol.commentlist li .meta{color:#777;font-size:.75em}.woocommerce #reviews #comments ol.commentlist li img.avatar{float:left;position:absolute;top:0;left:0;padding:3px;width:32px;height:auto;background:#ebe9eb;border:1px solid #e4e1e3;margin:0;box-shadow:none}.woocommerce #reviews #comments ol.commentlist li .comment-text{margin:0 0 0 50px;border:1px solid #e4e1e3;border-radius:4px;padding:1em 1em 0}.woocommerce #reviews #comments ol.commentlist li .comment-text:after,.woocommerce #reviews #comments ol.commentlist li .comment-text:before{content:" ";display:table}.woocommerce #reviews #comments ol.commentlist li .comment-text:after{clear:both}.woocommerce #reviews #comments ol.commentlist li .comment-text p{margin:0 0 1em}.woocommerce #reviews #comments ol.commentlist li .comment-text p.meta{font-size:.83em}.woocommerce #reviews #comments ol.commentlist ul.children{list-style:none;margin:20px 0 0 50px}.woocommerce #reviews #comments ol.commentlist ul.children .star-rating{display:none}.woocommerce #reviews #comments ol.commentlist #respond{border:1px solid #e4e1e3;border-radius:4px;padding:1em 1em 0;margin:20px 0 0 50px}.woocommerce #reviews #comments .commentlist>li:before{content:""}.woocommerce .star-rating{float:right;overflow:hidden;position:relative;height:1em;line-height:1;font-size:1em;width:5.4em;font-family:star}.woocommerce .star-rating:before{content:"\73\73\73\73\73";color:#d3ced2;float:left;top:0;left:0;position:absolute}.woocommerce .star-rating span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}.woocommerce .star-rating span:before{content:"\53\53\53\53\53";top:0;position:absolute;left:0}.woocommerce .woocommerce-product-rating{line-height:2;display:block}.woocommerce .woocommerce-product-rating:after,.woocommerce .woocommerce-product-rating:before{content:" ";display:table}.woocommerce .woocommerce-product-rating:after{clear:both}.woocommerce .woocommerce-product-rating .star-rating{margin:.5em 4px 0 0;float:left}.woocommerce .products .star-rating{display:block;margin:0 0 .5em;float:none}.woocommerce .hreview-aggregate .star-rating{margin:10px 0 0}.woocommerce #review_form #respond{position:static;margin:0;width:auto;padding:0;background:0 0;border:0}.woocommerce #review_form #respond:after,.woocommerce #review_form #respond:before{content:" ";display:table}.woocommerce #review_form #respond:after{clear:both}.woocommerce #review_form #respond p{margin:0 0 10px}.woocommerce #review_form #respond .form-submit input{left:auto}.woocommerce #review_form #respond textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.woocommerce p.stars{position:relative;font-size:1em}.woocommerce p.stars a{display:inline-block;font-weight:700;margin-right:1em;text-indent:-9999px;position:relative;border-bottom:0!important}.woocommerce p.stars a:last-child{border-right:0}.woocommerce p.stars a.star-1,.woocommerce p.stars a.star-2,.woocommerce p.stars a.star-3,.woocommerce p.stars a.star-4,.woocommerce p.stars a.star-5{border-right:1px solid #ccc}.woocommerce p.stars a.star-1:after,.woocommerce p.stars a.star-2:after,.woocommerce p.stars a.star-3:after,.woocommerce p.stars a.star-4:after,.woocommerce p.stars a.star-5:after{font-family:WooCommerce;text-indent:0;position:absolute;top:0;left:0}.woocommerce p.stars a.star-1{width:2em}.woocommerce p.stars a.star-1:after{content:"\e021"}.woocommerce p.stars a.star-1.active:after,.woocommerce p.stars a.star-1:hover:after{content:""}.woocommerce p.stars a.star-2{width:3em}.woocommerce p.stars a.star-2:after{content:"\e021\e021"}.woocommerce p.stars a.star-2.active:after,.woocommerce p.stars a.star-2:hover:after{content:""}.woocommerce p.stars a.star-3{width:4em}.woocommerce p.stars a.star-3:after{content:"\e021\e021\e021"}.woocommerce p.stars a.star-3.active:after,.woocommerce p.stars a.star-3:hover:after{content:""}.woocommerce p.stars a.star-4{width:5em}.woocommerce p.stars a.star-4:after{content:"\e021\e021\e021\e021"}.woocommerce p.stars a.star-4.active:after,.woocommerce p.stars a.star-4:hover:after{content:""}.woocommerce p.stars a.star-5{width:6em;border:0}.woocommerce p.stars a.star-5:after{content:"\e021\e021\e021\e021\e021"}.woocommerce p.stars a.star-5.active:after,.woocommerce p.stars a.star-5:hover:after{content:""}.woocommerce table.shop_attributes{border:0;border-top:1px dotted rgba(0,0,0,.1);margin-bottom:1.618em;width:100%}.woocommerce table.shop_attributes th{width:150px;font-weight:700;padding:8px;border-top:0;border-bottom:1px dotted rgba(0,0,0,.1);margin:0;line-height:1.5}.woocommerce table.shop_attributes td{font-style:italic;padding:0;border-top:0;border-bottom:1px dotted rgba(0,0,0,.1);margin:0;line-height:1.5}.woocommerce table.shop_attributes td p{margin:0;padding:8px 0}.woocommerce table.shop_attributes .alt td,.woocommerce table.shop_attributes .alt th{background:rgba(0,0,0,.025)}.woocommerce table.shop_table{border:1px solid rgba(0,0,0,.1);margin:0 -1px 24px 0;text-align:left;width:100%;border-collapse:separate;border-radius:5px}.woocommerce table.shop_table th{font-weight:700;padding:9px 12px}.woocommerce table.shop_table td{border-top:1px solid rgba(0,0,0,.1);padding:6px 12px;vertical-align:middle}.woocommerce table.shop_table td small{font-weight:400}.woocommerce table.shop_table tbody tr:first-child td,.woocommerce table.shop_table tbody tr:first-child th{border-top:0}.woocommerce table.shop_table tbody th,.woocommerce table.shop_table tfoot td,.woocommerce table.shop_table tfoot th{font-weight:700;border-top:1px solid rgba(0,0,0,.1)}.woocommerce table.my_account_orders{font-size:.85em}.woocommerce table.my_account_orders td,.woocommerce table.my_account_orders th{padding:4px 8px;vertical-align:middle}.woocommerce table.my_account_orders .button{white-space:nowrap}.woocommerce table.my_account_orders .order-actions{text-align:right}.woocommerce table.my_account_orders .order-actions .button{margin:.125em 0 .125em .25em}.woocommerce td.product-name dl.variation{margin:.25em 0}.woocommerce td.product-name dl.variation:after,.woocommerce td.product-name dl.variation:before{content:" ";display:table}.woocommerce td.product-name dl.variation:after{clear:both}.woocommerce td.product-name dl.variation dd,.woocommerce td.product-name dl.variation dt{display:inline-block;float:left;margin-bottom:1em}.woocommerce td.product-name dl.variation dt{font-weight:700;padding:0 0 .25em;margin:0 4px 0 0;clear:left}.woocommerce td.product-name dl.variation dd{padding:0 0 .25em}.woocommerce td.product-name dl.variation dd p:last-child{margin-bottom:0}.woocommerce td.product-name p.backorder_notification{font-size:.83em}.woocommerce td.product-quantity{min-width:80px}.woocommerce ul.cart_list,.woocommerce ul.product_list_widget{list-style:none;padding:0;margin:0}.woocommerce ul.cart_list li,.woocommerce ul.product_list_widget li{padding:4px 0;margin:0;list-style:none}.woocommerce ul.cart_list li:after,.woocommerce ul.cart_list li:before,.woocommerce ul.product_list_widget li:after,.woocommerce ul.product_list_widget li:before{content:" ";display:table}.woocommerce ul.cart_list li:after,.woocommerce ul.product_list_widget li:after{clear:both}.woocommerce ul.cart_list li a,.woocommerce ul.product_list_widget li a{display:block;font-weight:700}.woocommerce ul.cart_list li img,.woocommerce ul.product_list_widget li img{float:right;margin-left:4px;width:32px;height:auto;box-shadow:none}.woocommerce ul.cart_list li dl,.woocommerce ul.product_list_widget li dl{margin:0;padding-left:1em;border-left:2px solid rgba(0,0,0,.1)}.woocommerce ul.cart_list li dl:after,.woocommerce ul.cart_list li dl:before,.woocommerce ul.product_list_widget li dl:after,.woocommerce ul.product_list_widget li dl:before{content:" ";display:table}.woocommerce ul.cart_list li dl:after,.woocommerce ul.product_list_widget li dl:after{clear:both}.woocommerce ul.cart_list li dl dd,.woocommerce ul.cart_list li dl dt,.woocommerce ul.product_list_widget li dl dd,.woocommerce ul.product_list_widget li dl dt{display:inline-block;float:left;margin-bottom:1em}.woocommerce ul.cart_list li dl dt,.woocommerce ul.product_list_widget li dl dt{font-weight:700;padding:0 0 .25em;margin:0 4px 0 0;clear:left}.woocommerce ul.cart_list li dl dd,.woocommerce ul.product_list_widget li dl dd{padding:0 0 .25em}.woocommerce ul.cart_list li dl dd p:last-child,.woocommerce ul.product_list_widget li dl dd p:last-child{margin-bottom:0}.woocommerce ul.cart_list li .star-rating,.woocommerce ul.product_list_widget li .star-rating{float:none}.woocommerce .widget_shopping_cart .total,.woocommerce.widget_shopping_cart .total{border-top:3px double #ebe9eb;padding:4px 0 0}.woocommerce .widget_shopping_cart .total strong,.woocommerce.widget_shopping_cart .total strong{min-width:40px;display:inline-block}.woocommerce .widget_shopping_cart .cart_list li,.woocommerce.widget_shopping_cart .cart_list li{padding-left:2em;position:relative;padding-top:0}.woocommerce .widget_shopping_cart .cart_list li a.remove,.woocommerce.widget_shopping_cart .cart_list li a.remove{position:absolute;top:0;left:0}.woocommerce .widget_shopping_cart .buttons:after,.woocommerce .widget_shopping_cart .buttons:before,.woocommerce.widget_shopping_cart .buttons:after,.woocommerce.widget_shopping_cart .buttons:before{content:" ";display:table}.woocommerce .widget_shopping_cart .buttons:after,.woocommerce.widget_shopping_cart .buttons:after{clear:both}.woocommerce form .form-row{padding:3px;margin:0 0 6px}.woocommerce form .form-row [placeholder]:focus::-webkit-input-placeholder{-webkit-transition:opacity .5s .5s ease;-moz-transition:opacity .5s .5s ease;transition:opacity .5s .5s ease;opacity:0}.woocommerce form .form-row label{line-height:2}.woocommerce form .form-row label.hidden{visibility:hidden}.woocommerce form .form-row label.inline{display:inline}.woocommerce form .form-row select{cursor:pointer;margin:0}.woocommerce form .form-row .required{color:red;font-weight:700;border:0}.woocommerce form .form-row .input-checkbox{display:inline;margin:-2px 8px 0 0;text-align:center;vertical-align:middle}.woocommerce form .form-row input.input-text,.woocommerce form .form-row textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;margin:0;outline:0;line-height:1}.woocommerce form .form-row textarea{height:4em;line-height:1.5;display:block;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.woocommerce form .form-row.woocommerce-invalid .chosen-drop,.woocommerce form .form-row.woocommerce-invalid .chosen-single,.woocommerce form .form-row.woocommerce-invalid input.input-text,.woocommerce form .form-row.woocommerce-invalid select{border-color:#a00}.woocommerce form .form-row.woocommerce-validated .chosen-drop,.woocommerce form .form-row.woocommerce-validated .chosen-single,.woocommerce form .form-row.woocommerce-validated input.input-text,.woocommerce form .form-row.woocommerce-validated select{border-color:#69bf29}.woocommerce form .form-row ::-webkit-input-placeholder{line-height:normal}.woocommerce form .form-row :-moz-placeholder{line-height:normal}.woocommerce form .form-row :-ms-input-placeholder{line-height:normal}.woocommerce form.checkout_coupon,.woocommerce form.login,.woocommerce form.register{border:1px solid #d3ced2;padding:20px;margin:2em 0;text-align:left;border-radius:5px}.woocommerce ul#shipping_method{list-style:none;margin:0;padding:0}.woocommerce ul#shipping_method li{margin:0;padding:.25em 0 .25em 22px;text-indent:-22px;list-style:none}.woocommerce ul#shipping_method .amount{font-weight:700}.woocommerce p.woocommerce-shipping-contents{margin:0}.woocommerce .order_details{margin:0 0 1.5em;list-style:none}.woocommerce .order_details:after,.woocommerce .order_details:before{content:" ";display:table}.woocommerce .order_details:after{clear:both}.woocommerce .order_details li{float:left;margin-right:2em;text-transform:uppercase;font-size:.715em;line-height:1;border-right:1px dashed #d3ced2;padding-right:2em}.woocommerce .order_details li strong{display:block;font-size:1.4em;text-transform:none;line-height:1.5}.woocommerce .order_details li:last-of-type{border:none}.woocommerce .widget_layered_nav ul{margin:0;padding:0;border:0;list-style:none}.woocommerce .widget_layered_nav ul li{padding:0 0 1px;list-style:none}.woocommerce .widget_layered_nav ul li:after,.woocommerce .widget_layered_nav ul li:before{content:" ";display:table}.woocommerce .widget_layered_nav ul li:after{clear:both}.woocommerce .widget_layered_nav ul li a,.woocommerce .widget_layered_nav ul li span{padding:1px 0;text-decoration:none}.woocommerce .widget_layered_nav ul li.chosen a:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";text-decoration:none;color:#a00}.woocommerce .widget_layered_nav_filters ul{margin:0;padding:0;border:0;list-style:none;overflow:hidden;zoom:1}.woocommerce .widget_layered_nav_filters ul li{float:left;padding:0 1px 1px 0;list-style:none}.woocommerce .widget_layered_nav_filters ul li a{text-decoration:none}.woocommerce .widget_layered_nav_filters ul li a:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";text-decoration:none;color:#a00}.woocommerce .widget_price_filter .price_slider{margin-bottom:1em}.woocommerce .widget_price_filter .price_slider_amount{text-align:right;line-height:2.4;font-size:.8751em}.woocommerce .widget_price_filter .price_slider_amount .button{font-size:1.15em;float:left}.woocommerce .widget_price_filter .ui-slider{position:relative;text-align:left}.woocommerce .widget_price_filter .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1em;height:1em;background-color:#a46497;border-radius:1em;cursor:ew-resize;outline:0;top:-.3em}.woocommerce .widget_price_filter .ui-slider .ui-slider-handle:last-child{margin-left:-.8em}.woocommerce .widget_price_filter .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;border-radius:1em;background-color:#a46497}.woocommerce .widget_price_filter .price_slider_wrapper .ui-widget-content{border-radius:1em;background-color:#602053;border:0}.woocommerce .widget_price_filter .ui-slider-horizontal{height:.5em}.woocommerce .widget_price_filter .ui-slider-horizontal .ui-slider-range{top:0;height:100%}.woocommerce .widget_price_filter .ui-slider-horizontal .ui-slider-range-min{left:-1px}.woocommerce .widget_price_filter .ui-slider-horizontal .ui-slider-range-max{right:-1px}.woocommerce-account .addresses .title:after,.woocommerce-account .addresses .title:before{content:" ";display:table}.woocommerce-account .addresses .title:after{clear:both}.woocommerce-account .addresses .title h3{float:left}.woocommerce-account .addresses .title .edit{float:right}.woocommerce-account ol.commentlist.notes li.note p.meta{font-weight:700;margin-bottom:0}.woocommerce-account ol.commentlist.notes li.note .description p:last-child{margin-bottom:0}.woocommerce-account ul.digital-downloads{margin-left:0;padding-left:0}.woocommerce-account ul.digital-downloads li{list-style:none;margin-left:0;padding-left:0}.woocommerce-account ul.digital-downloads li:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";text-decoration:none}.woocommerce-account ul.digital-downloads li .count{float:right}.woocommerce-cart table.cart .product-thumbnail{min-width:32px}.woocommerce-cart table.cart img{width:32px;box-shadow:none}.woocommerce-cart table.cart td,.woocommerce-cart table.cart th{vertical-align:middle}.woocommerce-cart table.cart td.actions .coupon .input-text{float:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #d3ced2;padding:6px 6px 5px;margin:0 4px 0 0;outline:0;line-height:1}.woocommerce-cart table.cart input{margin:0;vertical-align:middle;line-height:1}.woocommerce-cart .wc-proceed-to-checkout{padding:1em 0}.woocommerce-cart .wc-proceed-to-checkout:after,.woocommerce-cart .wc-proceed-to-checkout:before{content:" ";display:table}.woocommerce-cart .wc-proceed-to-checkout:after{clear:both}.woocommerce-cart .wc-proceed-to-checkout a.checkout-button{display:block;text-align:center;margin-bottom:1em}.woocommerce-cart .cart-collaterals .shipping_calculator .button{width:100%;float:none;display:block}.woocommerce-cart .cart-collaterals .shipping_calculator .shipping-calculator-button:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-left:.618em;content:"";text-decoration:none}.woocommerce-cart .cart-collaterals .cart_totals p{margin:0}.woocommerce-cart .cart-collaterals .cart_totals p small{color:#777;font-size:.83em}.woocommerce-cart .cart-collaterals .cart_totals table{border-collapse:separate;border-radius:5px;margin:0 0 6px;padding:0}.woocommerce-cart .cart-collaterals .cart_totals table tr:first-child td,.woocommerce-cart .cart-collaterals .cart_totals table tr:first-child th{border-top:0}.woocommerce-cart .cart-collaterals .cart_totals table th{padding:6px 12px 0 0;width:25%}.woocommerce-cart .cart-collaterals .cart_totals table td{padding:6px 0}.woocommerce-cart .cart-collaterals .cart_totals table td,.woocommerce-cart .cart-collaterals .cart_totals table th{vertical-align:top}.woocommerce-cart .cart-collaterals .cart_totals table small{display:block;color:#777}.woocommerce-cart .cart-collaterals .cart_totals table select{width:100%}.woocommerce-cart .cart-collaterals .cart_totals .discount td{color:#77a464}.woocommerce-cart .cart-collaterals .cart_totals tr td,.woocommerce-cart .cart-collaterals .cart_totals tr th{border-top:1px solid #ebe9eb}.woocommerce-cart .cart-collaterals .cross-sells ul.products li.product{margin-top:0}.woocommerce-checkout .checkout .col-2 h3#ship-to-different-address{float:left;clear:none}.woocommerce-checkout .checkout .col-2 .form-row-first,.woocommerce-checkout .checkout .col-2 .notes{clear:left}.woocommerce-checkout .checkout .create-account small{font-size:11px;color:#777;font-weight:400}.woocommerce-checkout .checkout div.shipping-address{padding:0;clear:left;width:100%}.woocommerce-checkout .checkout .shipping_address{clear:both}.woocommerce-checkout #payment{background:#ebe9eb;border-radius:5px}.woocommerce-checkout #payment ul.payment_methods{text-align:left;padding:1em;border-bottom:1px solid #d3ced2;margin:0;list-style:none}.woocommerce-checkout #payment ul.payment_methods:after,.woocommerce-checkout #payment ul.payment_methods:before{content:" ";display:table}.woocommerce-checkout #payment ul.payment_methods:after{clear:both}.woocommerce-checkout #payment ul.payment_methods li{line-height:2;text-align:left;margin:0;font-weight:400}.woocommerce-checkout #payment ul.payment_methods li input{margin:0 1em 0 0}.woocommerce-checkout #payment ul.payment_methods li img{vertical-align:middle;margin:-2px 0 0 .5em;padding:0;position:relative;box-shadow:none}.woocommerce-checkout #payment ul.payment_methods li img+img{margin-left:2px}.woocommerce-checkout #payment div.form-row{padding:1em}.woocommerce-checkout #payment div.payment_box{position:relative;width:96%;padding:1em 2%;margin:1em 0;font-size:.92em;border-radius:2px;line-height:1.5;background-color:#dfdcde;color:#515151}.woocommerce-checkout #payment div.payment_box input.input-text,.woocommerce-checkout #payment div.payment_box textarea{border-color:#bbb3b9 #c7c1c6 #c7c1c6}.woocommerce-checkout #payment div.payment_box ::-webkit-input-placeholder{color:#bbb3b9}.woocommerce-checkout #payment div.payment_box :-moz-placeholder{color:#bbb3b9}.woocommerce-checkout #payment div.payment_box :-ms-input-placeholder{color:#bbb3b9}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number{font-size:1.5em;padding:8px;background-repeat:no-repeat;background-position:right}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.visa,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.visa,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.visa{background-image:url(../images/icons/credit-cards/visa.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.mastercard,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.mastercard,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.mastercard{background-image:url(../images/icons/credit-cards/mastercard.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.laser,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.laser,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.laser{background-image:url(../images/icons/credit-cards/laser.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.dinersclub,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.dinersclub,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.dinersclub{background-image:url(../images/icons/credit-cards/diners.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.maestro,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.maestro,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.maestro{background-image:url(../images/icons/credit-cards/maestro.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.jcb,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.jcb,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.jcb{background-image:url(../images/icons/credit-cards/jcb.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.amex,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.amex,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.amex{background-image:url(../images/icons/credit-cards/amex.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.discover,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.discover,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.discover{background-image:url(../images/icons/credit-cards/discover.png)}.woocommerce-checkout #payment div.payment_box span.help{font-size:.857em;color:#777;font-weight:400}.woocommerce-checkout #payment div.payment_box .form-row{margin:0 0 1em}.woocommerce-checkout #payment div.payment_box p:last-child{margin-bottom:0}.woocommerce-checkout #payment div.payment_box:after{content:"";display:block;border:8px solid #dfdcde;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;position:absolute;top:-3px;left:0;margin:-1em 0 0 2em}.woocommerce-checkout #payment .payment_method_paypal .about_paypal{float:right;line-height:52px;font-size:.83em}.woocommerce-checkout #payment .payment_method_paypal img{max-height:52px;vertical-align:middle}#content.twentyeleven .woocommerce-pagination a{font-size:1em;line-height:1}.single-product .twentythirteen #reply-title,.single-product .twentythirteen #respond #commentform,.single-product .twentythirteen .entry-summary{padding:0}.single-product .twentythirteen p.stars{clear:both}.twentythirteen .woocommerce-breadcrumb{padding-top:40px}.twentyfourteen ul.products li.product{margin-top:0!important} \ No newline at end of file +@charset "UTF-8";@-moz-keyframes spin{100%{-moz-transform:rotate(360deg)}}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}p.demo_store{position:fixed;top:0;left:0;right:0;margin:0;width:100%;font-size:1em;padding:1em 0;text-align:center;background-color:#a46497;color:#fff;z-index:99998;box-shadow:0 1px 1em rgba(0,0,0,.2)}.admin-bar p.demo_store{top:32px}.clear{clear:both}.woocommerce .blockUI.blockOverlay{position:relative}.woocommerce .blockUI.blockOverlay:before,.woocommerce .loader:before{height:1em;width:1em;position:absolute;top:50%;left:50%;margin-left:-.5em;margin-top:-.5em;display:block;-webkit-animation:spin 1s ease-in-out infinite;-moz-animation:spin 1s ease-in-out infinite;animation:spin 1s ease-in-out infinite;content:"";background:url(../images/icons/loader.svg) center center/cover;line-height:1;text-align:center;font-size:2em;color:rgba(0,0,0,.75)}.woocommerce a.remove{display:block;font-size:1.5em;height:1em;width:1em;text-align:center;line-height:1;border-radius:100%;color:red!important;text-decoration:none;font-weight:700}.woocommerce a.remove:hover{color:#fff!important;background:red}.woocommerce .woocommerce-error,.woocommerce .woocommerce-info,.woocommerce .woocommerce-message{padding:1em 2em 1em 3.5em!important;margin:0 0 2em!important;position:relative;background-color:#f7f6f7;color:#515151;border-top:3px solid #a46497;list-style:none!important;width:auto}.woocommerce .woocommerce-error:after,.woocommerce .woocommerce-error:before,.woocommerce .woocommerce-info:after,.woocommerce .woocommerce-info:before,.woocommerce .woocommerce-message:after,.woocommerce .woocommerce-message:before{content:" ";display:table}.woocommerce .woocommerce-error:after,.woocommerce .woocommerce-info:after,.woocommerce .woocommerce-message:after{clear:both}.woocommerce .woocommerce-error:before,.woocommerce .woocommerce-info:before,.woocommerce .woocommerce-message:before{font-family:WooCommerce;content:"\e028";display:inline-block;position:absolute;top:1em;left:1.5em}.woocommerce .woocommerce-error .button,.woocommerce .woocommerce-info .button,.woocommerce .woocommerce-message .button{float:right}.woocommerce .woocommerce-error li,.woocommerce .woocommerce-info li,.woocommerce .woocommerce-message li{list-style:none!important;padding-left:0!important;margin-left:0!important}.woocommerce .woocommerce-message{border-top-color:#8fae1b}.woocommerce .woocommerce-message:before{content:"\e015";color:#8fae1b}.woocommerce .woocommerce-info{border-top-color:#1e85be}.woocommerce .woocommerce-info:before{color:#1e85be}.woocommerce .woocommerce-error{border-top-color:#b81c23}.woocommerce .woocommerce-error:before{content:"\e016";color:#b81c23}.woocommerce small.note{display:block;color:#777;font-size:.857em;margin-top:10px}.woocommerce .woocommerce-breadcrumb{margin:0 0 1em;padding:0;font-size:.92em;color:#777}.woocommerce .woocommerce-breadcrumb:after,.woocommerce .woocommerce-breadcrumb:before{content:" ";display:table}.woocommerce .woocommerce-breadcrumb:after{clear:both}.woocommerce .woocommerce-breadcrumb a{color:#777}.woocommerce .quantity .qty{width:2.618em;text-align:center}.woocommerce div.product{margin-bottom:0;position:relative}.woocommerce div.product .product_title{clear:none;margin-top:0;padding:0}.woocommerce div.product p.price,.woocommerce div.product span.price{color:#77a464;font-size:1.25em}.woocommerce div.product p.price ins,.woocommerce div.product span.price ins{background:inherit;font-weight:700}.woocommerce div.product p.price del,.woocommerce div.product span.price del{opacity:.5;display:block}.woocommerce div.product p.stock{font-size:.92em}.woocommerce div.product .stock{color:#77a464}.woocommerce div.product .out-of-stock{color:red}.woocommerce div.product .woocommerce-product-rating{margin-bottom:1.618em}.woocommerce div.product div.images{margin-bottom:2em}.woocommerce div.product div.images img{display:block;width:100%;height:auto;box-shadow:none}.woocommerce div.product div.images div.thumbnails{padding-top:1em}.woocommerce div.product div.summary{margin-bottom:2em}.woocommerce div.product div.social{text-align:right;margin:0 0 1em}.woocommerce div.product div.social span{margin:0 0 0 2px}.woocommerce div.product div.social span span{margin:0}.woocommerce div.product div.social span .stButton .chicklets{padding-left:16px;width:0}.woocommerce div.product div.social iframe{float:left;margin-top:3px}.woocommerce div.product .woocommerce-tabs ul.tabs{list-style:none;padding:0 0 0 1em;margin:0 0 1.618em;overflow:hidden;position:relative}.woocommerce div.product .woocommerce-tabs ul.tabs li{border:1px solid #d3ced2;background-color:#ebe9eb;display:inline-block;position:relative;z-index:0;border-radius:4px 4px 0 0;margin:0 -5px;padding:0 1em}.woocommerce div.product .woocommerce-tabs ul.tabs li a{display:inline-block;padding:.5em 0;font-weight:700;color:#515151;text-decoration:none}.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover{text-decoration:none;color:#6b6b6b}.woocommerce div.product .woocommerce-tabs ul.tabs li.active{background:#fff;z-index:2;border-bottom-color:#fff}.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{color:inherit;text-shadow:inherit}.woocommerce div.product .woocommerce-tabs ul.tabs li.active:before{box-shadow:2px 2px 0 #fff}.woocommerce div.product .woocommerce-tabs ul.tabs li.active:after{box-shadow:-2px 2px 0 #fff}.woocommerce div.product .woocommerce-tabs ul.tabs li:after,.woocommerce div.product .woocommerce-tabs ul.tabs li:before{border:1px solid #d3ced2;position:absolute;bottom:-1px;width:5px;height:5px;content:" "}.woocommerce div.product .woocommerce-tabs ul.tabs li:before{left:-6px;-webkit-border-bottom-right-radius:4px;-moz-border-bottom-right-radius:4px;border-bottom-right-radius:4px;border-width:0 1px 1px 0;box-shadow:2px 2px 0 #ebe9eb}.woocommerce div.product .woocommerce-tabs ul.tabs li:after{right:-6px;-webkit-border-bottom-left-radius:4px;-moz-border-bottom-left-radius:4px;border-bottom-left-radius:4px;border-width:0 0 1px 1px;box-shadow:-2px 2px 0 #ebe9eb}.woocommerce div.product .woocommerce-tabs ul.tabs:before{position:absolute;content:" ";width:100%;bottom:0;left:0;border-bottom:1px solid #d3ced2;z-index:1}.woocommerce div.product .woocommerce-tabs .panel{margin:0 0 2em;padding:0}.woocommerce div.product p.cart{margin-bottom:2em}.woocommerce div.product p.cart:after,.woocommerce div.product p.cart:before{content:" ";display:table}.woocommerce div.product p.cart:after{clear:both}.woocommerce div.product form.cart{margin-bottom:2em}.woocommerce div.product form.cart:after,.woocommerce div.product form.cart:before{content:" ";display:table}.woocommerce div.product form.cart:after{clear:both}.woocommerce div.product form.cart div.quantity{float:left;margin:0 4px 0 0}.woocommerce div.product form.cart table{border-width:0 0 1px}.woocommerce div.product form.cart table td{padding-left:0}.woocommerce div.product form.cart table div.quantity{float:none;margin:0}.woocommerce div.product form.cart table small.stock{display:block;float:none}.woocommerce div.product form.cart .variations{margin-bottom:1em}.woocommerce div.product form.cart .variations label{font-weight:700}.woocommerce div.product form.cart .variations select{width:100%;float:left}.woocommerce div.product form.cart .variations td.label{padding-right:1em}.woocommerce div.product form.cart .variations td{vertical-align:top}.woocommerce div.product form.cart .button{vertical-align:middle;float:left}.woocommerce div.product form.cart .group_table td.label{padding-right:1em;padding-left:1em}.woocommerce div.product form.cart .group_table td{vertical-align:top;padding-bottom:.5em;border:0}.woocommerce span.onsale{min-height:3.236em;min-width:3.236em;padding:.202em;font-weight:700;position:absolute;text-align:center;line-height:3.236;top:-.5em;left:-.5em;margin:0;border-radius:100%;background-color:#77a464;color:#fff;font-size:.857em;-webkit-font-smoothing:antialiased}.woocommerce .products ul,.woocommerce ul.products{margin:0 0 1em;padding:0;list-style:none;clear:both}.woocommerce .products ul:after,.woocommerce .products ul:before,.woocommerce ul.products:after,.woocommerce ul.products:before{content:" ";display:table}.woocommerce .products ul:after,.woocommerce ul.products:after{clear:both}.woocommerce .products ul li,.woocommerce ul.products li{list-style:none}.woocommerce ul.products li.product .onsale{top:0;right:0;left:auto;margin:-.5em -.5em 0 0}.woocommerce ul.products li.product h3{padding:.5em 0;margin:0;font-size:1em}.woocommerce ul.products li.product a{text-decoration:none}.woocommerce ul.products li.product a img{width:100%;height:auto;display:block;margin:0 0 1em;box-shadow:none}.woocommerce ul.products li.product strong{display:block}.woocommerce ul.products li.product .star-rating{font-size:.857em}.woocommerce ul.products li.product .button{margin-top:1em}.woocommerce ul.products li.product .price{color:#77a464;display:block;font-weight:400;margin-bottom:.5em;font-size:.857em}.woocommerce ul.products li.product .price del{color:inherit;opacity:.5;display:block}.woocommerce ul.products li.product .price ins{background:0 0;font-weight:700}.woocommerce ul.products li.product .price .from{font-size:.67em;margin:-2px 0 0;text-transform:uppercase;color:rgba(132,132,132,.5)}.woocommerce .woocommerce-ordering,.woocommerce .woocommerce-result-count{margin:0 0 1em}.woocommerce .woocommerce-ordering select{vertical-align:top}.woocommerce nav.woocommerce-pagination{text-align:center}.woocommerce nav.woocommerce-pagination ul{display:inline-block;white-space:nowrap;padding:0;clear:both;border:1px solid #d3ced2;border-right:0;margin:1px}.woocommerce nav.woocommerce-pagination ul li{border-right:1px solid #d3ced2;padding:0;margin:0;float:left;display:inline;overflow:hidden}.woocommerce nav.woocommerce-pagination ul li a,.woocommerce nav.woocommerce-pagination ul li span{margin:0;text-decoration:none;line-height:1;font-size:1em;font-weight:400;padding:.5em;min-width:1em;display:block}.woocommerce nav.woocommerce-pagination ul li a:focus,.woocommerce nav.woocommerce-pagination ul li a:hover,.woocommerce nav.woocommerce-pagination ul li span.current{background:#ebe9eb;color:#8a7e88}.woocommerce #respond input#submit,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button{font-size:100%;margin:0;line-height:1;cursor:pointer;position:relative;font-family:inherit;text-decoration:none;overflow:visible;padding:.618em 1em;font-weight:700;border-radius:3px;left:auto;color:#515151;background-color:#ebe9eb;border:0;white-space:nowrap;display:inline-block;background-image:none;box-shadow:none;-webkit-box-shadow:none;text-shadow:none}.woocommerce #respond input#submit.loading,.woocommerce a.button.loading,.woocommerce button.button.loading,.woocommerce input.button.loading{opacity:.25;padding-right:2.618em}.woocommerce #respond input#submit.loading:after,.woocommerce a.button.loading:after,.woocommerce button.button.loading:after,.woocommerce input.button.loading:after{font-family:WooCommerce;content:"\e01c";vertical-align:top;-webkit-font-smoothing:antialiased;font-weight:400;position:absolute;top:.618em;right:1em;-webkit-animation:spin 2s linear infinite;-moz-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.woocommerce #respond input#submit.added:after,.woocommerce a.button.added:after,.woocommerce button.button.added:after,.woocommerce input.button.added:after{font-family:WooCommerce;content:"\e017";margin-left:.53em;vertical-align:bottom}.woocommerce #respond input#submit:hover,.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover{background-color:#dad8da;text-decoration:none;background-image:none;color:#515151}.woocommerce #respond input#submit.alt,.woocommerce a.button.alt,.woocommerce button.button.alt,.woocommerce input.button.alt{background-color:#a46497;color:#fff;-webkit-font-smoothing:antialiased}.woocommerce #respond input#submit.alt:hover,.woocommerce a.button.alt:hover,.woocommerce button.button.alt:hover,.woocommerce input.button.alt:hover{background-color:#935386;color:#fff}.woocommerce #respond input#submit.alt.disabled,.woocommerce #respond input#submit.alt.disabled:hover,.woocommerce #respond input#submit.alt:disabled,.woocommerce #respond input#submit.alt:disabled:hover,.woocommerce #respond input#submit.alt:disabled[disabled],.woocommerce #respond input#submit.alt:disabled[disabled]:hover,.woocommerce a.button.alt.disabled,.woocommerce a.button.alt.disabled:hover,.woocommerce a.button.alt:disabled,.woocommerce a.button.alt:disabled:hover,.woocommerce a.button.alt:disabled[disabled],.woocommerce a.button.alt:disabled[disabled]:hover,.woocommerce button.button.alt.disabled,.woocommerce button.button.alt.disabled:hover,.woocommerce button.button.alt:disabled,.woocommerce button.button.alt:disabled:hover,.woocommerce button.button.alt:disabled[disabled],.woocommerce button.button.alt:disabled[disabled]:hover,.woocommerce input.button.alt.disabled,.woocommerce input.button.alt.disabled:hover,.woocommerce input.button.alt:disabled,.woocommerce input.button.alt:disabled:hover,.woocommerce input.button.alt:disabled[disabled],.woocommerce input.button.alt:disabled[disabled]:hover{background-color:#a46497;color:#fff}.woocommerce #respond input#submit.disabled,.woocommerce #respond input#submit:disabled,.woocommerce #respond input#submit:disabled[disabled],.woocommerce a.button.disabled,.woocommerce a.button:disabled,.woocommerce a.button:disabled[disabled],.woocommerce button.button.disabled,.woocommerce button.button:disabled,.woocommerce button.button:disabled[disabled],.woocommerce input.button.disabled,.woocommerce input.button:disabled,.woocommerce input.button:disabled[disabled]{color:inherit;cursor:not-allowed;opacity:.5}.woocommerce #respond input#submit.disabled:hover,.woocommerce #respond input#submit:disabled:hover,.woocommerce #respond input#submit:disabled[disabled]:hover,.woocommerce a.button.disabled:hover,.woocommerce a.button:disabled:hover,.woocommerce a.button:disabled[disabled]:hover,.woocommerce button.button.disabled:hover,.woocommerce button.button:disabled:hover,.woocommerce button.button:disabled[disabled]:hover,.woocommerce input.button.disabled:hover,.woocommerce input.button:disabled:hover,.woocommerce input.button:disabled[disabled]:hover{color:inherit;background-color:#ebe9eb}.woocommerce .cart .button,.woocommerce .cart input.button{float:none}.woocommerce a.added_to_cart{padding-top:.5em;white-space:nowrap;display:inline-block}.woocommerce #reviews h2 small{float:right;color:#777;font-size:15px;margin:10px 0 0}.woocommerce #reviews h2 small a{text-decoration:none;color:#777}.woocommerce #reviews h3{margin:0}.woocommerce #reviews #respond{margin:0;border:0;padding:0}.woocommerce #reviews #comment{height:75px}.woocommerce #reviews #comments .add_review:after,.woocommerce #reviews #comments .add_review:before{content:" ";display:table}.woocommerce #reviews #comments .add_review:after{clear:both}.woocommerce #reviews #comments h2{clear:none}.woocommerce #reviews #comments ol.commentlist{margin:0;width:100%;background:0 0;list-style:none}.woocommerce #reviews #comments ol.commentlist:after,.woocommerce #reviews #comments ol.commentlist:before{content:" ";display:table}.woocommerce #reviews #comments ol.commentlist:after{clear:both}.woocommerce #reviews #comments ol.commentlist li{padding:0;margin:0 0 20px;position:relative;background:0;border:0}.woocommerce #reviews #comments ol.commentlist li .meta{color:#777;font-size:.75em}.woocommerce #reviews #comments ol.commentlist li img.avatar{float:left;position:absolute;top:0;left:0;padding:3px;width:32px;height:auto;background:#ebe9eb;border:1px solid #e4e1e3;margin:0;box-shadow:none}.woocommerce #reviews #comments ol.commentlist li .comment-text{margin:0 0 0 50px;border:1px solid #e4e1e3;border-radius:4px;padding:1em 1em 0}.woocommerce #reviews #comments ol.commentlist li .comment-text:after,.woocommerce #reviews #comments ol.commentlist li .comment-text:before{content:" ";display:table}.woocommerce #reviews #comments ol.commentlist li .comment-text:after{clear:both}.woocommerce #reviews #comments ol.commentlist li .comment-text p{margin:0 0 1em}.woocommerce #reviews #comments ol.commentlist li .comment-text p.meta{font-size:.83em}.woocommerce #reviews #comments ol.commentlist ul.children{list-style:none;margin:20px 0 0 50px}.woocommerce #reviews #comments ol.commentlist ul.children .star-rating{display:none}.woocommerce #reviews #comments ol.commentlist #respond{border:1px solid #e4e1e3;border-radius:4px;padding:1em 1em 0;margin:20px 0 0 50px}.woocommerce #reviews #comments .commentlist>li:before{content:""}.woocommerce .star-rating{float:right;overflow:hidden;position:relative;height:1em;line-height:1;font-size:1em;width:5.4em;font-family:star}.woocommerce .star-rating:before{content:"\73\73\73\73\73";color:#d3ced2;float:left;top:0;left:0;position:absolute}.woocommerce .star-rating span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}.woocommerce .star-rating span:before{content:"\53\53\53\53\53";top:0;position:absolute;left:0}.woocommerce .woocommerce-product-rating{line-height:2;display:block}.woocommerce .woocommerce-product-rating:after,.woocommerce .woocommerce-product-rating:before{content:" ";display:table}.woocommerce .woocommerce-product-rating:after{clear:both}.woocommerce .woocommerce-product-rating .star-rating{margin:.5em 4px 0 0;float:left}.woocommerce .products .star-rating{display:block;margin:0 0 .5em;float:none}.woocommerce .hreview-aggregate .star-rating{margin:10px 0 0}.woocommerce #review_form #respond{position:static;margin:0;width:auto;padding:0;background:0 0;border:0}.woocommerce #review_form #respond:after,.woocommerce #review_form #respond:before{content:" ";display:table}.woocommerce #review_form #respond:after{clear:both}.woocommerce #review_form #respond p{margin:0 0 10px}.woocommerce #review_form #respond .form-submit input{left:auto}.woocommerce #review_form #respond textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%}.woocommerce p.stars{position:relative;font-size:1em}.woocommerce p.stars a{display:inline-block;font-weight:700;margin-right:1em;text-indent:-9999px;position:relative;border-bottom:0!important;outline:0}.woocommerce p.stars a:last-child{border-right:0}.woocommerce p.stars a.star-1,.woocommerce p.stars a.star-2,.woocommerce p.stars a.star-3,.woocommerce p.stars a.star-4,.woocommerce p.stars a.star-5{border-right:1px solid #ccc}.woocommerce p.stars a.star-1:after,.woocommerce p.stars a.star-2:after,.woocommerce p.stars a.star-3:after,.woocommerce p.stars a.star-4:after,.woocommerce p.stars a.star-5:after{font-family:WooCommerce;text-indent:0;position:absolute;top:0;left:0}.woocommerce p.stars a.star-1{width:2em}.woocommerce p.stars a.star-1:after{content:"\e021"}.woocommerce p.stars a.star-1.active:after,.woocommerce p.stars a.star-1:hover:after{content:""}.woocommerce p.stars a.star-2{width:3em}.woocommerce p.stars a.star-2:after{content:"\e021\e021"}.woocommerce p.stars a.star-2.active:after,.woocommerce p.stars a.star-2:hover:after{content:""}.woocommerce p.stars a.star-3{width:4em}.woocommerce p.stars a.star-3:after{content:"\e021\e021\e021"}.woocommerce p.stars a.star-3.active:after,.woocommerce p.stars a.star-3:hover:after{content:""}.woocommerce p.stars a.star-4{width:5em}.woocommerce p.stars a.star-4:after{content:"\e021\e021\e021\e021"}.woocommerce p.stars a.star-4.active:after,.woocommerce p.stars a.star-4:hover:after{content:""}.woocommerce p.stars a.star-5{width:6em;border:0}.woocommerce p.stars a.star-5:after{content:"\e021\e021\e021\e021\e021"}.woocommerce p.stars a.star-5.active:after,.woocommerce p.stars a.star-5:hover:after{content:""}.woocommerce table.shop_attributes{border:0;border-top:1px dotted rgba(0,0,0,.1);margin-bottom:1.618em;width:100%}.woocommerce table.shop_attributes th{width:150px;font-weight:700;padding:8px;border-top:0;border-bottom:1px dotted rgba(0,0,0,.1);margin:0;line-height:1.5}.woocommerce table.shop_attributes td{font-style:italic;padding:0;border-top:0;border-bottom:1px dotted rgba(0,0,0,.1);margin:0;line-height:1.5}.woocommerce table.shop_attributes td p{margin:0;padding:8px 0}.woocommerce table.shop_attributes .alt td,.woocommerce table.shop_attributes .alt th{background:rgba(0,0,0,.025)}.woocommerce table.shop_table{border:1px solid rgba(0,0,0,.1);margin:0 -1px 24px 0;text-align:left;width:100%;border-collapse:separate;border-radius:5px}.woocommerce table.shop_table th{font-weight:700;padding:9px 12px}.woocommerce table.shop_table td{border-top:1px solid rgba(0,0,0,.1);padding:6px 12px;vertical-align:middle}.woocommerce table.shop_table td small{font-weight:400}.woocommerce table.shop_table tbody tr:first-child td,.woocommerce table.shop_table tbody tr:first-child th{border-top:0}.woocommerce table.shop_table tbody th,.woocommerce table.shop_table tfoot td,.woocommerce table.shop_table tfoot th{font-weight:700;border-top:1px solid rgba(0,0,0,.1)}.woocommerce table.my_account_orders{font-size:.85em}.woocommerce table.my_account_orders td,.woocommerce table.my_account_orders th{padding:4px 8px;vertical-align:middle}.woocommerce table.my_account_orders .button{white-space:nowrap}.woocommerce table.my_account_orders .order-actions{text-align:right}.woocommerce table.my_account_orders .order-actions .button{margin:.125em 0 .125em .25em}.woocommerce td.product-name dl.variation{margin:.25em 0}.woocommerce td.product-name dl.variation:after,.woocommerce td.product-name dl.variation:before{content:" ";display:table}.woocommerce td.product-name dl.variation:after{clear:both}.woocommerce td.product-name dl.variation dd,.woocommerce td.product-name dl.variation dt{display:inline-block;float:left;margin-bottom:1em}.woocommerce td.product-name dl.variation dt{font-weight:700;padding:0 0 .25em;margin:0 4px 0 0;clear:left}.woocommerce td.product-name dl.variation dd{padding:0 0 .25em}.woocommerce td.product-name dl.variation dd p:last-child{margin-bottom:0}.woocommerce td.product-name p.backorder_notification{font-size:.83em}.woocommerce td.product-quantity{min-width:80px}.woocommerce ul.cart_list,.woocommerce ul.product_list_widget{list-style:none;padding:0;margin:0}.woocommerce ul.cart_list li,.woocommerce ul.product_list_widget li{padding:4px 0;margin:0;list-style:none}.woocommerce ul.cart_list li:after,.woocommerce ul.cart_list li:before,.woocommerce ul.product_list_widget li:after,.woocommerce ul.product_list_widget li:before{content:" ";display:table}.woocommerce ul.cart_list li:after,.woocommerce ul.product_list_widget li:after{clear:both}.woocommerce ul.cart_list li a,.woocommerce ul.product_list_widget li a{display:block;font-weight:700}.woocommerce ul.cart_list li img,.woocommerce ul.product_list_widget li img{float:right;margin-left:4px;width:32px;height:auto;box-shadow:none}.woocommerce ul.cart_list li dl,.woocommerce ul.product_list_widget li dl{margin:0;padding-left:1em;border-left:2px solid rgba(0,0,0,.1)}.woocommerce ul.cart_list li dl:after,.woocommerce ul.cart_list li dl:before,.woocommerce ul.product_list_widget li dl:after,.woocommerce ul.product_list_widget li dl:before{content:" ";display:table}.woocommerce ul.cart_list li dl:after,.woocommerce ul.product_list_widget li dl:after{clear:both}.woocommerce ul.cart_list li dl dd,.woocommerce ul.cart_list li dl dt,.woocommerce ul.product_list_widget li dl dd,.woocommerce ul.product_list_widget li dl dt{display:inline-block;float:left;margin-bottom:1em}.woocommerce ul.cart_list li dl dt,.woocommerce ul.product_list_widget li dl dt{font-weight:700;padding:0 0 .25em;margin:0 4px 0 0;clear:left}.woocommerce ul.cart_list li dl dd,.woocommerce ul.product_list_widget li dl dd{padding:0 0 .25em}.woocommerce ul.cart_list li dl dd p:last-child,.woocommerce ul.product_list_widget li dl dd p:last-child{margin-bottom:0}.woocommerce ul.cart_list li .star-rating,.woocommerce ul.product_list_widget li .star-rating{float:none}.woocommerce .widget_shopping_cart .total,.woocommerce.widget_shopping_cart .total{border-top:3px double #ebe9eb;padding:4px 0 0}.woocommerce .widget_shopping_cart .total strong,.woocommerce.widget_shopping_cart .total strong{min-width:40px;display:inline-block}.woocommerce .widget_shopping_cart .cart_list li,.woocommerce.widget_shopping_cart .cart_list li{padding-left:2em;position:relative;padding-top:0}.woocommerce .widget_shopping_cart .cart_list li a.remove,.woocommerce.widget_shopping_cart .cart_list li a.remove{position:absolute;top:0;left:0}.woocommerce .widget_shopping_cart .buttons:after,.woocommerce .widget_shopping_cart .buttons:before,.woocommerce.widget_shopping_cart .buttons:after,.woocommerce.widget_shopping_cart .buttons:before{content:" ";display:table}.woocommerce .widget_shopping_cart .buttons:after,.woocommerce.widget_shopping_cart .buttons:after{clear:both}.woocommerce form .form-row{padding:3px;margin:0 0 6px}.woocommerce form .form-row [placeholder]:focus::-webkit-input-placeholder{-webkit-transition:opacity .5s .5s ease;-moz-transition:opacity .5s .5s ease;transition:opacity .5s .5s ease;opacity:0}.woocommerce form .form-row label{line-height:2}.woocommerce form .form-row label.hidden{visibility:hidden}.woocommerce form .form-row label.inline{display:inline}.woocommerce form .form-row select{cursor:pointer;margin:0}.woocommerce form .form-row .required{color:red;font-weight:700;border:0}.woocommerce form .form-row .input-checkbox{display:inline;margin:-2px 8px 0 0;text-align:center;vertical-align:middle}.woocommerce form .form-row input.input-text,.woocommerce form .form-row textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;margin:0;outline:0;line-height:1}.woocommerce form .form-row textarea{height:4em;line-height:1.5;display:block;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.woocommerce form .form-row.woocommerce-invalid .chosen-drop,.woocommerce form .form-row.woocommerce-invalid .chosen-single,.woocommerce form .form-row.woocommerce-invalid input.input-text,.woocommerce form .form-row.woocommerce-invalid select{border-color:#a00}.woocommerce form .form-row.woocommerce-validated .chosen-drop,.woocommerce form .form-row.woocommerce-validated .chosen-single,.woocommerce form .form-row.woocommerce-validated input.input-text,.woocommerce form .form-row.woocommerce-validated select{border-color:#69bf29}.woocommerce form .form-row ::-webkit-input-placeholder{line-height:normal}.woocommerce form .form-row :-moz-placeholder{line-height:normal}.woocommerce form .form-row :-ms-input-placeholder{line-height:normal}.woocommerce form.checkout_coupon,.woocommerce form.login,.woocommerce form.register{border:1px solid #d3ced2;padding:20px;margin:2em 0;text-align:left;border-radius:5px}.woocommerce ul#shipping_method{list-style:none;margin:0;padding:0}.woocommerce ul#shipping_method li{margin:0;padding:.25em 0 .25em 22px;text-indent:-22px;list-style:none}.woocommerce ul#shipping_method .amount{font-weight:700}.woocommerce p.woocommerce-shipping-contents{margin:0}.woocommerce .order_details{margin:0 0 1.5em;list-style:none}.woocommerce .order_details:after,.woocommerce .order_details:before{content:" ";display:table}.woocommerce .order_details:after{clear:both}.woocommerce .order_details li{float:left;margin-right:2em;text-transform:uppercase;font-size:.715em;line-height:1;border-right:1px dashed #d3ced2;padding-right:2em}.woocommerce .order_details li strong{display:block;font-size:1.4em;text-transform:none;line-height:1.5}.woocommerce .order_details li:last-of-type{border:none}.woocommerce .widget_layered_nav ul{margin:0;padding:0;border:0;list-style:none}.woocommerce .widget_layered_nav ul li{padding:0 0 1px;list-style:none}.woocommerce .widget_layered_nav ul li:after,.woocommerce .widget_layered_nav ul li:before{content:" ";display:table}.woocommerce .widget_layered_nav ul li:after{clear:both}.woocommerce .widget_layered_nav ul li a,.woocommerce .widget_layered_nav ul li span{padding:1px 0;text-decoration:none}.woocommerce .widget_layered_nav ul li.chosen a:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";text-decoration:none;color:#a00}.woocommerce .widget_layered_nav_filters ul{margin:0;padding:0;border:0;list-style:none;overflow:hidden;zoom:1}.woocommerce .widget_layered_nav_filters ul li{float:left;padding:0 1px 1px 0;list-style:none}.woocommerce .widget_layered_nav_filters ul li a{text-decoration:none}.woocommerce .widget_layered_nav_filters ul li a:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";text-decoration:none;color:#a00}.woocommerce .widget_price_filter .price_slider{margin-bottom:1em}.woocommerce .widget_price_filter .price_slider_amount{text-align:right;line-height:2.4;font-size:.8751em}.woocommerce .widget_price_filter .price_slider_amount .button{font-size:1.15em;float:left}.woocommerce .widget_price_filter .ui-slider{position:relative;text-align:left}.woocommerce .widget_price_filter .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1em;height:1em;background-color:#a46497;border-radius:1em;cursor:ew-resize;outline:0;top:-.3em}.woocommerce .widget_price_filter .ui-slider .ui-slider-handle:last-child{margin-left:-.8em}.woocommerce .widget_price_filter .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;border-radius:1em;background-color:#a46497}.woocommerce .widget_price_filter .price_slider_wrapper .ui-widget-content{border-radius:1em;background-color:#602053;border:0}.woocommerce .widget_price_filter .ui-slider-horizontal{height:.5em}.woocommerce .widget_price_filter .ui-slider-horizontal .ui-slider-range{top:0;height:100%}.woocommerce .widget_price_filter .ui-slider-horizontal .ui-slider-range-min{left:-1px}.woocommerce .widget_price_filter .ui-slider-horizontal .ui-slider-range-max{right:-1px}.woocommerce-account .addresses .title:after,.woocommerce-account .addresses .title:before{content:" ";display:table}.woocommerce-account .addresses .title:after{clear:both}.woocommerce-account .addresses .title h3{float:left}.woocommerce-account .addresses .title .edit{float:right}.woocommerce-account ol.commentlist.notes li.note p.meta{font-weight:700;margin-bottom:0}.woocommerce-account ol.commentlist.notes li.note .description p:last-child{margin-bottom:0}.woocommerce-account ul.digital-downloads{margin-left:0;padding-left:0}.woocommerce-account ul.digital-downloads li{list-style:none;margin-left:0;padding-left:0}.woocommerce-account ul.digital-downloads li:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";text-decoration:none}.woocommerce-account ul.digital-downloads li .count{float:right}.woocommerce-cart table.cart .product-thumbnail{min-width:32px}.woocommerce-cart table.cart img{width:32px;box-shadow:none}.woocommerce-cart table.cart td,.woocommerce-cart table.cart th{vertical-align:middle}.woocommerce-cart table.cart td.actions .coupon .input-text{float:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #d3ced2;padding:6px 6px 5px;margin:0 4px 0 0;outline:0;line-height:1}.woocommerce-cart table.cart input{margin:0;vertical-align:middle;line-height:1}.woocommerce-cart .wc-proceed-to-checkout{padding:1em 0}.woocommerce-cart .wc-proceed-to-checkout:after,.woocommerce-cart .wc-proceed-to-checkout:before{content:" ";display:table}.woocommerce-cart .wc-proceed-to-checkout:after{clear:both}.woocommerce-cart .wc-proceed-to-checkout a.checkout-button{display:block;text-align:center;margin-bottom:1em}.woocommerce-cart .cart-collaterals .shipping_calculator .button{width:100%;float:none;display:block}.woocommerce-cart .cart-collaterals .shipping_calculator .shipping-calculator-button:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-left:.618em;content:"";text-decoration:none}.woocommerce-cart .cart-collaterals .cart_totals p{margin:0}.woocommerce-cart .cart-collaterals .cart_totals p small{color:#777;font-size:.83em}.woocommerce-cart .cart-collaterals .cart_totals table{border-collapse:separate;border-radius:5px;margin:0 0 6px;padding:0}.woocommerce-cart .cart-collaterals .cart_totals table tr:first-child td,.woocommerce-cart .cart-collaterals .cart_totals table tr:first-child th{border-top:0}.woocommerce-cart .cart-collaterals .cart_totals table th{padding:6px 12px 0 0;width:25%}.woocommerce-cart .cart-collaterals .cart_totals table td{padding:6px 0}.woocommerce-cart .cart-collaterals .cart_totals table td,.woocommerce-cart .cart-collaterals .cart_totals table th{vertical-align:top}.woocommerce-cart .cart-collaterals .cart_totals table small{display:block;color:#777}.woocommerce-cart .cart-collaterals .cart_totals table select{width:100%}.woocommerce-cart .cart-collaterals .cart_totals .discount td{color:#77a464}.woocommerce-cart .cart-collaterals .cart_totals tr td,.woocommerce-cart .cart-collaterals .cart_totals tr th{border-top:1px solid #ebe9eb}.woocommerce-cart .cart-collaterals .cross-sells ul.products li.product{margin-top:0}.woocommerce-checkout .checkout .col-2 h3#ship-to-different-address{float:left;clear:none}.woocommerce-checkout .checkout .col-2 .form-row-first,.woocommerce-checkout .checkout .col-2 .notes{clear:left}.woocommerce-checkout .checkout .create-account small{font-size:11px;color:#777;font-weight:400}.woocommerce-checkout .checkout div.shipping-address{padding:0;clear:left;width:100%}.woocommerce-checkout .checkout .shipping_address{clear:both}.woocommerce-checkout #payment{background:#ebe9eb;border-radius:5px}.woocommerce-checkout #payment ul.payment_methods{text-align:left;padding:1em;border-bottom:1px solid #d3ced2;margin:0;list-style:none}.woocommerce-checkout #payment ul.payment_methods:after,.woocommerce-checkout #payment ul.payment_methods:before{content:" ";display:table}.woocommerce-checkout #payment ul.payment_methods:after{clear:both}.woocommerce-checkout #payment ul.payment_methods li{line-height:2;text-align:left;margin:0;font-weight:400}.woocommerce-checkout #payment ul.payment_methods li input{margin:0 1em 0 0}.woocommerce-checkout #payment ul.payment_methods li img{vertical-align:middle;margin:-2px 0 0 .5em;padding:0;position:relative;box-shadow:none}.woocommerce-checkout #payment ul.payment_methods li img+img{margin-left:2px}.woocommerce-checkout #payment div.form-row{padding:1em}.woocommerce-checkout #payment div.payment_box{position:relative;width:96%;padding:1em 2%;margin:1em 0;font-size:.92em;border-radius:2px;line-height:1.5;background-color:#dfdcde;color:#515151}.woocommerce-checkout #payment div.payment_box input.input-text,.woocommerce-checkout #payment div.payment_box textarea{border-color:#bbb3b9 #c7c1c6 #c7c1c6}.woocommerce-checkout #payment div.payment_box ::-webkit-input-placeholder{color:#bbb3b9}.woocommerce-checkout #payment div.payment_box :-moz-placeholder{color:#bbb3b9}.woocommerce-checkout #payment div.payment_box :-ms-input-placeholder{color:#bbb3b9}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number{font-size:1.5em;padding:8px;background-repeat:no-repeat;background-position:right}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.visa,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.visa,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.visa{background-image:url(../images/icons/credit-cards/visa.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.mastercard,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.mastercard,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.mastercard{background-image:url(../images/icons/credit-cards/mastercard.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.laser,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.laser,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.laser{background-image:url(../images/icons/credit-cards/laser.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.dinersclub,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.dinersclub,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.dinersclub{background-image:url(../images/icons/credit-cards/diners.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.maestro,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.maestro,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.maestro{background-image:url(../images/icons/credit-cards/maestro.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.jcb,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.jcb,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.jcb{background-image:url(../images/icons/credit-cards/jcb.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.amex,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.amex,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.amex{background-image:url(../images/icons/credit-cards/amex.png)}.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-cvc.discover,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-expiry.discover,.woocommerce-checkout #payment div.payment_box .wc-credit-card-form-card-number.discover{background-image:url(../images/icons/credit-cards/discover.png)}.woocommerce-checkout #payment div.payment_box span.help{font-size:.857em;color:#777;font-weight:400}.woocommerce-checkout #payment div.payment_box .form-row{margin:0 0 1em}.woocommerce-checkout #payment div.payment_box p:last-child{margin-bottom:0}.woocommerce-checkout #payment div.payment_box:after{content:"";display:block;border:8px solid #dfdcde;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;position:absolute;top:-3px;left:0;margin:-1em 0 0 2em}.woocommerce-checkout #payment .payment_method_paypal .about_paypal{float:right;line-height:52px;font-size:.83em}.woocommerce-checkout #payment .payment_method_paypal img{max-height:52px;vertical-align:middle}#content.twentyeleven .woocommerce-pagination a{font-size:1em;line-height:1}.single-product .twentythirteen #reply-title,.single-product .twentythirteen #respond #commentform,.single-product .twentythirteen .entry-summary{padding:0}.single-product .twentythirteen p.stars{clear:both}.twentythirteen .woocommerce-breadcrumb{padding-top:40px}.twentyfourteen ul.products li.product{margin-top:0!important} \ No newline at end of file diff --git a/assets/css/woocommerce.scss b/assets/css/woocommerce.scss index 72ded42a645..04cd2c43422 100644 --- a/assets/css/woocommerce.scss +++ b/assets/css/woocommerce.scss @@ -899,6 +899,7 @@ p.demo_store { text-indent: -9999px; position: relative; border-bottom: 0 !important; + outline: 0; &:last-child { border-right: 0; From 3ede7907a416b0bad1e1643500365185eaef1c23 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 12 Dec 2014 09:37:15 -0200 Subject: [PATCH 411/743] Minify the checkout script --- assets/js/frontend/checkout.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/frontend/checkout.min.js b/assets/js/frontend/checkout.min.js index 7515296a8bf..61a60a4341e 100644 --- a/assets/js/frontend/checkout.min.js +++ b/assets/js/frontend/checkout.min.js @@ -1 +1 @@ -jQuery(function(a){function b(){e&&e.abort();var b=[];a("select.shipping_method, input[name^=shipping_method][type=radio]:checked, input[name^=shipping_method][type=hidden]").each(function(){b[a(this).data("index")]=a(this).val()});var c,d,f,g,h,i,j=a("#order_review input[name=payment_method]:checked").val(),k=a("#billing_country").val(),l=a("#billing_state").val(),m=a("input#billing_postcode").val(),n=a("#billing_city").val(),o=a("input#billing_address_1").val(),p=a("input#billing_address_2").val();a("#ship-to-different-address input").is(":checked")?(c=a("#shipping_country").val(),d=a("#shipping_state").val(),f=a("input#shipping_postcode").val(),g=a("#shipping_city").val(),h=a("input#shipping_address_1").val(),i=a("input#shipping_address_2").val()):(c=k,d=l,f=m,g=n,h=o,i=p),a(".woocommerce-checkout-payment, .woocommerce-checkout-review-order-table").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var q={action:"woocommerce_update_order_review",security:wc_checkout_params.update_order_review_nonce,shipping_method:b,payment_method:j,country:k,state:l,postcode:m,city:n,address:o,address_2:p,s_country:c,s_state:d,s_postcode:f,s_city:g,s_address:h,s_address_2:i,post_data:a("form.checkout").serialize()};e=a.ajax({type:"POST",url:wc_checkout_params.ajax_url,data:q,success:function(b){b&&b.fragments&&(a.each(b.fragments,function(b,c){a(b).replaceWith(c),a(b).unblock()}),a(".woocommerce-checkout").find("input[name=payment_method]:checked").trigger("click"),a("body").trigger("updated_checkout"))}})}function c(){var b=!0;a(f).size()&&($required_inputs=a(f).closest("div").find(".address-field.validate-required"),$required_inputs.size()&&$required_inputs.each(function(){""===a(this).find("input.input-text").val()&&(b=!1)})),b&&(f=!1,a("body").trigger("update_checkout"))}if(a.blockUI.defaults.overlayCSS.cursor="default","undefined"==typeof wc_checkout_params)return!1;var d,e,f=!1;a("body").bind("update_checkout",function(){clearTimeout(d),b()}),a(".checkout_coupon, div.shipping_address").hide(),a("a.showlogin").click(function(){return a("form.login").slideToggle(),!1}),a("a.showcoupon").click(function(){return a(".checkout_coupon").slideToggle(400,function(){a("#coupon_code").focus()}),!1}),a("#ship-to-different-address input").change(function(){a("div.shipping_address").hide(),a(this).is(":checked")&&a("div.shipping_address").slideDown()}).change(),"yes"===wc_checkout_params.option_guest_checkout&&(a("div.create-account").hide(),a("input#createaccount").change(function(){a("div.create-account").hide(),a(this).is(":checked")&&a("div.create-account").slideDown()}).change()),a("#order_review").on("click",".payment_methods input.input-radio",function(){if(a(".payment_methods input.input-radio").length>1){var b=a("div.payment_box."+a(this).attr("ID"));a(this).is(":checked")&&!b.is(":visible")&&(a("div.payment_box").filter(":visible").slideUp(250),a(this).is(":checked")&&a("div.payment_box."+a(this).attr("ID")).slideDown(250))}else a("div.payment_box").show();a("#place_order").val(a(this).data("order_button_text")?a(this).data("order_button_text"):a("#place_order").data("value"))}).find("input[name=payment_method]:checked").click(),a("form.checkout").on("input change","select.shipping_method, input[name^=shipping_method], #ship-to-different-address input, .update_totals_on_change select, .update_totals_on_change input[type=radio]",function(){clearTimeout(d),f=!1,a("body").trigger("update_checkout")}).on("change",".address-field input.input-text, .update_totals_on_change input.input-text",function(){f&&c()}).on("input change",".address-field select",function(){f=this,c()}).on("input keydown",".address-field input.input-text, .update_totals_on_change input.input-text",function(a){var b=a.keyCode||a.which||0;return 9===b?!0:(f=this,clearTimeout(d),void(d=setTimeout(c,"1000")))}).on("blur input change",".input-text, select",function(){var b=a(this),c=b.closest(".form-row"),d=!0;if(c.is(".validate-required")&&""===b.val()&&(c.removeClass("woocommerce-validated").addClass("woocommerce-invalid woocommerce-invalid-required-field"),d=!1),c.is(".validate-email")&&b.val()){var e=new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);e.test(b.val())||(c.removeClass("woocommerce-validated").addClass("woocommerce-invalid woocommerce-invalid-email"),d=!1)}d&&c.removeClass("woocommerce-invalid woocommerce-invalid-required-field").addClass("woocommerce-validated")}).submit(function(){clearTimeout(d);var b=a(this);if(b.is(".processing"))return!1;if(b.triggerHandler("checkout_place_order")!==!1&&b.triggerHandler("checkout_place_order_"+a("#order_review input[name=payment_method]:checked").val())!==!1){b.addClass("processing");var c=b.data();1!=c["blockUI.isBlocked"]&&b.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({type:"POST",url:wc_checkout_params.checkout_url,data:b.serialize(),success:function(c){var d="";try{if(c.indexOf("")>=0&&(c=c.split("")[1]),c.indexOf("")>=0&&(c=c.split("")[0]),d=a.parseJSON(c),"success"!==d.result)throw"failure"===d.result?"Result failure":"Invalid response";window.location=-1!=d.redirect.indexOf("https://")||-1!=d.redirect.indexOf("http://")?d.redirect:decodeURI(d.redirect)}catch(e){if("true"===d.reload)return void window.location.reload();a(".woocommerce-error, .woocommerce-message").remove(),b.prepend(d.messages?d.messages:c),b.removeClass("processing").unblock(),b.find(".input-text, select").blur(),a("html, body").animate({scrollTop:a("form.checkout").offset().top-100},1e3),"true"===d.refresh&&a("body").trigger("update_checkout"),a("body").trigger("checkout_error")}},dataType:"html"})}return!1}),a("form.checkout_coupon").submit(function(){var b=a(this);if(b.is(".processing"))return!1;b.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_apply_coupon",security:wc_checkout_params.apply_coupon_nonce,coupon_code:b.find("input[name=coupon_code]").val()};return a.ajax({type:"POST",url:wc_checkout_params.ajax_url,data:c,success:function(c){a(".woocommerce-error, .woocommerce-message").remove(),b.removeClass("processing").unblock(),c&&(b.before(c),b.slideUp(),a("body").trigger("update_checkout"))},dataType:"html"}),!1}),a(".woocommerce-checkout-review-order").on("click",".woocommerce-remove-coupon",function(b){b.preventDefault();var c=a(this).parents(".woocommerce-checkout-review-order"),d=a(this).data("coupon");c.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var e={action:"woocommerce_remove_coupon",security:wc_checkout_params.remove_coupon_nonce,coupon:d};a.ajax({type:"POST",url:wc_checkout_params.ajax_url,data:e,success:function(b){a(".woocommerce-error, .woocommerce-message").remove(),c.removeClass("processing").unblock(),b&&(c.before(b),a("body").trigger("update_checkout"),a("form.checkout_coupon").find('input[name="coupon_code"]').val(""))},dataType:"html"})}),a("body").bind("init_checkout",function(){a("#billing_country, #shipping_country, .country_to_state").change(),a("body").trigger("update_checkout")}),"1"===wc_checkout_params.is_checkout&&a("body").trigger("init_checkout")}); \ No newline at end of file +jQuery(function(a){function b(){e&&e.abort();var b=[];a("select.shipping_method, input[name^=shipping_method][type=radio]:checked, input[name^=shipping_method][type=hidden]").each(function(){b[a(this).data("index")]=a(this).val()});var c,d,f,g,h,i,j=a("#order_review input[name=payment_method]:checked").val(),k=a("#billing_country").val(),l=a("#billing_state").val(),m=a("input#billing_postcode").val(),n=a("#billing_city").val(),o=a("input#billing_address_1").val(),p=a("input#billing_address_2").val();a("#ship-to-different-address input").is(":checked")?(c=a("#shipping_country").val(),d=a("#shipping_state").val(),f=a("input#shipping_postcode").val(),g=a("#shipping_city").val(),h=a("input#shipping_address_1").val(),i=a("input#shipping_address_2").val()):(c=k,d=l,f=m,g=n,h=o,i=p),a(".woocommerce-checkout-payment, .woocommerce-checkout-review-order-table").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var q={action:"woocommerce_update_order_review",security:wc_checkout_params.update_order_review_nonce,shipping_method:b,payment_method:j,country:k,state:l,postcode:m,city:n,address:o,address_2:p,s_country:c,s_state:d,s_postcode:f,s_city:g,s_address:h,s_address_2:i,post_data:a("form.checkout").serialize()};e=a.ajax({type:"POST",url:wc_checkout_params.ajax_url,data:q,success:function(b){if(a(".woocommerce-error, .woocommerce-message").remove(),b&&b.fragments&&a.each(b.fragments,function(b,c){a(b).replaceWith(c),a(b).unblock()}),"failure"==b.result){var c=a("form.checkout");if("true"===b.reload)return void window.location.reload();c.prepend(b.messages?b.messages:b),c.find(".input-text, select").blur(),a("html, body").animate({scrollTop:a("form.checkout").offset().top-100},1e3)}a(".woocommerce-checkout").find("input[name=payment_method]:checked").trigger("click"),a("body").trigger("updated_checkout")}})}function c(){var b=!0;a(f).size()&&($required_inputs=a(f).closest("div").find(".address-field.validate-required"),$required_inputs.size()&&$required_inputs.each(function(){""===a(this).find("input.input-text").val()&&(b=!1)})),b&&(f=!1,a("body").trigger("update_checkout"))}if(a.blockUI.defaults.overlayCSS.cursor="default","undefined"==typeof wc_checkout_params)return!1;var d,e,f=!1;a("body").bind("update_checkout",function(){clearTimeout(d),b()}),a(".checkout_coupon, div.shipping_address").hide(),a("a.showlogin").click(function(){return a("form.login").slideToggle(),!1}),a("a.showcoupon").click(function(){return a(".checkout_coupon").slideToggle(400,function(){a("#coupon_code").focus()}),!1}),a("#ship-to-different-address input").change(function(){a("div.shipping_address").hide(),a(this).is(":checked")&&a("div.shipping_address").slideDown()}).change(),"yes"===wc_checkout_params.option_guest_checkout&&(a("div.create-account").hide(),a("input#createaccount").change(function(){a("div.create-account").hide(),a(this).is(":checked")&&a("div.create-account").slideDown()}).change()),a("#order_review").on("click",".payment_methods input.input-radio",function(){if(a(".payment_methods input.input-radio").length>1){var b=a("div.payment_box."+a(this).attr("ID"));a(this).is(":checked")&&!b.is(":visible")&&(a("div.payment_box").filter(":visible").slideUp(250),a(this).is(":checked")&&a("div.payment_box."+a(this).attr("ID")).slideDown(250))}else a("div.payment_box").show();a("#place_order").val(a(this).data("order_button_text")?a(this).data("order_button_text"):a("#place_order").data("value"))}).find("input[name=payment_method]:checked").click(),a("form.checkout").on("input change","select.shipping_method, input[name^=shipping_method], #ship-to-different-address input, .update_totals_on_change select, .update_totals_on_change input[type=radio]",function(){clearTimeout(d),f=!1,a("body").trigger("update_checkout")}).on("change",".address-field input.input-text, .update_totals_on_change input.input-text",function(){f&&c()}).on("input change",".address-field select",function(){f=this,c()}).on("input keydown",".address-field input.input-text, .update_totals_on_change input.input-text",function(a){var b=a.keyCode||a.which||0;return 9===b?!0:(f=this,clearTimeout(d),void(d=setTimeout(c,"1000")))}).on("blur input change",".input-text, select",function(){var b=a(this),c=b.closest(".form-row"),d=!0;if(c.is(".validate-required")&&""===b.val()&&(c.removeClass("woocommerce-validated").addClass("woocommerce-invalid woocommerce-invalid-required-field"),d=!1),c.is(".validate-email")&&b.val()){var e=new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);e.test(b.val())||(c.removeClass("woocommerce-validated").addClass("woocommerce-invalid woocommerce-invalid-email"),d=!1)}d&&c.removeClass("woocommerce-invalid woocommerce-invalid-required-field").addClass("woocommerce-validated")}).submit(function(){clearTimeout(d);var b=a(this);if(b.is(".processing"))return!1;if(b.triggerHandler("checkout_place_order")!==!1&&b.triggerHandler("checkout_place_order_"+a("#order_review input[name=payment_method]:checked").val())!==!1){b.addClass("processing");var c=b.data();1!=c["blockUI.isBlocked"]&&b.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.ajax({type:"POST",url:wc_checkout_params.checkout_url,data:b.serialize(),success:function(c){var d="";try{if(c.indexOf("")>=0&&(c=c.split("")[1]),c.indexOf("")>=0&&(c=c.split("")[0]),d=a.parseJSON(c),"success"!==d.result)throw"failure"===d.result?"Result failure":"Invalid response";window.location=-1!=d.redirect.indexOf("https://")||-1!=d.redirect.indexOf("http://")?d.redirect:decodeURI(d.redirect)}catch(e){if("true"===d.reload)return void window.location.reload();a(".woocommerce-error, .woocommerce-message").remove(),b.prepend(d.messages?d.messages:c),b.removeClass("processing").unblock(),b.find(".input-text, select").blur(),a("html, body").animate({scrollTop:a("form.checkout").offset().top-100},1e3),"true"===d.refresh&&a("body").trigger("update_checkout"),a("body").trigger("checkout_error")}},dataType:"html"})}return!1}),a("form.checkout_coupon").submit(function(){var b=a(this);if(b.is(".processing"))return!1;b.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={action:"woocommerce_apply_coupon",security:wc_checkout_params.apply_coupon_nonce,coupon_code:b.find("input[name=coupon_code]").val()};return a.ajax({type:"POST",url:wc_checkout_params.ajax_url,data:c,success:function(c){a(".woocommerce-error, .woocommerce-message").remove(),b.removeClass("processing").unblock(),c&&(b.before(c),b.slideUp(),a("body").trigger("update_checkout"))},dataType:"html"}),!1}),a(".woocommerce-checkout-review-order").on("click",".woocommerce-remove-coupon",function(b){b.preventDefault();var c=a(this).parents(".woocommerce-checkout-review-order"),d=a(this).data("coupon");c.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var e={action:"woocommerce_remove_coupon",security:wc_checkout_params.remove_coupon_nonce,coupon:d};a.ajax({type:"POST",url:wc_checkout_params.ajax_url,data:e,success:function(b){a(".woocommerce-error, .woocommerce-message").remove(),c.removeClass("processing").unblock(),b&&(c.before(b),a("body").trigger("update_checkout"),a("form.checkout_coupon").find('input[name="coupon_code"]').val(""))},dataType:"html"})}),a("body").bind("init_checkout",function(){a("#billing_country, #shipping_country, .country_to_state").change(),a("body").trigger("update_checkout")}),"1"===wc_checkout_params.is_checkout&&a("body").trigger("init_checkout")}); \ No newline at end of file From 264a347fb5d2fcadbff5a0a261ab08078441eea7 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 12 Dec 2014 09:49:54 -0200 Subject: [PATCH 412/743] Registre support for twenty fifteen --- includes/wc-core-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/wc-core-functions.php b/includes/wc-core-functions.php index 5b07ea74042..74197af5a82 100644 --- a/includes/wc-core-functions.php +++ b/includes/wc-core-functions.php @@ -661,7 +661,7 @@ add_filter( 'mod_rewrite_rules', 'wc_ms_protect_download_rewite_rules' ); * @return array */ function wc_get_core_supported_themes() { - return array( 'twentyfourteen', 'twentythirteen', 'twentyeleven', 'twentytwelve', 'twentyten' ); + return array( 'twentyfifteen', 'twentyfourteen', 'twentythirteen', 'twentyeleven', 'twentytwelve', 'twentyten' ); } /** From 32e30ed877ed804b1680153ce165473265fc9b52 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 12 Dec 2014 10:03:11 -0200 Subject: [PATCH 413/743] Improved the purchased items on order screen --- includes/admin/class-wc-admin-post-types.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index c8054a31a41..52dda1ee5ef 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -500,7 +500,11 @@ class WC_Admin_Post_Types { - get_sku() ) echo $_product->get_sku() . ' - '; ?> + + get_sku() ) ? $_product->get_sku() . ' - ' : ''; ?> + + + [?] From 7466f73f7a24ed2dc0ccd46570343c8ea5e51e96 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 12 Dec 2014 10:04:40 -0200 Subject: [PATCH 414/743] Updated the changelog for 32e30e --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index a796cd9b39a..5e6ee284e22 100644 --- a/readme.txt +++ b/readme.txt @@ -147,6 +147,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Refactor - Improved the Shipping Class field in products quick edit and bulk edit. * Refactor - Removed style settings in favour of separate plugin. * Refactor - Removed quantity increment/decrement buttons in favour of separate plugin. +* Feature - Added link on purchased products list on orders screen. * Fix - When 'hide out of stock products' is disabled, out of stock variations / attributes are now visible. * Tweak - Double the default product image dimensions. * Tweak - Added refunds to Sales by Date report. From 82e15ab2318b535d485d97af6ad190ec897c1765 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 12 Dec 2014 10:29:22 -0200 Subject: [PATCH 415/743] [Tests] Updated the test for wc_get_core_supported_themes() --- tests/unit-tests/core-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit-tests/core-functions.php b/tests/unit-tests/core-functions.php index fdbcd226f0b..7db66128207 100644 --- a/tests/unit-tests/core-functions.php +++ b/tests/unit-tests/core-functions.php @@ -118,7 +118,7 @@ class WC_Tests_Core_Functions extends WC_Unit_Test_Case { */ public function test_wc_get_core_supported_themes() { - $expected_themes = array( 'twentyfourteen', 'twentythirteen', 'twentyeleven', 'twentytwelve', 'twentyten' ); + $expected_themes = array( 'twentyfifteen', 'twentyfourteen', 'twentythirteen', 'twentyeleven', 'twentytwelve', 'twentyten' ); $this->assertEquals( $expected_themes, wc_get_core_supported_themes() ); } From 24cfef046e01df95cd383b3f49c8e6920c6a96ac Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 12 Dec 2014 10:48:55 -0200 Subject: [PATCH 416/743] Fixed the email settings save method --- includes/admin/settings/class-wc-settings-emails.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/admin/settings/class-wc-settings-emails.php b/includes/admin/settings/class-wc-settings-emails.php index a86859ba83e..486a94423f1 100644 --- a/includes/admin/settings/class-wc-settings-emails.php +++ b/includes/admin/settings/class-wc-settings-emails.php @@ -201,11 +201,13 @@ class WC_Settings_Emails extends WC_Settings_Page { WC_Admin_Settings::save_fields( $settings ); } else { + // Init email classes + WC()->mailer()->init(); + if ( class_exists( $current_section ) ) { $current_section_class = new $current_section(); do_action( 'woocommerce_update_options_' . $this->id . '_' . $current_section_class->id ); - WC()->mailer()->init(); } else { do_action( 'woocommerce_update_options_' . $this->id . '_' . $current_section ); } From c0e01e88dcd2e19d54d0956c46e373010519ff24 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 12 Dec 2014 11:15:38 -0200 Subject: [PATCH 417/743] Fixed the force http option on customizer screen, closes #6809 --- includes/class-wc-https.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/class-wc-https.php b/includes/class-wc-https.php index 8eaf0dc8f12..dd319596159 100644 --- a/includes/class-wc-https.php +++ b/includes/class-wc-https.php @@ -43,7 +43,7 @@ class WC_HTTPS { add_filter( 'page_link', array( __CLASS__, 'force_https_page_link' ), 10, 2 ); add_action( 'template_redirect', array( __CLASS__, 'force_https_template_redirect' ) ); - if ( 'yes' == get_option('woocommerce_unforce_ssl_checkout') ) { + if ( 'yes' == get_option( 'woocommerce_unforce_ssl_checkout' ) ) { add_action( 'template_redirect', array( __CLASS__, 'unforce_https_template_redirect' ) ); } } @@ -75,7 +75,7 @@ class WC_HTTPS { public static function force_https_page_link( $link, $page_id ) { if ( in_array( $page_id, array( get_option( 'woocommerce_checkout_page_id' ), get_option( 'woocommerce_myaccount_page_id' ) ) ) ) { $link = str_replace( 'http:', 'https:', $link ); - } elseif ( get_option('woocommerce_unforce_ssl_checkout') == 'yes' ) { + } elseif ( 'yes' == get_option( 'woocommerce_unforce_ssl_checkout' ) ) { $link = str_replace( 'https:', 'http:', $link ); } return $link; @@ -101,6 +101,10 @@ class WC_HTTPS { * Template redirect - if we end up on a page ensure it has the correct http/https url */ public static function unforce_https_template_redirect() { + if ( function_exists( 'is_customize_preview' ) && is_customize_preview() ) { + return; + } + if ( is_ssl() && $_SERVER['REQUEST_URI'] && ! is_checkout() && ! is_ajax() && ! is_account_page() && apply_filters( 'woocommerce_unforce_ssl_checkout', true ) ) { if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) { From c929b35f4f1dd4f5a610611adbf56734eda28db4 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Fri, 12 Dec 2014 16:39:24 +0000 Subject: [PATCH 418/743] $discount_total deprecated to prevent errors. --- includes/class-wc-cart.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index 4441fd50e5d..640429a5717 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -61,6 +61,9 @@ class WC_Cart { /** @var float Discounted tax amount. Used predominantly for displaying tax inclusive prices correctly */ public $discount_cart_tax; + /** @var @deprecated 2.3 No longer used - used to be after tax discount. */ + public $discount_total = 0; + /** @var float Total for additional fees. */ public $fee_total; From 843446369429090fd5a4f61359bec0ea347a1ba1 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Fri, 12 Dec 2014 17:03:11 +0000 Subject: [PATCH 419/743] Tweak skip button to make it less clickable --- assets/css/activation.css | 2 +- assets/css/activation.scss | 6 +++++- includes/admin/views/html-notice-install.php | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/assets/css/activation.css b/assets/css/activation.css index 6f22ddd78df..3c886792f05 100644 --- a/assets/css/activation.css +++ b/assets/css/activation.css @@ -1 +1 @@ -.woocommerce-message{position:relative;border-left-color:#cc99c2!important;overflow:hidden}.woocommerce-message a.button-primary,p.woocommerce-actions a.button-primary{background:#cc99c2;border-color:#b366a4;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none!important}.woocommerce-message a.button-primary:hover,p.woocommerce-actions a.button-primary:hover{background:#bb77ae;border-color:#aa559a;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15)}.woocommerce-message a.button-primary:active,p.woocommerce-actions a.button-primary:active{background:#aa559a;border-color:#aa559a}.woocommerce-message a.docs,.woocommerce-message a.skip,p.woocommerce-actions a.docs,p.woocommerce-actions a.skip{opacity:.7}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important} \ No newline at end of file +.woocommerce-message{position:relative;border-left-color:#cc99c2!important;overflow:hidden}.woocommerce-message a.button-primary,p.woocommerce-actions a.button-primary{background:#cc99c2;border-color:#b366a4;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none!important}.woocommerce-message a.button-primary:hover,p.woocommerce-actions a.button-primary:hover{background:#bb77ae;border-color:#aa559a;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15)}.woocommerce-message a.button-primary:active,p.woocommerce-actions a.button-primary:active{background:#aa559a;border-color:#aa559a}.woocommerce-message a.docs,.woocommerce-message a.skip,p.woocommerce-actions a.docs,p.woocommerce-actions a.skip{opacity:.5}.woocommerce-message a.docs:focus,.woocommerce-message a.docs:hover,.woocommerce-message a.skip:focus,.woocommerce-message a.skip:hover,p.woocommerce-actions a.docs:focus,p.woocommerce-actions a.docs:hover,p.woocommerce-actions a.skip:focus,p.woocommerce-actions a.skip:hover{opacity:1}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important} \ No newline at end of file diff --git a/assets/css/activation.scss b/assets/css/activation.scss index 3572526053c..4ff3e007aaf 100644 --- a/assets/css/activation.scss +++ b/assets/css/activation.scss @@ -48,7 +48,11 @@ p.woocommerce-actions, a.skip, a.docs { - opacity: 0.7; + opacity: 0.5; + + &:hover, &:focus { + opacity: 1; + } } .twitter-share-button { diff --git a/includes/admin/views/html-notice-install.php b/includes/admin/views/html-notice-install.php index fb7da37a5a4..99849ceb5df 100644 --- a/includes/admin/views/html-notice-install.php +++ b/includes/admin/views/html-notice-install.php @@ -11,5 +11,5 @@ if ( ! defined( 'ABSPATH' ) ) {

    Welcome to WooCommerce – You\'re almost ready to start selling :)', 'woocommerce' ); ?>

    -

    +

    \ No newline at end of file From ca1b9c334c109152a2406cecd21ab947485c2c18 Mon Sep 17 00:00:00 2001 From: juangadiel Date: Fri, 12 Dec 2014 17:18:16 -0400 Subject: [PATCH 420/743] Update class-wc-checkout.php fixes issue #6940 Check if the cart needs shipping before updating the user shipping address. This fixes the issue (#6940) of the shipping address being updated with the user billing address when purchasing a virtual product. --- includes/class-wc-checkout.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/class-wc-checkout.php b/includes/class-wc-checkout.php index 7409018ad65..ccdeedab230 100644 --- a/includes/class-wc-checkout.php +++ b/includes/class-wc-checkout.php @@ -7,7 +7,7 @@ * @class WC_Cart * @version 2.1.0 * @package WooCommerce/Classes - * @category Class + * @category Class * @author WooThemes */ class WC_Checkout { @@ -300,8 +300,10 @@ class WC_Checkout { foreach ( $billing_address as $key => $value ) { update_user_meta( $this->customer_id, 'billing_' . $key, $value ); } - foreach ( $shipping_address as $key => $value ) { - update_user_meta( $this->customer_id, 'shipping_' . $key, $value ); + if (WC()->cart->needs_shipping()) { + foreach ( $shipping_address as $key => $value ) { + update_user_meta( $this->customer_id, 'shipping_' . $key, $value ); + } } } do_action( 'woocommerce_checkout_update_user_meta', $this->customer_id, $this->posted ); From a94cf06e4bd14c83e99b681f62c6d30a8a140ac9 Mon Sep 17 00:00:00 2001 From: thenbrent Date: Mon, 15 Dec 2014 15:25:53 +1000 Subject: [PATCH 421/743] Deprecated notice for WC_Cart->discount_total Related to #6830 --- includes/class-wc-cart.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index 640429a5717..cb0a8f18027 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -61,9 +61,6 @@ class WC_Cart { /** @var float Discounted tax amount. Used predominantly for displaying tax inclusive prices correctly */ public $discount_cart_tax; - /** @var @deprecated 2.3 No longer used - used to be after tax discount. */ - public $discount_total = 0; - /** @var float Total for additional fees. */ public $fee_total; @@ -124,6 +121,9 @@ class WC_Cart { _deprecated_argument( 'WC_Cart->tax', '2.3', 'Use WC_Tax:: directly' ); $this->tax = new WC_Tax(); return $this->tax; + case 'discount_total': + _deprecated_argument( 'WC_Cart->discount_total', '2.3', 'After tax coupons are no longer supported. For more information see: http://develop.woothemes.com/woocommerce/2014/12/upcoming-coupon-changes-in-woocommerce-2-3/' ); + return 0; } } From e1560bc9c6ed6321c985c155812781528561453a Mon Sep 17 00:00:00 2001 From: thenbrent Date: Mon, 15 Dec 2014 15:27:10 +1000 Subject: [PATCH 422/743] Remove mention of after tax discounts in comments Related to #6830 --- includes/class-wc-cart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index cb0a8f18027..223be8c878f 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -1313,7 +1313,7 @@ class WC_Cart { // Allow plugins to hook and alter totals before final total is calculated do_action( 'woocommerce_calculate_totals', $this ); - // Grand Total - Discounted product prices, discounted tax, shipping cost + tax, and any discounts to be added after tax (e.g. store credit) + // Grand Total - Discounted product prices, discounted tax, shipping cost + tax $this->total = max( 0, apply_filters( 'woocommerce_calculated_total', round( $this->cart_contents_total + $this->tax_total + $this->shipping_tax_total + $this->shipping_total + $this->fee_total, $this->dp ), $this ) ); } else { From 7cec3c9f0ba8ce591798caed8970e05eda21b8be Mon Sep 17 00:00:00 2001 From: Nicola Mustone Date: Mon, 15 Dec 2014 14:40:23 +0100 Subject: [PATCH 423/743] introduced woocommerce_get_product_attributes filter --- includes/abstracts/abstract-wc-product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/abstracts/abstract-wc-product.php b/includes/abstracts/abstract-wc-product.php index 94cad701115..c0a3c70af67 100644 --- a/includes/abstracts/abstract-wc-product.php +++ b/includes/abstracts/abstract-wc-product.php @@ -1265,7 +1265,7 @@ class WC_Product { * @return array */ public function get_attributes() { - return (array) maybe_unserialize( $this->product_attributes ); + return apply_filters( 'woocommerce_get_product_attributes', (array) maybe_unserialize( $this->product_attributes ) ); } /** From 2aeee0169af16d9ff4241f25012de55763e328f9 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Mon, 15 Dec 2014 17:28:58 -0200 Subject: [PATCH 424/743] Display Webhooks menu when the WC API is activated --- includes/class-wc-post-types.php | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/includes/class-wc-post-types.php b/includes/class-wc-post-types.php index a0462b52f44..69aad8e340f 100644 --- a/includes/class-wc-post-types.php +++ b/includes/class-wc-post-types.php @@ -366,18 +366,33 @@ class WC_Post_types { register_post_type( 'shop_webhook', apply_filters( 'woocommerce_register_post_type_shop_webhook', array( - 'label' => __( 'Webhooks', 'woocommerce' ), + 'labels' => array( + 'name' => __( 'Webhooks', 'woocommerce' ), + 'singular_name' => __( 'Webhook', 'woocommerce' ), + 'menu_name' => _x( 'Webhooks', 'Admin menu name', 'woocommerce' ), + 'add_new' => __( 'Add Webhook', 'woocommerce' ), + 'add_new_item' => __( 'Add New Webhook', 'woocommerce' ), + 'edit' => __( 'Edit', 'woocommerce' ), + 'edit_item' => __( 'Edit Webhook', 'woocommerce' ), + 'new_item' => __( 'New Webhook', 'woocommerce' ), + 'view' => __( 'View Webhooks', 'woocommerce' ), + 'view_item' => __( 'View Webhook', 'woocommerce' ), + 'search_items' => __( 'Search Webhooks', 'woocommerce' ), + 'not_found' => __( 'No Webhooks found', 'woocommerce' ), + 'not_found_in_trash' => __( 'No Webhooks found in trash', 'woocommerce' ), + 'parent' => __( 'Parent Webhook', 'woocommerce' ) + ), 'public' => false, - 'show_ui' => false, + 'show_ui' => ( current_user_can( 'manage_woocommerce' ) && 'yes' == get_option( 'woocommerce_api_enabled' ) ), 'capability_type' => 'shop_webhook', 'map_meta_cap' => true, 'publicly_queryable' => false, 'exclude_from_search' => true, - 'show_in_menu' => false, + 'show_in_menu' => 'woocommerce', 'hierarchical' => false, 'rewrite' => false, 'query_var' => false, - 'supports' => false, + 'supports' => array( 'title' ), 'show_in_nav_menus' => false, 'show_in_admin_bar' => false, ) From 1198a1dba2f14583e0954362b0106c7babff279f Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Mon, 15 Dec 2014 18:49:18 -0200 Subject: [PATCH 425/743] Improved the Webhooks columns/table list --- includes/admin/class-wc-admin-post-types.php | 131 ++++++++++++++++++- 1 file changed, 130 insertions(+), 1 deletion(-) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 52dda1ee5ef..c834f7e2f37 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -32,18 +32,23 @@ class WC_Admin_Post_Types { add_filter( 'manage_edit-product_columns', array( $this, 'product_columns' ) ); add_filter( 'manage_edit-shop_coupon_columns', array( $this, 'shop_coupon_columns' ) ); add_filter( 'manage_edit-shop_order_columns', array( $this, 'shop_order_columns' ) ); + add_filter( 'manage_edit-shop_webhook_columns', array( $this, 'shop_webhook_columns' ) ); add_action( 'manage_product_posts_custom_column', array( $this, 'render_product_columns' ), 2 ); add_action( 'manage_shop_coupon_posts_custom_column', array( $this, 'render_shop_coupon_columns' ), 2 ); add_action( 'manage_shop_order_posts_custom_column', array( $this, 'render_shop_order_columns' ), 2 ); + add_action( 'manage_shop_webhook_posts_custom_column', array( $this, 'render_shop_webhook_columns' ), 2 ); add_filter( 'manage_edit-product_sortable_columns', array( $this, 'product_sortable_columns' ) ); add_filter( 'manage_edit-shop_coupon_sortable_columns', array( $this, 'shop_coupon_sortable_columns' ) ); add_filter( 'manage_edit-shop_order_sortable_columns', array( $this, 'shop_order_sortable_columns' ) ); + add_filter( 'manage_edit-shop_webhook_sortable_columns', array( $this, 'shop_webhook_sortable_columns' ) ); add_filter( 'bulk_actions-edit-shop_order', array( $this, 'shop_order_bulk_actions' ) ); + // Views add_filter( 'views_edit-product', array( $this, 'product_sorting_link' ) ); + add_filter( 'views_edit-shop_webhook', array( $this, 'shop_webhook_links' ) ); // Bulk / quick edit add_action( 'bulk_edit_custom_box', array( $this, 'bulk_edit' ), 10, 2 ); @@ -166,6 +171,22 @@ class WC_Admin_Post_Types { return $columns; } + /** + * Define custom columns for webhooks + * @param array $existing_columns + * @return array + */ + public function shop_webhook_columns( $existing_columns ) { + $columns = array(); + $columns['cb'] = $existing_columns['cb']; + $columns['webhook_name'] = __( 'Name', 'woocommerce' ); + $columns['webhook_status'] = __( 'Status', 'woocommerce' ); + $columns['webhook_topic'] = __( 'Topic', 'woocommerce' ); + $columns['webhook_delivery_url'] = __( 'Delivery URL', 'woocommerce' ); + + return $columns; + } + /** * Ouput custom columns for products * @param string $column @@ -660,6 +681,75 @@ class WC_Admin_Post_Types { } } + /** + * Output custom columns for webhooks + * @param string $column + */ + public function render_shop_webhook_columns( $column ) { + global $post, $the_webhook; + + if ( empty( $the_webhook ) || $the_webhook->id != $post->ID ) { + $the_webhook = new WC_Webhook( $post->ID ); + } + + switch ( $column ) { + case 'webhook_name' : + $edit_link = get_edit_post_link( $the_webhook->id ); + $title = _draft_or_post_title(); + $post_type_object = get_post_type_object( $post->post_type ); + + echo '' . esc_html( $title ) . ''; + + // Get actions + $actions = array(); + + if ( current_user_can( $post_type_object->cap->edit_post, $the_webhook->id ) ) { + $actions['edit'] = '' . __( 'Edit', 'woocommerce' ) . ''; + } + + if ( current_user_can( $post_type_object->cap->delete_post, $the_webhook->id ) ) { + + if ( 'trash' == $post->post_status ) { + $actions['untrash'] = "id ) ), 'untrash-post_' . $the_webhook->id ) . "'>" . __( 'Restore', 'woocommerce' ) . ""; + } elseif ( EMPTY_TRASH_DAYS ) { + $actions['trash'] = "" . __( 'Trash', 'woocommerce' ) . ""; + } + + if ( 'trash' == $post->post_status || ! EMPTY_TRASH_DAYS ) { + $actions['delete'] = "" . __( 'Delete Permanently', 'woocommerce' ) . ""; + } + } + + $actions = apply_filters( 'post_row_actions', $actions, $post ); + + echo '
    '; + + $i = 0; + $action_count = sizeof( $actions ); + + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + echo "$link$sep"; + } + echo '
    '; + + break; + case 'webhook_status' : + echo $the_webhook->get_status(); + break; + case 'webhook_topic' : + echo $the_webhook->get_topic(); + break; + case 'webhook_delivery_url' : + echo $the_webhook->get_delivery_url(); + break; + + default : + break; + } + } + /** * Make columns sortable - https://gist.github.com/906872 * @@ -703,6 +793,20 @@ class WC_Admin_Post_Types { return wp_parse_args( $custom, $columns ); } + /** + * Make columns sortable - https://gist.github.com/906872 + * + * @param array $columns + * @return array + */ + public function shop_webhook_sortable_columns( $columns ) { + $custom = array( + 'webhook_name' => 'title' + ); + + return $custom; + } + /** * Remove edit from the bulk actions. * @@ -742,6 +846,29 @@ class WC_Admin_Post_Types { return $views; } + /** + * Webhooks links + * + * @param array $views + * @return array + */ + public function shop_webhook_links( $views ) { + $pattern = '/(shop_webhook\'>| class="current">)(.*?)( Date: Mon, 15 Dec 2014 20:03:50 -0200 Subject: [PATCH 426/743] Fixed the stock status in quick and bulk edit --- includes/admin/class-wc-admin-post-types.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 52dda1ee5ef..1448a0d37ff 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -948,7 +948,7 @@ class WC_Admin_Post_Types { if ( isset( $_REQUEST['_stock_status'] ) ) { $stock_status = wc_clean( $_REQUEST['_stock_status'] ); - if ( ! $product->is_type('variable') ) { + if ( $product->is_type( 'variable' ) ) { foreach ( $product->get_children() as $child_id ) { if ( 'yes' !== get_post_meta( $child_id, '_manage_stock', true ) ) { wc_update_product_stock_status( $child_id, $stock_status ); @@ -957,7 +957,7 @@ class WC_Admin_Post_Types { WC_Product_Variable::sync_stock_status( $post_id ); } else { - wc_update_product_stock_status( $post_id,$stock_status ); + wc_update_product_stock_status( $post_id, $stock_status ); } } @@ -1020,7 +1020,7 @@ class WC_Admin_Post_Types { if ( ! empty( $_REQUEST['_stock_status'] ) ) { $stock_status = wc_clean( $_REQUEST['_stock_status'] ); - if ( ! $product->is_type('variable') ) { + if ( $product->is_type( 'variable' ) ) { foreach ( $product->get_children() as $child_id ) { if ( 'yes' !== get_post_meta( $child_id, '_manage_stock', true ) ) { wc_update_product_stock_status( $child_id, $stock_status ); @@ -1029,7 +1029,7 @@ class WC_Admin_Post_Types { WC_Product_Variable::sync_stock_status( $post_id ); } else { - wc_update_product_stock_status( $post_id,$stock_status ); + wc_update_product_stock_status( $post_id, $stock_status ); } } From 40b0d8d0033a7f903786c098c8ef8092b5e27cff Mon Sep 17 00:00:00 2001 From: Bryce Date: Tue, 16 Dec 2014 18:36:26 +0700 Subject: [PATCH 427/743] remove var keyword in WC_Integrations --- includes/class-wc-integrations.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/class-wc-integrations.php b/includes/class-wc-integrations.php index 6822a32d9f3..08ce443449e 100644 --- a/includes/class-wc-integrations.php +++ b/includes/class-wc-integrations.php @@ -5,15 +5,15 @@ * Loads Integrations into WooCommerce. * * @class WC_Integrations - * @version 2.0.0 + * @version 2.3.0 * @package WooCommerce/Classes/Integrations * @category Class * @author WooThemes */ class WC_Integrations { - /** @var array Array of integration classes */ - var $integrations = array(); + /** Array of integration classes */ + public $integrations = array(); /** * __construct function. From e2443c9d4c6eb131747bdd59405be11a471a976c Mon Sep 17 00:00:00 2001 From: Bryce Date: Tue, 16 Dec 2014 18:37:58 +0700 Subject: [PATCH 428/743] remove var keyword in WC_Shipping --- includes/class-wc-shipping.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/includes/class-wc-shipping.php b/includes/class-wc-shipping.php index dacd061a76d..4c0edc0ef8d 100644 --- a/includes/class-wc-shipping.php +++ b/includes/class-wc-shipping.php @@ -5,7 +5,7 @@ * Handles shipping and loads shipping methods via hooks. * * @class WC_Shipping - * @version 1.6.4 + * @version 2.3.0 * @package WooCommerce/Classes/Shipping * @category Class * @author WooThemes @@ -18,22 +18,22 @@ if ( ! defined( 'ABSPATH' ) ) { class WC_Shipping { /** @var bool True if shipping is enabled. */ - var $enabled = false; + public $enabled = false; /** @var array Stores methods loaded into woocommerce. */ - var $shipping_methods = array(); + public $shipping_methods = array(); /** @var float Stores the cost of shipping */ - var $shipping_total = 0; + public $shipping_total = 0; /** @var array Stores an array of shipping taxes. */ - var $shipping_taxes = array(); + public $shipping_taxes = array(); /** @var array Stores the shipping classes. */ - var $shipping_classes = array(); + public $shipping_classes = array(); /** @var array Stores packages to ship and to get quotes for. */ - var $packages = array(); + public $packages = array(); /** * @var WC_Shipping The single instance of the class From 1c31af94f503d1b98957cf0ae4a9be9cd34452f6 Mon Sep 17 00:00:00 2001 From: Bryce Date: Tue, 16 Dec 2014 18:38:58 +0700 Subject: [PATCH 429/743] remove var keyword in WC_Shipping_Method --- .../abstracts/abstract-wc-shipping-method.php | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/includes/abstracts/abstract-wc-shipping-method.php b/includes/abstracts/abstract-wc-shipping-method.php index bab0324a0fc..1f1e9bfaf7d 100644 --- a/includes/abstracts/abstract-wc-shipping-method.php +++ b/includes/abstracts/abstract-wc-shipping-method.php @@ -10,7 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) { * Extended by shipping methods to handle shipping calculations etc. * * @class WC_Shipping_Method - * @version 1.6.4 + * @version 2.3.0 * @package WooCommerce/Abstracts * @category Abstract Class * @author WooThemes @@ -18,43 +18,43 @@ if ( ! defined( 'ABSPATH' ) ) { abstract class WC_Shipping_Method extends WC_Settings_API { /** @var string Unique ID for the shipping method - must be set. */ - var $id; + public $id; /** @var int Optional instance ID. */ - var $number; + public $number; /** @var string Method title */ - var $method_title; + public $method_title; /** @var string User set title */ - var $title; + public $title; /** @var bool True if the method is available. */ - var $availability; + public $availability; /** @var array Array of countries this method is enabled for. */ - var $countries = array(); + public $countries = array(); /** @var string If 'taxable' tax will be charged for this method (if applicable) */ - var $tax_status = 'taxable'; + public $tax_status = 'taxable'; /** @var mixed Fees for the method */ - var $fee = 0; + public $fee = 0; /** @var float Minimum fee for the method */ - var $minimum_fee = null; + public $minimum_fee = null; /** @var bool Enabled for disabled */ - var $enabled = false; + public $enabled = false; /** @var bool Whether the method has settings or not (In WooCommerce > Settings > Shipping) */ - var $has_settings = true; + public $has_settings = true; /** @var array Features this method supports. */ - var $supports = array(); + public $supports = array(); /** @var array This is an array of rates - methods must populate this array to register shipping costs */ - var $rates = array(); + public $rates = array(); /** * Whether or not we need to calculate tax on top of the shipping rate From f428da3a015eda76e841fb4cd76f976e08183902 Mon Sep 17 00:00:00 2001 From: Bryce Date: Tue, 16 Dec 2014 18:39:23 +0700 Subject: [PATCH 430/743] remove var keyword in WC_Email_Customer_Invoice --- includes/emails/class-wc-email-customer-invoice.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/emails/class-wc-email-customer-invoice.php b/includes/emails/class-wc-email-customer-invoice.php index 324ed6036ee..b9521b7df1d 100644 --- a/includes/emails/class-wc-email-customer-invoice.php +++ b/includes/emails/class-wc-email-customer-invoice.php @@ -12,15 +12,15 @@ if ( ! class_exists( 'WC_Email_Customer_Invoice' ) ) : * An email sent to the customer via admin. * * @class WC_Email_Customer_Invoice - * @version 2.0.0 + * @version 2.3.0 * @package WooCommerce/Classes/Emails * @author WooThemes * @extends WC_Email */ class WC_Email_Customer_Invoice extends WC_Email { - var $find; - var $replace; + public $find; + public $replace; /** * Constructor From 6af72ecb3d9f08457185723544e47e111d419447 Mon Sep 17 00:00:00 2001 From: Bryce Date: Tue, 16 Dec 2014 18:40:21 +0700 Subject: [PATCH 431/743] remove var keyword in some email classes --- includes/emails/class-wc-email-customer-new-account.php | 8 ++++---- includes/emails/class-wc-email-customer-note.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/emails/class-wc-email-customer-new-account.php b/includes/emails/class-wc-email-customer-new-account.php index 8273a16fcc1..83da1bc6d7e 100644 --- a/includes/emails/class-wc-email-customer-new-account.php +++ b/includes/emails/class-wc-email-customer-new-account.php @@ -12,16 +12,16 @@ if ( ! class_exists( 'WC_Email_Customer_New_Account' ) ) : * An email sent to the customer when they create an account. * * @class WC_Email_Customer_New_Account - * @version 2.0.0 + * @version 2.3.0 * @package WooCommerce/Classes/Emails * @author WooThemes * @extends WC_Email */ class WC_Email_Customer_New_Account extends WC_Email { - var $user_login; - var $user_email; - var $user_pass; + public $user_login; + public $user_email; + public $user_pass; /** * Constructor diff --git a/includes/emails/class-wc-email-customer-note.php b/includes/emails/class-wc-email-customer-note.php index 730c34e8474..1f1a8486564 100644 --- a/includes/emails/class-wc-email-customer-note.php +++ b/includes/emails/class-wc-email-customer-note.php @@ -12,14 +12,14 @@ if ( ! class_exists( 'WC_Email_Customer_Note' ) ) : * Customer note emails are sent when you add a note to an order. * * @class WC_Email_Customer_Note - * @version 2.0.0 + * @version 2.3.0 * @package WooCommerce/Classes/Emails * @author WooThemes * @extends WC_Email */ class WC_Email_Customer_Note extends WC_Email { - var $customer_note; + public $customer_note; /** * Constructor From 96ba418d5c5e9b7a466862c6937dc59ca33e7b20 Mon Sep 17 00:00:00 2001 From: Bryce Date: Tue, 16 Dec 2014 18:40:51 +0700 Subject: [PATCH 432/743] remove var keyword in WC_Email_Customer_Reset_Password --- .../emails/class-wc-email-customer-reset-password.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/emails/class-wc-email-customer-reset-password.php b/includes/emails/class-wc-email-customer-reset-password.php index d5964e1df69..e2fc8a292b3 100644 --- a/includes/emails/class-wc-email-customer-reset-password.php +++ b/includes/emails/class-wc-email-customer-reset-password.php @@ -12,7 +12,7 @@ if ( ! class_exists( 'WC_Email_Customer_Reset_Password' ) ) : * An email sent to the customer when they reset their password. * * @class WC_Email_Customer_Reset_Password - * @version 2.0.0 + * @version 2.3.0 * @package WooCommerce/Classes/Emails * @author WooThemes * @extends WC_Email @@ -20,13 +20,13 @@ if ( ! class_exists( 'WC_Email_Customer_Reset_Password' ) ) : class WC_Email_Customer_Reset_Password extends WC_Email { /** @var string */ - var $user_login; + public $user_login; /** @var string */ - var $user_email; + public $user_email; /** @var string */ - var $reset_key; + public $reset_key; /** * Constructor From a5d51d040e423dab8e3a535972d3286aa2152e0b Mon Sep 17 00:00:00 2001 From: Bryce Date: Tue, 16 Dec 2014 18:43:05 +0700 Subject: [PATCH 433/743] remove var keyword in WC_Shipping_International_Delivery --- .../class-wc-shipping-international-delivery.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/shipping/international-delivery/class-wc-shipping-international-delivery.php b/includes/shipping/international-delivery/class-wc-shipping-international-delivery.php index 41aa0d917dc..4be6206dbd4 100644 --- a/includes/shipping/international-delivery/class-wc-shipping-international-delivery.php +++ b/includes/shipping/international-delivery/class-wc-shipping-international-delivery.php @@ -4,19 +4,20 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } +if ( ! class_exists( 'WC_Shipping_International_Delivery' ) ) : /** * International Shipping Method based on Flat Rate shipping * * A simple shipping method for a flat fee per item or per order. * * @class WC_Shipping_International_Delivery - * @version 2.0.0 + * @version 2.3.0 * @package WooCommerce/Classes/Shipping * @author WooThemes */ class WC_Shipping_International_Delivery extends WC_Shipping_Flat_Rate { - var $id = 'international_delivery'; + public $id = 'international_delivery'; /** * __construct function. @@ -211,3 +212,5 @@ class WC_Shipping_International_Delivery extends WC_Shipping_Flat_Rate { } } + +endif; \ No newline at end of file From 0c95d76c45e39976228f3c1f5a1ccda5653a568e Mon Sep 17 00:00:00 2001 From: James Koster Date: Tue, 16 Dec 2014 11:43:26 +0000 Subject: [PATCH 434/743] Storefront banner on add-ons. closes #6923 --- assets/css/admin.css | 2 +- assets/css/admin.scss | 20 +++++++++++++ assets/images/storefront-bg.jpg | Bin 0 -> 16420 bytes assets/images/storefront.jpg | Bin 0 -> 20055 bytes .../admin/views/html-admin-page-addons.php | 27 ++++++++++++++++-- 5 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 assets/images/storefront-bg.jpg create mode 100644 assets/images/storefront.jpg diff --git a/assets/css/admin.css b/assets/css/admin.css index 05641f5cd39..cf2b2e1a955 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -1 +1 @@ -@charset "UTF-8";@-moz-keyframes spin{100%{-moz-transform:rotate(360deg)}}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.woocommerce-checkout .form-row .chosen-container{width:100%!important}.woocommerce-checkout .form-row .chosen-container-single .chosen-single{height:28px;line-height:29px}.woocommerce-checkout .form-row .chosen-container-single .chosen-single div b{background:url(../images/chosen-sprite.png) 0 3px no-repeat!important}.woocommerce-checkout .form-row .chosen-container-active .chosen-single-with-drop div b{background-position:-18px 4px!important}.woocommerce-checkout .form-row .chosen-container-single .chosen-search input{line-height:13px;width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce-checkout .form-row .chosen-container .chosen-drop{width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.woocommerce-checkout .form-row .chosen-container-single .chosen-single div b{background-image:url(../images/chosen-sprite@2x.png)!important;background-position:0 5px!important;background-repeat:no-repeat!important;background-size:52px 37px!important}.woocommerce-checkout .form-row .chosen-container-active .chosen-single-with-drop div b{background-position:-18px 5px!important}}.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;border:1px solid #aaa;border-radius:5px;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:0 0,top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%;background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;right:26px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover,.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:url(../images/chosen-sprite.png) 100% -20px no-repeat #fff;background:url(../images/chosen-sprite.png) 100% -20px no-repeat,-o-linear-gradient(#eee 1%,#fff 15%);background:url(../images/chosen-sprite.png) 100% -20px no-repeat,0 0,0 0,#eee 1%,#fff 15%;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.chosen-container .chosen-results{position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear,false,#3875d7 20%,#2a62bc 90%;color:#fff}.chosen-container .chosen-results li.no-results{display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear,false,#eee 1%,#fff 15%;cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:5px;height:15px;outline:0;border:0!important;background:0 0!important;box-shadow:none;color:#666;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-multi .chosen-choices li.search-field .default{color:#999}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 0 3px 5px;padding:3px 20px 3px 5px;border:1px solid #aaa;border-radius:3px;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear,false,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%;background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear,top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%;color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#eee),color-stop(80%,#fff));background-image:-webkit-linear-gradient(#eee 20%,#fff 80%);background-image:-moz-linear-gradient(#eee 20%,#fff 80%);background-image:-o-linear-gradient(#eee 20%,#fff 80%);background-image:linear,false,#eee 20%,#fff 80%;box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#111!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close,.chosen-disabled .chosen-single{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl .chosen-drop,.chosen-rtl.chosen-container-single-nosearch .chosen-search{left:9999px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:url(../images/chosen-sprite.png) -30px -20px no-repeat #fff;background:url(../images/chosen-sprite.png) -30px -20px no-repeat,-o-linear-gradient(#eee 1%,#fff 15%);background:url(../images/chosen-sprite.png) -30px -20px no-repeat,0 0,0 0,#eee 1%,#fff 15%;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-rtl .chosen-search input[type=text]{background-image:url(../images/chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}.blockUI.blockOverlay:before{height:1em;width:1em;position:absolute;top:50%;left:50%;margin-left:-.5em;margin-top:-.5em;display:block;-webkit-animation:spin 1s ease-in-out infinite;-moz-animation:spin 1s ease-in-out infinite;animation:spin 1s ease-in-out infinite;content:"";background:url(../images/icons/loader.svg) center center/cover;line-height:1;text-align:center;font-size:2em;color:rgba(0,0,0,.75)}.wc_addons_wrap .products{overflow:hidden}.wc_addons_wrap .products li{float:left;margin:0 1em 1em 0!important;padding:0;vertical-align:top;width:300px}.wc_addons_wrap .products li a{text-decoration:none;color:inherit;border:1px solid #ddd;display:block;min-height:220px;overflow:hidden;background:#f5f5f5;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1)}.wc_addons_wrap .products li a img{max-width:258px;max-height:24px;padding:17px 20px;display:block;margin:0;background:#fff;border-right:260px solid #fff}.wc_addons_wrap .products li a .price,.wc_addons_wrap .products li a img.extension-thumb+h3{display:none}.wc_addons_wrap .products li a h3{margin:0!important;padding:20px!important;background:#fff}.wc_addons_wrap .products li a p{padding:20px!important;margin:0!important;border-top:1px solid #f1f1f1}.wc_addons_wrap .products li a:focus,.wc_addons_wrap .products li a:hover{background-color:#fff}.woocommerce-message{position:relative;border-left-color:#cc99c2!important;overflow:hidden}.woocommerce-message a.button-primary,.woocommerce-message button.button-primary{background:#cc99c2;border-color:#b366a4;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none!important}.woocommerce-message a.button-primary:hover,.woocommerce-message button.button-primary:hover{background:#bb77ae;border-color:#aa559a;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15)}.woocommerce-message a.button-primary:active,.woocommerce-message button.button-primary:active{background:#aa559a;border-color:#aa559a}.woocommerce-message a.docs,.woocommerce-message a.skip{opacity:.5}.woocommerce-message .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}#variable_product_options #message{margin:10px}.clear{clear:both}.wrap.woocommerce div.error,.wrap.woocommerce div.updated{margin-top:10px}mark.amount{background:0 0;color:inherit}.postbox,.woocommerce{input:invalid;input-border:1px solid #cc010b;input-background:#ffebe8}.simplify-commerce-banner{overflow:hidden}.simplify-commerce-banner img{float:right;padding:15px 0;margin-left:1em;width:200px}table.wc_status_table{margin-bottom:1em}table.wc_status_table tr:nth-child(2n) td,table.wc_status_table tr:nth-child(2n) th{background:#fcfcfc}table.wc_status_table th{font-weight:700;padding:9px}table.wc_status_table td:first-child{width:33%}table.wc_status_table td.help{width:1em}table.wc_status_table td{padding:9px;font-size:1.1em}table.wc_status_table td mark{background:0 0}table.wc_status_table td mark.yes{color:#7ad03a}table.wc_status_table td mark.no{color:#999}table.wc_status_table td mark.error{color:#a00}table.wc_status_table td ul{margin:0}table.wc_status_table .help_tip{cursor:help}#debug-report{display:none;margin:10px 0;padding:0;position:relative}#debug-report textarea{font-family:monospace;width:100%;margin:0;height:300px;padding:20px;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;resize:none;font-size:12px;line-height:20px;outline:0}#log-viewer-select{padding:10px 0 8px;line-height:180%}#log-viewer textarea{width:100%;resize:vertical}.inline-edit-product.quick-edit-row .inline-edit-col-center,.inline-edit-product.quick-edit-row .inline-edit-col-right{float:right!important}#woocommerce-fields.inline-edit-col{clear:left}#woocommerce-fields.inline-edit-col label.featured,#woocommerce-fields.inline-edit-col label.manage_stock{margin-left:10px}#woocommerce-fields.inline-edit-col .dimensions div{display:block;margin:.2em 0}#woocommerce-fields.inline-edit-col .dimensions div span.title{display:block;float:left;width:5em}#woocommerce-fields.inline-edit-col .dimensions div span.input-text-wrap{display:block;margin-left:5em}#woocommerce-fields.inline-edit-col .text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:99%;float:left;margin:1px 1% 1px 1px}#woocommerce-fields.inline-edit-col .height,#woocommerce-fields.inline-edit-col .length,#woocommerce-fields.inline-edit-col .width{width:32.33%}#woocommerce-fields.inline-edit-col .height{margin-right:0}#woocommerce-fields-bulk.inline-edit-col label{clear:left}#woocommerce-fields-bulk.inline-edit-col .inline-edit-group label{clear:none;width:49%;margin:.2em 0}#woocommerce-fields-bulk.inline-edit-col .inline-edit-group.dimensions label{width:75%;max-width:75%}#woocommerce-fields-bulk.inline-edit-col .length,#woocommerce-fields-bulk.inline-edit-col .regular_price,#woocommerce-fields-bulk.inline-edit-col .sale_price,#woocommerce-fields-bulk.inline-edit-col .stock,#woocommerce-fields-bulk.inline-edit-col .weight{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;margin-left:4.4em}#woocommerce-fields-bulk.inline-edit-col .height,#woocommerce-fields-bulk.inline-edit-col .length,#woocommerce-fields-bulk.inline-edit-col .width{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:25%}.column-coupon_code{line-height:2.25em}.column-coupon_code,ul.wc_coupon_list{margin:0;overflow:hidden;zoom:1;clear:both}ul.wc_coupon_list li{margin:0}ul.wc_coupon_list li.code{display:inline-block}ul.wc_coupon_list li.code:after{content:", "}ul.wc_coupon_list li.code:last-of-type:after{display:none}ul.wc_coupon_list li.code .tips{cursor:pointer}ul.wc_coupon_list_block{margin:0;padding-bottom:2px}ul.wc_coupon_list_block li{border-top:1px solid #fff;border-bottom:1px solid #ccc;line-height:2.5em;margin:0;padding:.5em 0}ul.wc_coupon_list_block li:first-child{border-top:0;padding-top:0}ul.wc_coupon_list_block li:last-child{border-bottom:0;padding-bottom:0}.button.wc-reload{text-indent:-9999px;position:relative;padding:0;-webkit-border-radius:100%;border-radius:100%;height:24px;width:24px!important;display:inline-block}.button.wc-reload:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:22px}.tablenav .actions{overflow:visible}.alignleft.actions .chosen-container-single{display:inline-block;vertical-align:middle}#woocommerce-order-data .handlediv,#woocommerce-order-data h3.hndle{display:none}#woocommerce-order-data .inside{display:block!important}#order_data{padding:23px 24px 12px}#order_data h2{margin:0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;font-size:21px;font-weight:400;line-height:1.2;text-shadow:1px 1px 1px #fff;padding:0}#order_data h4{color:#333;margin:1.33em 0 0}#order_data p{color:#777}#order_data p.order_number{margin:0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;font-weight:400;line-height:1.6em;font-size:16px}#order_data .order_data_column_container{clear:both}#order_data .order_data_column{width:32%;padding:0 2% 0 0;float:left}#order_data .order_data_column:last-child{padding-right:0}#order_data .order_data_column p{padding:0!important}#order_data .order_data_column .address strong{display:block}#order_data .order_data_column .form-field{float:left;width:48%;padding:0;margin:9px 0 0}#order_data .order_data_column .form-field label{display:block;padding:0 0 3px}#order_data .order_data_column .form-field input,#order_data .order_data_column .form-field select,#order_data .order_data_column .form-field textarea{width:100%}#order_data .order_data_column .form-field #order_status_chosen .chosen-search{display:none}#order_data .order_data_column .form-field .chosen-container{width:100%!important}#order_data .order_data_column .form-field .date-picker-field{width:50%}#order_data .order_data_column .form-field .hour,#order_data .order_data_column .form-field .minute{width:2.5em}#order_data .order_data_column .form-field small{display:block;margin:5px 0 0;color:#999}#order_data .order_data_column .form-field.last{float:right}#order_data .order_data_column .form-field-wide{width:100%;clear:both}#order_data .order_data_column .form-field-wide input,#order_data .order_data_column .form-field-wide select,#order_data .order_data_column .form-field-wide textarea{width:100%}#order_data .order_data_column p.none_set{color:#999}#order_data .order_data_column ._billing_address_1_field,#order_data .order_data_column ._billing_city_field,#order_data .order_data_column ._billing_country_field,#order_data .order_data_column ._billing_email_field,#order_data .order_data_column ._billing_first_name_field,#order_data .order_data_column ._shipping_address_1_field,#order_data .order_data_column ._shipping_city_field,#order_data .order_data_column ._shipping_country_field,#order_data .order_data_column ._shipping_first_name_field{float:left}#order_data .order_data_column ._billing_address_2_field,#order_data .order_data_column ._billing_last_name_field,#order_data .order_data_column ._billing_phone_field,#order_data .order_data_column ._billing_postcode_field,#order_data .order_data_column ._billing_state_field,#order_data .order_data_column ._shipping_address_2_field,#order_data .order_data_column ._shipping_last_name_field,#order_data .order_data_column ._shipping_postcode_field,#order_data .order_data_column ._shipping_state_field{float:right}#order_data .order_data_column ._billing_company_field,#order_data .order_data_column ._shipping_company_field,#order_data .order_data_column ._transaction_id_field{clear:both;width:100%}#order_data .order_data_column ._billing_email_field{clear:left}#order_data .order_data_column div.edit_address{display:none;zoom:1;padding-right:1px}#order_data a.edit_address{opacity:.4}#order_data a.edit_address:focus,#order_data a.edit_address:hover{opacity:1}.order_actions{margin:0;overflow:hidden;zoom:1}.order_actions li{border-top:1px solid #fff;border-bottom:1px solid #ddd;padding:6px 0;margin:0;line-height:1.6em;float:left;width:50%;text-align:center}.order_actions li a{float:none;text-align:center;text-decoration:underline}.order_actions li.wide{width:auto;float:none;clear:both;padding:6px;text-align:left;overflow:hidden}.order_actions li #delete-action{line-height:25px;vertical-align:middle;text-align:left;float:left}.order_actions li .save_order{float:right}.order_actions li#actions{overflow:hidden}.order_actions li#actions .button{width:24px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:right}.order_actions li#actions select{width:225px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left}#woocommerce-order-items .inside{margin:0;padding:0;background:#fefefe}#woocommerce-order-items .wc-order-data-row{border-bottom:1px solid #DFDFDF;padding:12px;background:#f8f8f8;line-height:2em;text-align:right}#woocommerce-order-items .wc-order-data-row:after,#woocommerce-order-items .wc-order-data-row:before{content:" ";display:table}#woocommerce-order-items .wc-order-data-row:after{clear:both}#woocommerce-order-items .wc-order-data-row p{margin:0;line-height:2em}#woocommerce-order-items .wc-order-data-row .wc-used-coupons{text-align:left}#woocommerce-order-items .wc-order-data-row .wc-used-coupons .tips{display:inline-block}#woocommerce-order-items .wc-order-bulk-actions{background:#fefefe;vertical-align:top;border-top:0}#woocommerce-order-items .wc-order-bulk-actions select{vertical-align:top}#woocommerce-order-items .wc-order-bulk-actions p.bulk-actions{float:left}#woocommerce-order-items .wc-order-add-item{background:#fff;vertical-align:top;border-top:none}#woocommerce-order-items .wc-order-add-item .add_item_id,#woocommerce-order-items .wc-order-add-item .chosen-container{vertical-align:top}#woocommerce-order-items .wc-order-add-item .add_item_id .search-field input,#woocommerce-order-items .wc-order-add-item .chosen-container .search-field input{min-width:100px}#woocommerce-order-items .wc-order-add-item .chosen-container{width:400px!important;text-align:left}#woocommerce-order-items .wc-order-add-item .calculate-action,#woocommerce-order-items .wc-order-add-item .cancel-action,#woocommerce-order-items .wc-order-add-item .save-action{float:left;margin-right:2px}#woocommerce-order-items .wc-used-coupons{float:left;width:50%}#woocommerce-order-items .wc-order-totals{float:right;width:50%;margin:0;padding:0}#woocommerce-order-items .wc-order-totals .amount{font-weight:700}#woocommerce-order-items .wc-order-totals .label{vertical-align:top}#woocommerce-order-items .wc-order-totals .total{font-size:1em!important;width:10em;margin:0 0 0 .5em;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-order-items .wc-order-totals .total input[type=text]{width:96%;float:right}#woocommerce-order-items .wc-order-totals .refunded-total{color:#a00}#woocommerce-order-items .refund-actions{margin-top:5px;padding-top:12px;border-top:1px solid #DFDFDF}#woocommerce-order-items .refund-actions .button{float:right;margin-left:4px}#woocommerce-order-items .refund-actions .cancel-action{float:left;margin-left:0}#woocommerce-order-items .add_meta{margin-left:0!important}#woocommerce-order-items h3 small{color:#999}#woocommerce-order-items .amount{white-space:nowrap}#woocommerce-order-items .add-items .description{margin-right:10px}.woocommerce_order_items_wrapper{margin:0;overflow:auto}.woocommerce_order_items_wrapper table.woocommerce_order_items{width:100%;background:#fff}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th{background:#f8f8f8;padding:8px;font-size:11px;text-align:left;color:#555;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th:last-child{padding-right:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th:first-child{padding-left:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th.sortable{cursor:pointer}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th,.woocommerce_order_items_wrapper table.woocommerce_order_items td{padding:8px;text-align:left;line-height:26px;vertical-align:top;border-bottom:1px dotted #ececec}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items td textarea{width:100%}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th select,.woocommerce_order_items_wrapper table.woocommerce_order_items td select{width:50%}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th input,.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items td input,.woocommerce_order_items_wrapper table.woocommerce_order_items td textarea{font-size:14px;padding:4px;color:#555}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items td:last-child{padding-right:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th:first-child,.woocommerce_order_items_wrapper table.woocommerce_order_items td:first-child{padding-left:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody tr:last-child td{border-bottom:1px solid #dfdfdf}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody tr:first-child td{border-top:8px solid #f8f8f8}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody#order_line_items tr:first-child td{border-top:none}.woocommerce_order_items_wrapper table.woocommerce_order_items td.check-column{padding:8px 8px 8px 12px;width:1%}.woocommerce_order_items_wrapper table.woocommerce_order_items .item{min-width:200px}.woocommerce_order_items_wrapper table.woocommerce_order_items .center,.woocommerce_order_items_wrapper table.woocommerce_order_items .variation-id{text-align:center}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class{text-align:right}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax label,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity label,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax label,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class label{white-space:nowrap;color:#999;font-size:.833em}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class label input{display:inline}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class input{width:70px;vertical-align:middle;text-align:right}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax select,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity select,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax select,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class select{width:85px;height:26px;vertical-align:middle;font-size:1em}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input{display:block;background:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);margin:1px;width:70px}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input input{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:0;box-shadow:none;margin:0;color:#555;background:0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input input:last-child{color:#bbb;border-top:1px dashed #ddd}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .view{white-space:nowrap}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost del,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost del,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost del,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax del,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity del,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax del,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class del{color:#ccc}.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity{text-align:center}.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity input{text-align:center;width:50px}.woocommerce_order_items_wrapper table.woocommerce_order_items span.subtotal{opacity:.5}.woocommerce_order_items_wrapper table.woocommerce_order_items td.tax_class,.woocommerce_order_items_wrapper table.woocommerce_order_items th.tax_class{text-align:left}.woocommerce_order_items_wrapper table.woocommerce_order_items .calculated{border-color:#ae8ca2;border-style:dotted}.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta{width:100%}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta{margin:.5em 0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr th,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr th{border:0;padding:0 4px .5em 0;line-height:1.5em;width:20%}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td{padding:0 4px .5em 0;border:0;line-height:1.5em}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td input,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td input{width:100%;margin:0;position:relative;border-bottom:0;box-shadow:none}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td textarea{width:100%;height:4em;margin:0;box-shadow:none}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td input:focus+textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td input:focus+textarea{border-top-color:#999}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td p,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td p{margin:0 0 .5em;line-height:1.5em}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td p:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td p:last-child{margin:0}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb{text-align:left;width:27px}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb a{display:block}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb img{padding:1px;margin:0;border:1px solid #dfdfdf;vertical-align:middle;width:21px;height:21px}.woocommerce_order_items_wrapper table.woocommerce_order_items .refund_by{border-bottom:1px dotted #999}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.fee .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.fee .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.refund .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.refund .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.shipping .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.shipping .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax{white-space:nowrap}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax{padding:8px 16px 8px 8px}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:12px;visibility:hidden;float:right;margin:2px -16px 0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax:before,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#fff;background-color:#000;-webkit-border-radius:100%;border-radius:100%;border:1px solid #000;box-shadow:0 1px 2px rgba(0,0,0,.2)}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax:hover:before,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax:hover:before{border-color:#a00;background-color:#a00}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax:hover .delete-order-tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax:hover .delete-order-tax{visibility:visible}.woocommerce_order_items_wrapper table.woocommerce_order_items small.refunded{display:block;color:#a00;white-space:nowrap}.wc-order-items-editable .edit-order-item{text-indent:-9999px;position:relative;height:1em;width:1em;display:inline-block;margin:0 .5em 0 0}.wc-order-items-editable .edit-order-item:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";content:"\e603";color:#999}.wc-order-items-editable .edit-order-item:hover:before{color:#555}.wc-order-items-editable .delete-order-item,.wc-order-items-editable .delete_refund{text-indent:-9999px;position:relative;height:1em;width:1em;display:inline-block;margin:0}.wc-order-items-editable .delete-order-item:before,.wc-order-items-editable .delete_refund:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";content:"\e013";color:#999}.wc-order-items-editable .delete-order-item:hover:before,.wc-order-items-editable .delete_refund:hover:before{color:#a00}.wc-order-items-editable .wc-order-edit-line-item-actions{width:2.5em;text-align:right}.wc-order-items-editable .wc-order-totals .wc-order-edit-line-item-actions{width:1.5em}.wc-order-items-editable .wc-order-totals .edit-order-item{margin:0}#woocommerce-order-downloads .buttons{float:left;padding:0;margin:0;vertical-align:top}#woocommerce-order-downloads .buttons .add_item_id,#woocommerce-order-downloads .buttons .chosen-container{width:400px!important;margin-right:9px;vertical-align:top;float:left}#woocommerce-order-downloads .buttons button{margin:2px 0 0}#woocommerce-order-downloads h3 small{color:#999}#poststuff #woocommerce-order-actions .inside{margin:0;padding:0}#poststuff #woocommerce-order-actions .inside ul.order_actions li{padding:6px 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#poststuff #woocommerce-order-actions .inside ul.order_actions li:last-child{border-bottom:0}#poststuff #woocommerce-order-notes .inside{margin:0;padding:0}#poststuff #woocommerce-order-notes .inside ul.order_notes li{padding:0 10px}#woocommerce_customers p.search-box{margin:6px 0 4px;float:left}#woocommerce_customers .tablenav{float:right;clear:none}.widefat.customers td{vertical-align:middle;padding:4px 7px}.widefat .column-order_title{width:15%}.widefat .column-order_title time{display:block;color:#999;margin:3px 0}.widefat .column-orders,.widefat .column-paying,.widefat .column-spent{text-align:center;width:8%}.widefat .column-last_order{width:11%}.widefat .column-order_actions,.widefat .column-user_actions,.widefat .column-wc_actions{width:110px}.widefat .column-order_actions a.button,.widefat .column-user_actions a.button,.widefat .column-wc_actions a.button{float:left;margin:0 4px 2px 0;cursor:pointer;padding:3px 4px;height:auto}.widefat .column-order_actions a.button img,.widefat .column-user_actions a.button img,.widefat .column-wc_actions a.button img{display:block;width:12px;height:auto}.widefat small.meta{display:block;color:#999;font-size:inherit;margin:3px 0}.widefat .column-order_date,.widefat .column-order_total{width:9%}.widefat .column-order_status{width:45px;text-align:center}.widefat .column-order_status mark{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;background:0 0;font-size:1.4em;margin:0 auto}.widefat .column-order_status mark.cancelled:after,.widefat .column-order_status mark.completed:after,.widefat .column-order_status mark.failed:after,.widefat .column-order_status mark.on-hold:after,.widefat .column-order_status mark.pending:after,.widefat .column-order_status mark.processing:after,.widefat .column-order_status mark.refunded:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}.widefat .column-order_status mark.pending:after{content:"\e012";color:#ffba00}.widefat .column-order_status mark.completed:after{content:"\e015";color:#2ea2cc}.widefat .column-order_status mark.on-hold:after{content:"\e033";color:#999}.widefat .column-order_status mark.failed:after{content:"\e016";color:#d0c21f}.widefat .column-order_status mark.cancelled:after{content:"\e013";color:#a00}.widefat .column-order_status mark.processing:after{content:"\e011";color:#73a724}.widefat .column-order_status mark.refunded:after{content:"\e014";color:#999}.widefat td.column-order_status{padding-top:9px}.column-customer_message .note-on{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto;color:#999}.column-customer_message .note-on:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:16px}.column-order_notes .note-on{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto;color:#999}.column-order_notes .note-on:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:16px}.order_actions .complete,.order_actions .processing,.order_actions .view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.order_actions .complete:after,.order_actions .processing:after,.order_actions .view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.order_actions .processing:after{content:"\e00f"}.order_actions .complete:after{content:"\e017"}.order_actions .view:after{content:"\e010"}.user_actions .edit,.user_actions .link,.user_actions .refresh,.user_actions .view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.user_actions .edit:after,.user_actions .link:after,.user_actions .refresh:after,.user_actions .view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.user_actions .edit:after{content:"\e603"}.user_actions .link:after{content:"\e00d"}.user_actions .view:after{content:"\e010"}.user_actions .refresh:after{content:"\e031"}.attributes-table td,.attributes-table th{width:15%;vertical-align:top}.attributes-table .attribute-terms{width:32%}.attributes-table .attribute-actions{width:2em}.attributes-table .attribute-actions .configure-terms{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.attributes-table .attribute-actions .configure-terms:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:1.85}ul.order_notes{padding:2px 0 0}ul.order_notes li{.note_content:after;.note_content-content:"";.note_content-display:block;.note_content-position:absolute;.note_content-bottom:-10px;.note_content-left:20px;.note_content-width:0;.note_content-height:0;.note_content-border-width:10px 10px 0 0;.note_content-border-style:solid;.note_content-border-color:#efefef transparent}ul.order_notes li .note_content{padding:10px;background:#efefef;position:relative}ul.order_notes li .note_content p{margin:0;padding:0;word-wrap:break-word}ul.order_notes li p.meta{padding:10px;color:#999;margin:0;font-size:11px}ul.order_notes li p.meta .exact-date{border-bottom:1px dotted #999}ul.order_notes li a.delete_note{color:#a00}ul.order_notes li.customer-note{.note_content:after;.note_content-border-color:#d7cad2 transparent}ul.order_notes li.customer-note .note_content{background:#d7cad2}.add_note{border-top:1px solid #ddd;padding:10px 10px 0}.add_note h4{margin-top:5px!important}.add_note #add_order_note{width:100%;height:50px}table.wp-list-table .column-thumb{width:52px;text-align:center;white-space:nowrap}table.wp-list-table .column-name{width:22%}table.wp-list-table .column-product_cat,table.wp-list-table .column-product_tag{width:11%!important}table.wp-list-table .column-featured,table.wp-list-table .column-product_type{width:48px;text-align:left!important}table.wp-list-table .column-customer_message,table.wp-list-table .column-order_notes{width:48px;text-align:center}table.wp-list-table .column-customer_message img,table.wp-list-table .column-order_notes img{margin:0 auto;padding-top:0!important}table.wp-list-table .manage-column.column-featured img,table.wp-list-table .manage-column.column-product_type img{padding-left:2px}table.wp-list-table .column-price .woocommerce-price-suffix{display:none}table.wp-list-table img{margin:1px 2px}table.wp-list-table .row-actions{color:#999}table.wp-list-table td.column-thumb img{margin:0;vertical-align:middle;width:auto;height:auto;max-width:40px;max-height:40px}table.wp-list-table span.na{color:#999}table.wp-list-table .column-is_in_stock{text-align:left!important}table.wp-list-table span.wc-featured,table.wp-list-table span.wc-image,table.wp-list-table span.wc-type{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto}table.wp-list-table span.wc-featured:before,table.wp-list-table span.wc-image:before,table.wp-list-table span.wc-type:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:""}table.wp-list-table span.wc-featured{margin:0;cursor:pointer}table.wp-list-table span.wc-featured:before{content:"\e020"}table.wp-list-table span.wc-featured.not-featured:before{content:"\e021"}table.wp-list-table td.column-featured span.wc-featured{font-size:1.2em}table.wp-list-table span.wc-type{margin:0}table.wp-list-table span.wc-type:before{content:"\e01d"}table.wp-list-table span.product-type{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.2em}table.wp-list-table span.product-type:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:""}table.wp-list-table span.product-type.grouped:before{content:"\e002"}table.wp-list-table span.product-type.external:before{content:"\e034"}table.wp-list-table span.product-type.variable:before{content:"\e003"}table.wp-list-table span.product-type.downloadable:before{content:"\e001"}table.wp-list-table span.product-type.virtual:before{content:"\e000"}table.wp-list-table mark.instock{font-weight:700;color:#7ad03a;background:0 0;line-height:1}table.wp-list-table mark.outofstock{font-weight:700;color:#a44;background:0 0;line-height:1}table.wp-list-table .notes_head,table.wp-list-table .order-notes_head,table.wp-list-table .status_head{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto}table.wp-list-table .notes_head:after,table.wp-list-table .order-notes_head:after,table.wp-list-table .status_head:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}table.wp-list-table .order-notes_head:after{content:"\e028"}table.wp-list-table .notes_head:after{content:"\e026"}table.wp-list-table .status_head:after{content:"\e011"}table.wp-list-table .column-order_items{width:12%}table.wp-list-table .column-order_items table.order_items{width:100%;margin:3px 0 0;padding:0;display:none}table.wp-list-table .column-order_items table.order_items td{border:0;margin:0;padding:0 0 3px}table.wp-list-table .column-order_items table.order_items td.qty{color:#999;padding-right:6px;text-align:left}mark.notice{background:#fff;color:#a00;margin:0 0 0 10px}a.export_rates,a.import_rates{float:right;margin-left:9px;margin-top:-2px;margin-bottom:0}table.wc_input_table,table.wc_tax_rates{width:100%}table.wc_input_table span.tips,table.wc_tax_rates span.tips{color:#2ea2cc}table.wc_input_table td,table.wc_tax_rates td{padding:0;border-right:1px solid #DFDFDF;border-bottom:1px solid #DFDFDF;border-top:0;background:#fff}table.wc_input_table td input[type=number],table.wc_input_table td input[type=text],table.wc_tax_rates td input[type=number],table.wc_tax_rates td input[type=text]{width:100%;padding:5px 7px;margin:0;border:0;background:0 0}table.wc_input_table td.apply_to_shipping,table.wc_input_table td.compound,table.wc_tax_rates td.apply_to_shipping,table.wc_tax_rates td.compound{padding:5px 7px;vertical-align:middle}table.wc_input_table td.apply_to_shipping input,table.wc_input_table td.compound input,table.wc_tax_rates td.apply_to_shipping input,table.wc_tax_rates td.compound input{width:auto;padding:0}table.wc_input_table td:last-child,table.wc_tax_rates td:last-child{border-right:0}table.wc_input_table tr.current td,table.wc_tax_rates tr.current td{background-color:#fefbcc}table.wc_input_table .cost,table.wc_input_table .cost input,table.wc_input_table .item_cost,table.wc_input_table .item_cost input,table.wc_tax_rates .cost,table.wc_tax_rates .cost input,table.wc_tax_rates .item_cost,table.wc_tax_rates .item_cost input{text-align:right}table.wc_input_table th.sort,table.wc_tax_rates th.sort{width:17px;padding:0}table.wc_input_table td.sort,table.wc_tax_rates td.sort{padding:0 4px;cursor:move;background:#f9f9f9;text-align:center;vertical-align:middle}table.wc_input_table td.sort:before,table.wc_tax_rates td.sort:before{content:"\e032";font-family:WooCommerce;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%}table.wc_input_table td.sort:hover:before,table.wc_tax_rates td.sort:hover:before{color:#333}table.wc_input_table .button,table.wc_tax_rates .button{float:left;margin-right:5px}table.wc_input_table .export,table.wc_input_table .import,table.wc_tax_rates .export,table.wc_tax_rates .import{float:right;margin-right:0;margin-left:5px}table.wc_input_table span.tips,table.wc_tax_rates span.tips{padding:0 3px}table.wc_input_table .pagination,table.wc_tax_rates .pagination{float:right}table.wc_input_table .pagination .button,table.wc_tax_rates .pagination .button{margin-left:5px;margin-right:0}table.wc_input_table .pagination .current,table.wc_tax_rates .pagination .current{background:#bbb;text-shadow:none}table.wc_input_table tfoot th,table.wc_tax_rates tfoot th{padding-left:20px;padding-right:20px}table.wc_input_table tr:last-child td,table.wc_tax_rates tr:last-child td{border-bottom:0}table.wc_gateways,table.wc_shipping{position:relative}table.wc_gateways td,table.wc_shipping td{vertical-align:middle;cursor:move;padding:7px}table.wc_gateways th,table.wc_shipping th{padding:9px 7px!important;vertical-align:middle}table.wc_gateways td.name,table.wc_shipping td.name{font-weight:700}table.wc_gateways .settings,table.wc_shipping .settings{text-align:right}table.wc_gateways .default,table.wc_gateways .radio,table.wc_gateways .status,table.wc_shipping .default,table.wc_shipping .radio,table.wc_shipping .status{text-align:center}table.wc_gateways .default .tips,table.wc_gateways .radio .tips,table.wc_gateways .status .tips,table.wc_shipping .default .tips,table.wc_shipping .radio .tips,table.wc_shipping .status .tips{margin:0 auto}table.wc_gateways .default input,table.wc_gateways .radio input,table.wc_gateways .status input,table.wc_shipping .default input,table.wc_shipping .radio input,table.wc_shipping .status input{margin:0}img.help_tip{vertical-align:middle;margin:0 0 0 9px}.postbox img.help_tip{margin-top:-4px}.status-disabled,.status-enabled{font-size:1.4em;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}.status-enabled:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#a46497}.woocommerce #template div{margin:0}.woocommerce #template div p .button{float:right;margin-left:10px;margin-top:-4px}.woocommerce #template div .editor textarea{margin-bottom:8px}.woocommerce textarea[disabled=disabled]{background:#DFDFDF!important}.woocommerce table.form-table,.woocommerce table.form-table .forminp-radio ul{margin:0}.woocommerce table.form-table .forminp-radio ul li{line-height:1.4em}.woocommerce table.form-table textarea.input-text{height:100%;min-width:150px;display:block}.woocommerce table.form-table input.regular-input{width:25em}.woocommerce table.form-table textarea.wide-input{width:100%}.woocommerce table.form-table img.help_tip{padding:0;margin:-4px 0 0 5px;vertical-align:middle;cursor:help;line-height:1}.woocommerce table.form-table span.help_tip{cursor:help;color:#2ea2cc}.woocommerce table.form-table th{position:relative;padding-right:24px}.woocommerce table.form-table .chosen-container{vertical-align:top;margin-bottom:3px}.woocommerce table.form-table table.widefat th{padding-right:inherit}.woocommerce table.form-table th img.help_tip{margin:0 -24px 0 0;float:right}.woocommerce table.form-table fieldset{margin-top:4px}.woocommerce table.form-table fieldset img.help_tip{margin:-3px 0 0 5px}.woocommerce table.form-table fieldset p.description{margin-bottom:8px}.woocommerce table.form-table fieldset:first-child{margin-top:0}.woocommerce table.form-table .color_box{border:1px solid #ccc;box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.2);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding:4px 6px;float:left;width:90px;margin:0 10px 0 0}.woocommerce table.form-table .color_box strong{text-align:left;display:block;padding:0 0 2px;font-size:.92em}.woocommerce table.form-table .color_box strong img{float:right;margin:1px 0 0}.woocommerce table.form-table .color_box input.colorpick{width:100%;margin:0;font-family:monospace;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce table.form-table .color_box .iris-picker{margin:15px 0 0 -7px}.woocommerce table.form-table .color_box_clear{display:block;clear:both;padding-bottom:10px}.woocommerce table.form-table .iris-picker{z-index:100;position:absolute;display:none;border:1px solid #ccc;box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.2);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.2);border-radius:3px}.woocommerce table.form-table .iris-picker .ui-slider{border:0!important;background:none!important;margin:0!important;width:auto!important;height:auto!important}.woocommerce table.form-table .iris-picker .ui-slider .ui-slider-handle{margin-bottom:0!important}.woocommerce table.form-table .image_width_settings{vertical-align:middle}.woocommerce table.form-table .image_width_settings label{margin-left:10px}.woocommerce #tabs-wrap table a.remove{margin-left:4px}.woocommerce #tabs-wrap table p{margin:0 0 4px!important;overflow:hidden;zoom:1}.woocommerce #tabs-wrap table p a.add{float:left}#wp-excerpt-editor-container{background:#fff}#product_variation-parent #parent_id{width:100%}#postimagediv img{border:1px solid #d5d5d5;max-width:100%}#woocommerce-product-images .inside{margin:0;padding:0}#woocommerce-product-images .inside .add_product_images{padding:0 12px 12px}#woocommerce-product-images .inside #product_images_container{padding:0 0 0 9px}#woocommerce-product-images .inside #product_images_container ul{margin:0;padding:0}#woocommerce-product-images .inside #product_images_container ul:after,#woocommerce-product-images .inside #product_images_container ul:before{content:" ";display:table}#woocommerce-product-images .inside #product_images_container ul:after{clear:both}#woocommerce-product-images .inside #product_images_container ul li.add,#woocommerce-product-images .inside #product_images_container ul li.image,#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder{width:80px;float:left;cursor:move;border:1px solid #d5d5d5;margin:9px 9px 0 0;background:#f7f7f7;border-radius:2px;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-product-images .inside #product_images_container ul li.add img,#woocommerce-product-images .inside #product_images_container ul li.image img,#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder img{width:100%;height:auto;display:block}#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder{border:3px dashed #ddd;position:relative}#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:2.618em;line-height:72px;color:#ddd}#woocommerce-product-images .inside #product_images_container ul ul.actions{position:absolute;top:-8px;right:-8px;padding:2px;display:none}#woocommerce-product-images .inside #product_images_container ul ul.actions li{float:right;margin:0 0 0 2px}#woocommerce-product-images .inside #product_images_container ul ul.actions li a{width:1em;margin:0;height:0;display:block;overflow:hidden}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.tips{cursor:pointer}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.view{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.4em}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.view:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";background-color:#000;color:#fff}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.4em}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#fff;background-color:#000;border-radius:100%;box-shadow:0 1px 2px rgba(0,0,0,.2)}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete:hover before{background-color:#a00}#woocommerce-product-images .inside #product_images_container ul li:hover ul.actions{display:block}#woocommerce-product-data h3.hndle{padding:10px}#woocommerce-product-data h3.hndle span{display:block;vertical-align:middle;line-height:24px}#woocommerce-product-data h3.hndle span span{display:inline;line-height:inherit;vertical-align:baseline}#woocommerce-product-data h3.hndle label{padding-right:1em;font-size:12px;vertical-align:baseline}#woocommerce-product-data h3.hndle label:first-child{margin-right:1em;border-right:1px solid #dfdfdf}#woocommerce-product-data h3.hndle input,#woocommerce-product-data h3.hndle select{margin:-3px 0 0 .5em;vertical-align:middle}#woocommerce-product-data>.handlediv{margin-top:4px}#woocommerce-product-data .wrap{margin:0}#woocommerce-coupon-description{padding:3px 8px;font-size:1.7em;line-height:1.42em;height:auto;width:100%;outline:0;margin:10px 0;display:block}#woocommerce-coupon-description::-webkit-input-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description::-moz-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description:-ms-input-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description:-moz-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-data .panel-wrap,#woocommerce-product-data .panel-wrap{background:#fff}#woocommerce-coupon-data .wc-metaboxes-wrapper,#woocommerce-coupon-data .woocommerce_options_panel,#woocommerce-product-data .wc-metaboxes-wrapper,#woocommerce-product-data .woocommerce_options_panel{float:left;width:80%}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios,#woocommerce-product-data .woocommerce_options_panel .wc-radios{display:block;float:left;margin:0}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios li,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios li,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios li,#woocommerce-product-data .woocommerce_options_panel .wc-radios li{display:block;padding:0 0 10px}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios li input,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios li input,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios li input,#woocommerce-product-data .woocommerce_options_panel .wc-radios li input{width:auto}#woocommerce-coupon-data .panel-wrap,#woocommerce-product-data .panel-wrap,.woocommerce .panel-wrap{overflow:hidden}#woocommerce-coupon-data ul.wc-tabs,#woocommerce-product-data ul.wc-tabs,.woocommerce ul.wc-tabs{background:#fafafa;line-height:1em;float:left;width:20%;margin:0;position:relative;padding:0 0 10px;border-right:1px solid #eee;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-coupon-data ul.wc-tabs:after,#woocommerce-product-data ul.wc-tabs:after,.woocommerce ul.wc-tabs:after{content:"";display:block;width:100%;height:9999em;position:absolute;bottom:-9999em;left:0;background-color:#fafafa;border-right:1px solid #eee}#woocommerce-coupon-data ul.wc-tabs li,#woocommerce-product-data ul.wc-tabs li,.woocommerce ul.wc-tabs li{display:block;padding:0;margin:0}#woocommerce-coupon-data ul.wc-tabs li a,#woocommerce-product-data ul.wc-tabs li a,.woocommerce ul.wc-tabs li a{padding:10px;line-height:20px!important;margin:0;display:block;text-decoration:none;border-bottom:1px solid #eee}#woocommerce-coupon-data ul.wc-tabs li a:before,#woocommerce-product-data ul.wc-tabs li a:before,.woocommerce ul.wc-tabs li a:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";text-decoration:none}#woocommerce-coupon-data ul.wc-tabs li:first-child a,#woocommerce-product-data ul.wc-tabs li:first-child a,.woocommerce ul.wc-tabs li:first-child a{border-top:0!important}#woocommerce-coupon-data ul.wc-tabs li.general_options a:before,#woocommerce-product-data ul.wc-tabs li.general_options a:before,.woocommerce ul.wc-tabs li.general_options a:before{content:"\e006"}#woocommerce-coupon-data ul.wc-tabs li.inventory_options a:before,#woocommerce-product-data ul.wc-tabs li.inventory_options a:before,.woocommerce ul.wc-tabs li.inventory_options a:before{content:"\e02c"}#woocommerce-coupon-data ul.wc-tabs li.shipping_options a:before,#woocommerce-product-data ul.wc-tabs li.shipping_options a:before,.woocommerce ul.wc-tabs li.shipping_options a:before{content:"\e01a"}#woocommerce-coupon-data ul.wc-tabs li.linked_product_options a:before,#woocommerce-product-data ul.wc-tabs li.linked_product_options a:before,.woocommerce ul.wc-tabs li.linked_product_options a:before{content:"\e00d"}#woocommerce-coupon-data ul.wc-tabs li.attribute_options a:before,#woocommerce-product-data ul.wc-tabs li.attribute_options a:before,.woocommerce ul.wc-tabs li.attribute_options a:before{content:"\e02b"}#woocommerce-coupon-data ul.wc-tabs li.advanced_options a:before,#woocommerce-product-data ul.wc-tabs li.advanced_options a:before,.woocommerce ul.wc-tabs li.advanced_options a:before{content:"\e01c"}#woocommerce-coupon-data ul.wc-tabs li.variation_options a:before,#woocommerce-product-data ul.wc-tabs li.variation_options a:before,.woocommerce ul.wc-tabs li.variation_options a:before{content:"\e003"}#woocommerce-coupon-data ul.wc-tabs li.usage_restriction_options a:before,#woocommerce-product-data ul.wc-tabs li.usage_restriction_options a:before,.woocommerce ul.wc-tabs li.usage_restriction_options a:before{content:"\e602"}#woocommerce-coupon-data ul.wc-tabs li.usage_limit_options a:before,#woocommerce-product-data ul.wc-tabs li.usage_limit_options a:before,.woocommerce ul.wc-tabs li.usage_limit_options a:before{content:"\e601"}#woocommerce-coupon-data ul.wc-tabs li.general_coupon_data a:before,#woocommerce-product-data ul.wc-tabs li.general_coupon_data a:before,.woocommerce ul.wc-tabs li.general_coupon_data a:before{content:"\e600"}#woocommerce-coupon-data ul.wc-tabs li.active a,#woocommerce-product-data ul.wc-tabs li.active a,.woocommerce ul.wc-tabs li.active a{position:relative;background-color:#eee;color:#555}.woocommerce_page_wc-settings .shippingrows th.check-column{padding-top:20px}.woocommerce_page_wc-settings .shippingrows tfoot th{padding-left:10px}.woocommerce_page_wc-settings .shippingrows .add.button:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";text-decoration:none}.woocommerce_page_wc-settings h4.wc-settings-sub-title{font-size:1.2em}#woocommerce-coupon-data .inside,#woocommerce-order-data .inside,#woocommerce-order-downloads .inside,#woocommerce-product-data .inside,#woocommerce-product-type-options .inside{padding:0;margin:0}.panel,.woocommerce_options_panel{padding:9px;color:#555}.panel,.woocommerce_page_settings .woocommerce_options_panel{padding:0}#woocommerce-product-specs .inside,#woocommerce-product-type-options .panel{padding:9px;margin:0}#woocommerce-product-type-options .panel p,.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p{margin:0 0 9px;font-size:12px;padding:5px 9px;line-height:24px}#woocommerce-product-type-options .panel p:after,.woocommerce_options_panel fieldset.form-field:after,.woocommerce_options_panel p:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce_options_panel .checkbox,.woocommerce_variable_attributes .checkbox{width:auto;vertical-align:middle;margin:7px 0}.woocommerce_options_panel .downloadable_files table,.woocommerce_variations .downloadable_files table{width:100%;padding:0!important}.woocommerce_options_panel .downloadable_files table th,.woocommerce_variations .downloadable_files table th{padding:7px 0 7px 7px!important}.woocommerce_options_panel .downloadable_files table td,.woocommerce_variations .downloadable_files table td{vertical-align:middle!important;padding:4px 0 4px 7px!important;position:relative}.woocommerce_options_panel .downloadable_files table td:last-child,.woocommerce_variations .downloadable_files table td:last-child{padding-right:7px!important}.woocommerce_options_panel .downloadable_files table td input.input_text,.woocommerce_variations .downloadable_files table td input.input_text{width:100%;float:none;margin:1px 0;min-width:0}.woocommerce_options_panel .downloadable_files table td .upload_file_button,.woocommerce_variations .downloadable_files table td .upload_file_button{float:right;width:auto;cursor:pointer}.woocommerce_options_panel .downloadable_files table td .delete,.woocommerce_variations .downloadable_files table td .delete{display:block;text-indent:-9999px;position:relative;height:1em;width:1em}.woocommerce_options_panel .downloadable_files table td .delete:before,.woocommerce_variations .downloadable_files table td .delete:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";content:"\e013";color:#999}.woocommerce_options_panel .downloadable_files table td .delete:hover:before,.woocommerce_variations .downloadable_files table td .delete:hover:before{color:#a00}.woocommerce_options_panel .downloadable_files table th.sort,.woocommerce_variations .downloadable_files table th.sort{width:17px;padding:0}.woocommerce_options_panel .downloadable_files table td.sort,.woocommerce_variations .downloadable_files table td.sort{padding:0 8px;cursor:move;background:#f9f9f9;text-align:center;vertical-align:middle}.woocommerce_options_panel .downloadable_files table td.sort:before,.woocommerce_variations .downloadable_files table td.sort:before{content:"\e032";font-family:WooCommerce;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%}.woocommerce_options_panel .downloadable_files table td.sort:hover:before,.woocommerce_variations .downloadable_files table td.sort:hover:before{color:#333}.woocommerce_options_panel{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce_options_panel .downloadable_files{padding:0 9px 0 162px;position:relative;margin:9px 0}.woocommerce_options_panel .downloadable_files label{position:absolute;left:0;margin:0 0 0 12px;line-height:24px}.woocommerce_options_panel p{margin:9px 0}.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p.form-field{padding:5px 20px 5px 162px!important}.woocommerce_options_panel .sale_price_dates_fields .short:first-of-type{margin-bottom:1em}.woocommerce_options_panel .sale_price_dates_fields .short:nth-of-type(2){clear:left}.woocommerce_options_panel label,.woocommerce_options_panel legend{float:left;width:150px;padding:0;margin:0 0 0 -150px}.woocommerce_options_panel label .req,.woocommerce_options_panel legend .req{font-weight:700;font-style:normal;color:#a00}.woocommerce_options_panel .description{padding:0;margin:0 0 0 7px;clear:none;display:inline}.woocommerce_options_panel .description-block{margin-left:0;display:block}.woocommerce_options_panel input,.woocommerce_options_panel select,.woocommerce_options_panel textarea{margin:0}.woocommerce_options_panel textarea{vertical-align:top;height:3.5em;line-height:1.5em}.woocommerce_options_panel input[type=email],.woocommerce_options_panel input[type=number],.woocommerce_options_panel input[type=text]{width:50%;float:left}.woocommerce_options_panel input.button{width:auto;margin-left:8px}.woocommerce_options_panel select{float:left}.woocommerce_options_panel .short,.woocommerce_options_panel input[type=email].short,.woocommerce_options_panel input[type=number].short,.woocommerce_options_panel input[type=text].short{width:50%}.woocommerce_options_panel .sized{width:auto!important;margin-right:6px}.woocommerce_options_panel .options_group{border-top:1px solid #fff;border-bottom:1px solid #eee}.woocommerce_options_panel .options_group:first-child{border-top:0}.woocommerce_options_panel .options_group:last-child{border-bottom:0}.woocommerce_options_panel .options_group fieldset{margin:9px 0;font-size:12px;padding:5px 9px;line-height:24px}.woocommerce_options_panel .options_group fieldset label{width:auto;float:none}.woocommerce_options_panel .options_group fieldset ul{float:left;width:50%;margin:0;padding:0}.woocommerce_options_panel .options_group fieldset ul li{margin:0;width:auto}.woocommerce_options_panel .options_group fieldset ul li input{width:auto;float:none;margin-right:4px}.woocommerce_options_panel .options_group fieldset ul.wc-radios label{margin-left:0}.woocommerce_options_panel .dimensions_field .wrap{display:block;width:50%}.woocommerce_options_panel .dimensions_field .wrap input{width:30.75%;margin-right:3.8%}.woocommerce_options_panel .dimensions_field .wrap .last{margin-right:0}.woocommerce_options_panel.padded{padding:1em}#woocommerce-product-data input.dp-applied{float:left}#grouped_product_options,#simple_product_options,#virtual_product_options{padding:12px;font-style:italic;color:#666}.wc-metaboxes-wrapper .toolbar{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #eee;padding:9px 12px!important}.wc-metaboxes-wrapper .toolbar:first-child{border-top:0}.wc-metaboxes-wrapper .toolbar:last-child{border-bottom:0}.wc-metaboxes-wrapper .toolbar .add_variation,.wc-metaboxes-wrapper .toolbar .link_all_variations{float:right;margin-left:5px}.wc-metaboxes-wrapper p.toolbar{overflow:hidden;zoom:1}.wc-metaboxes-wrapper .fr,.wc-metaboxes-wrapper button.add_attribute,.wc-metaboxes-wrapper button.add_variable_attribute,.wc-metaboxes-wrapper select.attribute_taxonomy{float:right;margin:0 0 0 6px}.wc-metaboxes-wrapper .wc-metaboxes{border-bottom:1px solid #eee}.wc-metaboxes-wrapper .wc-metabox-sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;margin-bottom:9px;border-width:1px;border-style:dashed}.wc-metaboxes-wrapper .wc-metabox{background:#fff;border-bottom:1px solid #eee;margin:0!important}.wc-metaboxes-wrapper .wc-metabox select{font-weight:400}.wc-metaboxes-wrapper .wc-metabox:last-of-type{border-bottom:0}.wc-metaboxes-wrapper .wc-metabox .handlediv:before{line-height:.5!important}.wc-metaboxes-wrapper .wc-metabox.closed{border-radius:3px}.wc-metaboxes-wrapper .wc-metabox.closed .handlediv:before{content:"\f140"!important}.wc-metaboxes-wrapper .wc-metabox.closed h3{border:0}.wc-metaboxes-wrapper .wc-metabox h3{margin:0!important;padding:.75em .75em .75em 1em!important;font-size:1em!important;overflow:hidden;zoom:1;cursor:move}.wc-metaboxes-wrapper .wc-metabox h3 button{float:right}.wc-metaboxes-wrapper .wc-metabox h3 strong{line-height:24px;font-weight:700}.wc-metaboxes-wrapper .wc-metabox h3 select{font-family:sans-serif}.wc-metaboxes-wrapper .wc-metabox h3 .handlediv{background-position:6px 5px!important;display:none;height:24px}.wc-metaboxes-wrapper .wc-metabox h3.fixed{cursor:pointer!important}.wc-metaboxes-wrapper .wc-metabox h3:hover .handlediv{display:block}.wc-metaboxes-wrapper .wc-metabox table{width:100%;position:relative;background-color:#fdfdfd;padding:1em;border-top:1px solid #eee}.wc-metaboxes-wrapper .wc-metabox table td{text-align:left;padding:0 6px 1em 0;vertical-align:top;border:0}.wc-metaboxes-wrapper .wc-metabox table td label{text-align:left;display:block;line-height:21px}.wc-metaboxes-wrapper .wc-metabox table td input{float:left;min-width:200px}.wc-metaboxes-wrapper .wc-metabox table td input,.wc-metaboxes-wrapper .wc-metabox table td textarea{width:100%;margin:0;display:block;font-size:14px;padding:4px;color:#555}.wc-metaboxes-wrapper .wc-metabox table td .chosen-container,.wc-metaboxes-wrapper .wc-metabox table td select{width:100%!important}.wc-metaboxes-wrapper .wc-metabox table td input.short{width:200px}.wc-metaboxes-wrapper .wc-metabox table td input.checkbox{width:16px;min-width:inherit;vertical-align:text-bottom;display:inline-block;float:none}.wc-metaboxes-wrapper .wc-metabox table td.attribute_name{width:200px}.wc-metaboxes-wrapper .wc-metabox table .minus,.wc-metaboxes-wrapper .wc-metabox table .plus{margin-top:6px}.wc-metaboxes-wrapper .wc-metabox table .fl{float:left}.wc-metaboxes-wrapper .wc-metabox table .fr{float:right}.wc-metaboxes-wrapper .close_all,.wc-metaboxes-wrapper .expand_all{float:right;margin-left:14px;line-height:22px;text-decoration:none}.wc-metaboxes-wrapper .close_all:before,.wc-metaboxes-wrapper .expand_all:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";text-decoration:none;font-size:.8em;color:#999}.wc-metaboxes-wrapper .expand_all:before{content:"\e035"}.woocommerce_variable_attributes{background-color:#fdfdfd;border-top:1px solid #eee}.woocommerce_variable_attributes .data{padding:1em 2em}.woocommerce_variable_attributes .data:after,.woocommerce_variable_attributes .data:before{content:" ";display:table}.woocommerce_variable_attributes .data:after{clear:both}.woocommerce_variable_attributes .upload_image_button{display:block;width:48px;height:48px;float:left;margin-right:20px;position:relative}.woocommerce_variable_attributes .upload_image_button img{width:100%;height:auto}.woocommerce_variable_attributes .upload_image_button:before{content:"\f317";font-family:Dashicons;display:none;position:absolute;top:0;left:0;right:0;bottom:0;text-align:center;line-height:48px;font-size:2em;font-weight:400;-webkit-font-smoothing:antialiased}.woocommerce_variable_attributes .upload_image_button.remove:before{content:"\f335"}.woocommerce_variable_attributes .upload_image_button:hover:before{display:block}.woocommerce_variable_attributes .options{border:1px solid #eee;border-width:1px 0;padding:.25em 0}.woocommerce_variable_attributes .options label{display:inline-block;padding:4px 1em 2px 0}.woocommerce_variable_attributes .options input[type=checkbox]{margin-top:5px;margin-right:3px}.form-row label{display:block}.form-row input[type=number],.form-row input[type=text],.form-row select{width:100%}.form-row.dimensions_field input{width:25%;float:left;margin-right:1%}.form-row.dimensions_field input:last-of-type{margin-right:0}.form-row-first,.form-row-last{width:48%;float:right}.form-row-first{clear:both;float:left}.form-row-full{clear:both}.tips{cursor:help;text-decoration:none}img.tips{padding:5px 0 0}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#464646}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#464646}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#464646}#tiptip_holder.tip_left{padding-right:5px}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#464646}#tiptip_content,.chart-tooltip,.wc_error_tip{font-size:11px;color:#fff;padding:.5em;background:#464646;border-radius:3px;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.1);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.1);box-shadow:1px 1px 3px rgba(0,0,0,.1);text-align:center;max-width:150px}#tiptip_content code,.chart-tooltip code,.wc_error_tip code{background:#888;padding:1px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}.wc_error_tip{background:#d82223;max-width:20em;white-space:normal;position:absolute;margin:1.5em 1px 0 -1em;z-index:9999999}.wc_error_tip:after{content:"";display:block;border:8px solid #d82223;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;position:absolute;top:-3px;left:50%;margin:-1em 0 0 -3px}img.ui-datepicker-trigger{vertical-align:middle;margin-top:-1px;cursor:pointer}.wc-metabox-content img.ui-datepicker-trigger,.woocommerce_options_panel img.ui-datepicker-trigger{float:left;margin-right:8px;margin-top:4px;margin-left:4px}#ui-datepicker-div{display:none}.woocommerce-reports-wide.woocommerce-reports-wrap,.woocommerce-reports-wrap.woocommerce-reports-wrap{margin-left:300px;padding-top:18px}.woocommerce-reports-wide.halved,.woocommerce-reports-wrap.halved{margin:0;overflow:hidden;zoom:1}.woocommerce-reports-wide .widefat td,.woocommerce-reports-wrap .widefat td{vertical-align:top;padding:7px}.woocommerce-reports-wide .widefat td .description,.woocommerce-reports-wrap .widefat td .description{margin:4px 0 0}.woocommerce-reports-wide .postbox:after,.woocommerce-reports-wrap .postbox:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce-reports-wide .postbox h3,.woocommerce-reports-wrap .postbox h3{cursor:default!important}.woocommerce-reports-wide .postbox .inside,.woocommerce-reports-wrap .postbox .inside{padding:10px;margin:0!important}.woocommerce-reports-wide .postbox h3.stats_range,.woocommerce-reports-wrap .postbox h3.stats_range{padding:0!important;border-bottom-color:#dfdfdf}.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{float:right;line-height:26px;border-left:1px solid #dfdfdf;padding:10px;display:block;text-decoration:none}.woocommerce-reports-wide .postbox h3.stats_range .export_csv:before,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;content:"";text-decoration:none;margin-right:4px}.woocommerce-reports-wide .postbox h3.stats_range ul,.woocommerce-reports-wrap .postbox h3.stats_range ul{list-style:none;margin:0;padding:0;zoom:1;background:#f5f5f5}.woocommerce-reports-wide .postbox h3.stats_range ul:after,.woocommerce-reports-wide .postbox h3.stats_range ul:before,.woocommerce-reports-wrap .postbox h3.stats_range ul:after,.woocommerce-reports-wrap .postbox h3.stats_range ul:before{content:" ";display:table}.woocommerce-reports-wide .postbox h3.stats_range ul:after,.woocommerce-reports-wrap .postbox h3.stats_range ul:after{clear:both}.woocommerce-reports-wide .postbox h3.stats_range ul li,.woocommerce-reports-wrap .postbox h3.stats_range ul li{float:left;margin:0;padding:0;line-height:26px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li a{border-right:1px solid #dfdfdf;padding:10px;display:block;text-decoration:none}.woocommerce-reports-wide .postbox h3.stats_range ul li.active,.woocommerce-reports-wrap .postbox h3.stats_range ul li.active{background:#fff;-webkit-box-shadow:0 4px 0 0 #fff;box-shadow:0 4px 0 0 #fff}.woocommerce-reports-wide .postbox h3.stats_range ul li.active a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.active a{color:#777}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:9px 10px;vertical-align:middle}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom div,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom form,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom div,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom form{display:inline;margin:0}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom div input.range_datepicker,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom form input.range_datepicker,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom div input.range_datepicker,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom form input.range_datepicker{padding:0;margin:0 10px 0 0;background:0 0;border:0;color:#777;text-align:center;-webkit-box-shadow:none;box-shadow:none}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding:12px 12px 12px 249px;margin:0!important}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{width:225px;margin-left:-237px;float:left}.woocommerce-reports-wide .postbox .chart-widgets,.woocommerce-reports-wrap .postbox .chart-widgets{margin:0;padding:0}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget{margin:0 0 1em;background:#fafafa;border:1px solid #dfdfdf}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget h4,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget h4{background:#fff;border:1px solid #dfdfdf;border-left-width:0;border-right-width:0;padding:10px;margin:0;color:#2ea2cc;border-top-width:0;background:-webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9)) #fff;background:-webkit-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:-moz-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:-o-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:#f9f9f9 #fff}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget h4.section_title:hover,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget h4.section_title:hover{color:#a00}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title{cursor:pointer}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title span,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title span{display:block}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title span:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title span:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin-left:.618em;content:"";text-decoration:none;float:right;font-size:.9em;line-height:1.618}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title.open,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title.open{color:#333}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title.open span:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title.open span:after{display:none}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section{border-bottom:1px solid #dfdfdf}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section .chosen-container,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section .chosen-container{width:100%!important}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section:last-of-type,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section:last-of-type{border-radius:0 0 3px 3px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table{width:100%}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td{padding:7px 10px;vertical-align:top;border-top:1px solid #e5e5e5;line-height:1.4em}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table tr:first-child td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table tr:first-child td{border-top:0}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.count,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.count{background:#f5f5f5}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.name,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.name{max-width:175px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.name a,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.name a{word-wrap:break-word}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.sparkline,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.sparkline{vertical-align:middle}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table .wc_sparkline,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table .wc_sparkline{width:32px;height:1em;display:block;float:right}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table tr.active td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table tr.active td{background:#f5f5f5}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget form,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget p,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget form,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget p{margin:0;padding:10px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget form .submit,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget p .submit,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget form .submit,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget p .submit{margin-top:10px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget #product_ids,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget #product_ids{width:100%}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .select_all,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .select_none,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .select_all,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .select_none{float:right;color:#999;margin-left:4px;margin-top:10px}.woocommerce-reports-wide .postbox .chart-legend,.woocommerce-reports-wrap .postbox .chart-legend{list-style:none;margin:0 0 1em;padding:0;border:1px solid #dfdfdf;border-right-width:0;border-bottom-width:0;background:#fff}.woocommerce-reports-wide .postbox .chart-legend li,.woocommerce-reports-wrap .postbox .chart-legend li{border-right:5px solid #aaa;color:#aaa;padding:1em;display:block;margin:0;-webkit-transition:all ease .5s;box-shadow:inset 0 -1px 0 0 #dfdfdf}.woocommerce-reports-wide .postbox .chart-legend li strong,.woocommerce-reports-wrap .postbox .chart-legend li strong{font-size:1.618em;line-height:1.2em;color:#464646;font-weight:400;display:block;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif}.woocommerce-reports-wide .postbox .chart-legend li:hover,.woocommerce-reports-wrap .postbox .chart-legend li:hover{box-shadow:inset 0 -1px 0 0 #dfdfdf,inset 300px 0 0 rgba(156,93,144,.1);border-right:5px solid #9c5d90!important;padding-left:1.5em;color:#9c5d90}.woocommerce-reports-wide .postbox .pie-chart-legend,.woocommerce-reports-wrap .postbox .pie-chart-legend{margin:12px 0 0;overflow:hidden}.woocommerce-reports-wide .postbox .pie-chart-legend li,.woocommerce-reports-wrap .postbox .pie-chart-legend li{float:left;margin:0;padding:6px 0 0;border-top:4px solid #999;text-align:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:50%}.woocommerce-reports-wide .postbox .stat,.woocommerce-reports-wrap .postbox .stat{font-size:1.5em!important;font-weight:700;text-align:center}.woocommerce-reports-wide .postbox .chart-placeholder,.woocommerce-reports-wrap .postbox .chart-placeholder{width:100%;height:650px;overflow:hidden;position:relative}.woocommerce-reports-wide .postbox .chart-prompt,.woocommerce-reports-wrap .postbox .chart-prompt{line-height:650px;margin:0;color:#999;font-size:1.2em;font-style:italic;text-align:center}.woocommerce-reports-wide .postbox .chart-container,.woocommerce-reports-wrap .postbox .chart-container{background:#fff;padding:12px;position:relative;border:1px solid #dfdfdf;border-radius:3px}.woocommerce-reports-wide .postbox .main .chart-legend,.woocommerce-reports-wrap .postbox .main .chart-legend{margin-top:12px}.woocommerce-reports-wide .postbox .main .chart-legend li,.woocommerce-reports-wrap .postbox .main .chart-legend li{border-right:0;margin:0 8px 0 0;float:left;border-top:4px solid #aaa}.woocommerce-reports-wide .woocommerce-reports-main,.woocommerce-reports-wrap .woocommerce-reports-main{float:left;min-width:100%}.woocommerce-reports-wide .woocommerce-reports-main table td,.woocommerce-reports-wrap .woocommerce-reports-main table td{padding:9px}.woocommerce-reports-wide .woocommerce-reports-sidebar,.woocommerce-reports-wrap .woocommerce-reports-sidebar{display:inline;width:281px;margin-left:-300px;clear:both;float:left}.woocommerce-reports-wide .woocommerce-reports-left,.woocommerce-reports-wrap .woocommerce-reports-left{width:49.5%;float:left}.woocommerce-reports-wide .woocommerce-reports-right,.woocommerce-reports-wrap .woocommerce-reports-right{width:49.5%;float:right}.woocommerce-reports-wide .column-wc_actions a.edit,.woocommerce-reports-wide .column-wc_actions a.view,.woocommerce-reports-wrap .column-wc_actions a.edit,.woocommerce-reports-wrap .column-wc_actions a.view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.woocommerce-reports-wide .column-wc_actions a.edit:after,.woocommerce-reports-wide .column-wc_actions a.view:after,.woocommerce-reports-wrap .column-wc_actions a.edit:after,.woocommerce-reports-wrap .column-wc_actions a.view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.woocommerce-reports-wide .column-wc_actions a.edit:after,.woocommerce-reports-wrap .column-wc_actions a.edit:after{content:"\e01c"}.woocommerce-reports-wide .column-wc_actions a.view:after,.woocommerce-reports-wrap .column-wc_actions a.view:after{content:"\e010"}.woocommerce-wide-reports-wrap{padding-bottom:11px}.woocommerce-wide-reports-wrap .widefat .export-data{float:right}.woocommerce-wide-reports-wrap .widefat td,.woocommerce-wide-reports-wrap .widefat th{vertical-align:middle;padding:7px}form.report_filters div,form.report_filters input,form.report_filters label,form.report_filters p{vertical-align:middle}.chart-tooltip{position:absolute;display:none;line-height:1}table.bar_chart{width:100%}table.bar_chart thead th{text-align:left;color:#ccc;padding:6px 0}table.bar_chart tbody th{padding:6px 0;width:25%;text-align:left!important;font-weight:400!important;border-bottom:1px solid #fee}table.bar_chart tbody td{text-align:right;line-height:24px;padding:6px 6px 6px 0;border-bottom:1px solid #fee}table.bar_chart tbody td span{color:#8a4b75;display:block}table.bar_chart tbody td span.alt{color:#47a03e;margin-top:6px}table.bar_chart tbody td.bars{position:relative;text-align:left;padding:6px 6px 6px 0;border-bottom:1px solid #fee}table.bar_chart tbody td.bars a,table.bar_chart tbody td.bars span{text-decoration:none;clear:both;background:#8a4b75;float:left;display:block;line-height:24px;height:24px;-moz-border-radius:3px;-webkit-border-radius:3px;-o-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}table.bar_chart tbody td.bars span.alt{clear:both;background:#47a03e}table.bar_chart tbody td.bars span.alt span{margin:0;color:#c5dec2!important;text-shadow:0 1px 0 #47a03e;background:0 0}#profile-page .api-keys-wrapper{float:left;padding-bottom:10px}#profile-page .api-keys-get-qr{float:left;padding-left:10px}.chosen-container-single .chosen-single{height:26px;line-height:26px;margin-top:1px}.chosen-container-single .chosen-single div b{background:url(../images/chosen-sprite.png) 0 4px no-repeat!important}.chosen-container-active .chosen-single-with-drop div b{background-position:-18px 2px!important}.chosen-container-single .chosen-search input{line-height:13px;width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container-multi .chosen-choices .search-field input{height:21px!important}.woocommerce_options_panel .chosen-container-multi{width:50%!important;float:left}.woocommerce_options_panel .chosen-container-multi .search-field{min-width:50%}.woocommerce_options_panel .chosen-container-multi .search-field input{min-width:100%}.chosen-container-single .chosen-single abbr{top:8px}@media only screen and (max-width:1280px){.woocommerce_options_panel .chosen-container-multi{width:80%!important}#order_data .order_data_column{width:48%}#order_data .order_data_column:first-child{width:100%}.woocommerce_options_panel .description{display:block;clear:both;margin-left:0}.woocommerce_options_panel .dimensions_field .wrap,.woocommerce_options_panel .short,.woocommerce_options_panel input[type=email].short,.woocommerce_options_panel input[type=number].short,.woocommerce_options_panel input[type=text].short{width:80%}.woocommerce_options_panel .downloadable_files,.woocommerce_variations .downloadable_files{padding:0;clear:both}.woocommerce_options_panel .downloadable_files label,.woocommerce_variations .downloadable_files label{position:static}.woocommerce_options_panel .downloadable_files table,.woocommerce_variations .downloadable_files table{margin:0 12px 24px;width:94%}.woocommerce_options_panel .downloadable_files table .sort,.woocommerce_variations .downloadable_files table .sort{display:none}.woocommerce_options_panel .woocommerce_variable_attributes .downloadable_files table,.woocommerce_variations .woocommerce_variable_attributes .downloadable_files table{margin:0 0 1em;width:100%}}@media only screen and (max-width:900px){#woocommerce-product-data .wc-tabs-back,#woocommerce-product-data ul.product_data_tabs{width:10%}#woocommerce-coupon-data .wc-metaboxes-wrapper,#woocommerce-coupon-data .woocommerce_options_panel,#woocommerce-product-data .wc-metaboxes-wrapper,#woocommerce-product-data .woocommerce_options_panel{width:90%}#woocommerce-product-data ul.product_data_tabs li a{position:relative;text-indent:-999px;padding:10px}#woocommerce-product-data ul.product_data_tabs li a:before{position:absolute;top:0;right:0;bottom:0;left:0;text-indent:0;text-align:center;line-height:40px;width:100%;height:40px}}@media only screen and (max-width:782px){#wp-excerpt-media-buttons a{font-size:16px;line-height:37px;height:39px;padding:0 20px 0 15px}#wp-excerpt-editor-tools{padding-top:20px;padding-right:15px;overflow:hidden;margin-bottom:-1px}#woocommerce-product-data .checkbox{width:25px}}@media only screen and (max-width:500px){.woocommerce_options_panel label,.woocommerce_options_panel legend{float:none;width:auto;display:block;margin:0}.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p.form-field{padding:5px 20px!important}}.wc-backbone-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:160000}.wc-backbone-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.wc-backbone-modal .wc-backbone-modal-content{position:absolute;top:50%;left:50%;width:500px;background:#fff;margin:-150px 0 0 -250px}.wc-backbone-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.wc-backbone-modal-main{padding-bottom:50px}.wc-backbone-modal-main article,.wc-backbone-modal-main header{display:block;position:relative;padding:4px 16px}.wc-backbone-modal-main header{border-bottom:1px solid #ddd}.wc-backbone-modal-main article{padding:10px 16px}.wc-backbone-modal-main article .pagination{padding:10px 0 0;text-align:center}.wc-backbone-modal-main h1{font-size:22px;font-weight:200;line-height:45px;margin:0}.wc-backbone-modal-main footer{position:absolute;left:0;right:0;bottom:0;height:30px;z-index:100;padding:10px 0;border:0 solid #dfdfdf;border-width:1px 0 0;box-shadow:0 -4px 4px -4px rgba(0,0,0,.1)}.wc-backbone-modal-main footer .inner{padding:0 10px;text-align:right} \ No newline at end of file +@charset "UTF-8";@-moz-keyframes spin{100%{-moz-transform:rotate(360deg)}}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.woocommerce-checkout .form-row .chosen-container{width:100%!important}.woocommerce-checkout .form-row .chosen-container-single .chosen-single{height:28px;line-height:29px}.woocommerce-checkout .form-row .chosen-container-single .chosen-single div b{background:url(../images/chosen-sprite.png) 0 3px no-repeat!important}.woocommerce-checkout .form-row .chosen-container-active .chosen-single-with-drop div b{background-position:-18px 4px!important}.woocommerce-checkout .form-row .chosen-container-single .chosen-search input{line-height:13px;width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce-checkout .form-row .chosen-container .chosen-drop{width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.woocommerce-checkout .form-row .chosen-container-single .chosen-single div b{background-image:url(../images/chosen-sprite@2x.png)!important;background-position:0 5px!important;background-repeat:no-repeat!important;background-size:52px 37px!important}.woocommerce-checkout .form-row .chosen-container-active .chosen-single-with-drop div b{background-position:-18px 5px!important}}.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;border:1px solid #aaa;border-radius:5px;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:0 0,top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%;background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;right:26px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover,.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:url(../images/chosen-sprite.png) 100% -20px no-repeat #fff;background:url(../images/chosen-sprite.png) 100% -20px no-repeat,-o-linear-gradient(#eee 1%,#fff 15%);background:url(../images/chosen-sprite.png) 100% -20px no-repeat,0 0,0 0,#eee 1%,#fff 15%;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.chosen-container .chosen-results{position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear,false,#3875d7 20%,#2a62bc 90%;color:#fff}.chosen-container .chosen-results li.no-results{display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear,false,#eee 1%,#fff 15%;cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:5px;height:15px;outline:0;border:0!important;background:0 0!important;box-shadow:none;color:#666;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-multi .chosen-choices li.search-field .default{color:#999}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 0 3px 5px;padding:3px 20px 3px 5px;border:1px solid #aaa;border-radius:3px;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear,false,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%;background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear,top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%;color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#eee),color-stop(80%,#fff));background-image:-webkit-linear-gradient(#eee 20%,#fff 80%);background-image:-moz-linear-gradient(#eee 20%,#fff 80%);background-image:-o-linear-gradient(#eee 20%,#fff 80%);background-image:linear,false,#eee 20%,#fff 80%;box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#111!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close,.chosen-disabled .chosen-single{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl .chosen-drop,.chosen-rtl.chosen-container-single-nosearch .chosen-search{left:9999px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:url(../images/chosen-sprite.png) -30px -20px no-repeat #fff;background:url(../images/chosen-sprite.png) -30px -20px no-repeat,-o-linear-gradient(#eee 1%,#fff 15%);background:url(../images/chosen-sprite.png) -30px -20px no-repeat,0 0,0 0,#eee 1%,#fff 15%;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-rtl .chosen-search input[type=text]{background-image:url(../images/chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}.blockUI.blockOverlay:before{height:1em;width:1em;position:absolute;top:50%;left:50%;margin-left:-.5em;margin-top:-.5em;display:block;-webkit-animation:spin 1s ease-in-out infinite;-moz-animation:spin 1s ease-in-out infinite;animation:spin 1s ease-in-out infinite;content:"";background:url(../images/icons/loader.svg) center center/cover;line-height:1;text-align:center;font-size:2em;color:rgba(0,0,0,.75)}.wc_addons_wrap .products{overflow:hidden}.wc_addons_wrap .products li{float:left;margin:0 1em 1em 0!important;padding:0;vertical-align:top;width:300px}.wc_addons_wrap .products li a{text-decoration:none;color:inherit;border:1px solid #ddd;display:block;min-height:220px;overflow:hidden;background:#f5f5f5;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1)}.wc_addons_wrap .products li a img{max-width:258px;max-height:24px;padding:17px 20px;display:block;margin:0;background:#fff;border-right:260px solid #fff}.wc_addons_wrap .products li a .price,.wc_addons_wrap .products li a img.extension-thumb+h3{display:none}.wc_addons_wrap .products li a h3{margin:0!important;padding:20px!important;background:#fff}.wc_addons_wrap .products li a p{padding:20px!important;margin:0!important;border-top:1px solid #f1f1f1}.wc_addons_wrap .products li a:focus,.wc_addons_wrap .products li a:hover{background-color:#fff}.wc_addons_wrap .storefront{background:url(../images/storefront-bg.jpg) bottom right #f6f6f6;border:1px solid #ddd;padding:20px;overflow:hidden;zoom:1}.wc_addons_wrap .storefront img{width:278px;height:auto;float:left;margin:0 20px 0 0;box-shadow:0 1px 6px rgba(0,0,0,.1)}.wc_addons_wrap .storefront p{max-width:750px}.woocommerce-message{position:relative;border-left-color:#cc99c2!important;overflow:hidden}.woocommerce-message a.button-primary,.woocommerce-message button.button-primary{background:#cc99c2;border-color:#b366a4;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);color:#fff;text-decoration:none!important}.woocommerce-message a.button-primary:hover,.woocommerce-message button.button-primary:hover{background:#bb77ae;border-color:#aa559a;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15)}.woocommerce-message a.button-primary:active,.woocommerce-message button.button-primary:active{background:#aa559a;border-color:#aa559a}.woocommerce-message a.docs,.woocommerce-message a.skip{opacity:.5}.woocommerce-message .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}#variable_product_options #message{margin:10px}.clear{clear:both}.wrap.woocommerce div.error,.wrap.woocommerce div.updated{margin-top:10px}mark.amount{background:0 0;color:inherit}.postbox,.woocommerce{input:invalid;input-border:1px solid #cc010b;input-background:#ffebe8}.simplify-commerce-banner{overflow:hidden}.simplify-commerce-banner img{float:right;padding:15px 0;margin-left:1em;width:200px}table.wc_status_table{margin-bottom:1em}table.wc_status_table tr:nth-child(2n) td,table.wc_status_table tr:nth-child(2n) th{background:#fcfcfc}table.wc_status_table th{font-weight:700;padding:9px}table.wc_status_table td:first-child{width:33%}table.wc_status_table td.help{width:1em}table.wc_status_table td{padding:9px;font-size:1.1em}table.wc_status_table td mark{background:0 0}table.wc_status_table td mark.yes{color:#7ad03a}table.wc_status_table td mark.no{color:#999}table.wc_status_table td mark.error{color:#a00}table.wc_status_table td ul{margin:0}table.wc_status_table .help_tip{cursor:help}#debug-report{display:none;margin:10px 0;padding:0;position:relative}#debug-report textarea{font-family:monospace;width:100%;margin:0;height:300px;padding:20px;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;resize:none;font-size:12px;line-height:20px;outline:0}#log-viewer-select{padding:10px 0 8px;line-height:180%}#log-viewer textarea{width:100%;resize:vertical}.inline-edit-product.quick-edit-row .inline-edit-col-center,.inline-edit-product.quick-edit-row .inline-edit-col-right{float:right!important}#woocommerce-fields.inline-edit-col{clear:left}#woocommerce-fields.inline-edit-col label.featured,#woocommerce-fields.inline-edit-col label.manage_stock{margin-left:10px}#woocommerce-fields.inline-edit-col .dimensions div{display:block;margin:.2em 0}#woocommerce-fields.inline-edit-col .dimensions div span.title{display:block;float:left;width:5em}#woocommerce-fields.inline-edit-col .dimensions div span.input-text-wrap{display:block;margin-left:5em}#woocommerce-fields.inline-edit-col .text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:99%;float:left;margin:1px 1% 1px 1px}#woocommerce-fields.inline-edit-col .height,#woocommerce-fields.inline-edit-col .length,#woocommerce-fields.inline-edit-col .width{width:32.33%}#woocommerce-fields.inline-edit-col .height{margin-right:0}#woocommerce-fields-bulk.inline-edit-col label{clear:left}#woocommerce-fields-bulk.inline-edit-col .inline-edit-group label{clear:none;width:49%;margin:.2em 0}#woocommerce-fields-bulk.inline-edit-col .inline-edit-group.dimensions label{width:75%;max-width:75%}#woocommerce-fields-bulk.inline-edit-col .length,#woocommerce-fields-bulk.inline-edit-col .regular_price,#woocommerce-fields-bulk.inline-edit-col .sale_price,#woocommerce-fields-bulk.inline-edit-col .stock,#woocommerce-fields-bulk.inline-edit-col .weight{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;margin-left:4.4em}#woocommerce-fields-bulk.inline-edit-col .height,#woocommerce-fields-bulk.inline-edit-col .length,#woocommerce-fields-bulk.inline-edit-col .width{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:25%}.column-coupon_code{line-height:2.25em}.column-coupon_code,ul.wc_coupon_list{margin:0;overflow:hidden;zoom:1;clear:both}ul.wc_coupon_list li{margin:0}ul.wc_coupon_list li.code{display:inline-block}ul.wc_coupon_list li.code:after{content:", "}ul.wc_coupon_list li.code:last-of-type:after{display:none}ul.wc_coupon_list li.code .tips{cursor:pointer}ul.wc_coupon_list_block{margin:0;padding-bottom:2px}ul.wc_coupon_list_block li{border-top:1px solid #fff;border-bottom:1px solid #ccc;line-height:2.5em;margin:0;padding:.5em 0}ul.wc_coupon_list_block li:first-child{border-top:0;padding-top:0}ul.wc_coupon_list_block li:last-child{border-bottom:0;padding-bottom:0}.button.wc-reload{text-indent:-9999px;position:relative;padding:0;-webkit-border-radius:100%;border-radius:100%;height:24px;width:24px!important;display:inline-block}.button.wc-reload:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:22px}.tablenav .actions{overflow:visible}.alignleft.actions .chosen-container-single{display:inline-block;vertical-align:middle}#woocommerce-order-data .handlediv,#woocommerce-order-data h3.hndle{display:none}#woocommerce-order-data .inside{display:block!important}#order_data{padding:23px 24px 12px}#order_data h2{margin:0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;font-size:21px;font-weight:400;line-height:1.2;text-shadow:1px 1px 1px #fff;padding:0}#order_data h4{color:#333;margin:1.33em 0 0}#order_data p{color:#777}#order_data p.order_number{margin:0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;font-weight:400;line-height:1.6em;font-size:16px}#order_data .order_data_column_container{clear:both}#order_data .order_data_column{width:32%;padding:0 2% 0 0;float:left}#order_data .order_data_column:last-child{padding-right:0}#order_data .order_data_column p{padding:0!important}#order_data .order_data_column .address strong{display:block}#order_data .order_data_column .form-field{float:left;width:48%;padding:0;margin:9px 0 0}#order_data .order_data_column .form-field label{display:block;padding:0 0 3px}#order_data .order_data_column .form-field input,#order_data .order_data_column .form-field select,#order_data .order_data_column .form-field textarea{width:100%}#order_data .order_data_column .form-field #order_status_chosen .chosen-search{display:none}#order_data .order_data_column .form-field .chosen-container{width:100%!important}#order_data .order_data_column .form-field .date-picker-field{width:50%}#order_data .order_data_column .form-field .hour,#order_data .order_data_column .form-field .minute{width:2.5em}#order_data .order_data_column .form-field small{display:block;margin:5px 0 0;color:#999}#order_data .order_data_column .form-field.last{float:right}#order_data .order_data_column .form-field-wide{width:100%;clear:both}#order_data .order_data_column .form-field-wide input,#order_data .order_data_column .form-field-wide select,#order_data .order_data_column .form-field-wide textarea{width:100%}#order_data .order_data_column p.none_set{color:#999}#order_data .order_data_column ._billing_address_1_field,#order_data .order_data_column ._billing_city_field,#order_data .order_data_column ._billing_country_field,#order_data .order_data_column ._billing_email_field,#order_data .order_data_column ._billing_first_name_field,#order_data .order_data_column ._shipping_address_1_field,#order_data .order_data_column ._shipping_city_field,#order_data .order_data_column ._shipping_country_field,#order_data .order_data_column ._shipping_first_name_field{float:left}#order_data .order_data_column ._billing_address_2_field,#order_data .order_data_column ._billing_last_name_field,#order_data .order_data_column ._billing_phone_field,#order_data .order_data_column ._billing_postcode_field,#order_data .order_data_column ._billing_state_field,#order_data .order_data_column ._shipping_address_2_field,#order_data .order_data_column ._shipping_last_name_field,#order_data .order_data_column ._shipping_postcode_field,#order_data .order_data_column ._shipping_state_field{float:right}#order_data .order_data_column ._billing_company_field,#order_data .order_data_column ._shipping_company_field,#order_data .order_data_column ._transaction_id_field{clear:both;width:100%}#order_data .order_data_column ._billing_email_field{clear:left}#order_data .order_data_column div.edit_address{display:none;zoom:1;padding-right:1px}#order_data a.edit_address{opacity:.4}#order_data a.edit_address:focus,#order_data a.edit_address:hover{opacity:1}.order_actions{margin:0;overflow:hidden;zoom:1}.order_actions li{border-top:1px solid #fff;border-bottom:1px solid #ddd;padding:6px 0;margin:0;line-height:1.6em;float:left;width:50%;text-align:center}.order_actions li a{float:none;text-align:center;text-decoration:underline}.order_actions li.wide{width:auto;float:none;clear:both;padding:6px;text-align:left;overflow:hidden}.order_actions li #delete-action{line-height:25px;vertical-align:middle;text-align:left;float:left}.order_actions li .save_order{float:right}.order_actions li#actions{overflow:hidden}.order_actions li#actions .button{width:24px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:right}.order_actions li#actions select{width:225px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left}#woocommerce-order-items .inside{margin:0;padding:0;background:#fefefe}#woocommerce-order-items .wc-order-data-row{border-bottom:1px solid #DFDFDF;padding:12px;background:#f8f8f8;line-height:2em;text-align:right}#woocommerce-order-items .wc-order-data-row:after,#woocommerce-order-items .wc-order-data-row:before{content:" ";display:table}#woocommerce-order-items .wc-order-data-row:after{clear:both}#woocommerce-order-items .wc-order-data-row p{margin:0;line-height:2em}#woocommerce-order-items .wc-order-data-row .wc-used-coupons{text-align:left}#woocommerce-order-items .wc-order-data-row .wc-used-coupons .tips{display:inline-block}#woocommerce-order-items .wc-order-bulk-actions{background:#fefefe;vertical-align:top;border-top:0}#woocommerce-order-items .wc-order-bulk-actions select{vertical-align:top}#woocommerce-order-items .wc-order-bulk-actions p.bulk-actions{float:left}#woocommerce-order-items .wc-order-add-item{background:#fff;vertical-align:top;border-top:none}#woocommerce-order-items .wc-order-add-item .add_item_id,#woocommerce-order-items .wc-order-add-item .chosen-container{vertical-align:top}#woocommerce-order-items .wc-order-add-item .add_item_id .search-field input,#woocommerce-order-items .wc-order-add-item .chosen-container .search-field input{min-width:100px}#woocommerce-order-items .wc-order-add-item .chosen-container{width:400px!important;text-align:left}#woocommerce-order-items .wc-order-add-item .calculate-action,#woocommerce-order-items .wc-order-add-item .cancel-action,#woocommerce-order-items .wc-order-add-item .save-action{float:left;margin-right:2px}#woocommerce-order-items .wc-used-coupons{float:left;width:50%}#woocommerce-order-items .wc-order-totals{float:right;width:50%;margin:0;padding:0}#woocommerce-order-items .wc-order-totals .amount{font-weight:700}#woocommerce-order-items .wc-order-totals .label{vertical-align:top}#woocommerce-order-items .wc-order-totals .total{font-size:1em!important;width:10em;margin:0 0 0 .5em;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-order-items .wc-order-totals .total input[type=text]{width:96%;float:right}#woocommerce-order-items .wc-order-totals .refunded-total{color:#a00}#woocommerce-order-items .refund-actions{margin-top:5px;padding-top:12px;border-top:1px solid #DFDFDF}#woocommerce-order-items .refund-actions .button{float:right;margin-left:4px}#woocommerce-order-items .refund-actions .cancel-action{float:left;margin-left:0}#woocommerce-order-items .add_meta{margin-left:0!important}#woocommerce-order-items h3 small{color:#999}#woocommerce-order-items .amount{white-space:nowrap}#woocommerce-order-items .add-items .description{margin-right:10px}.woocommerce_order_items_wrapper{margin:0;overflow:auto}.woocommerce_order_items_wrapper table.woocommerce_order_items{width:100%;background:#fff}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th{background:#f8f8f8;padding:8px;font-size:11px;text-align:left;color:#555;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th:last-child{padding-right:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th:first-child{padding-left:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th.sortable{cursor:pointer}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th,.woocommerce_order_items_wrapper table.woocommerce_order_items td{padding:8px;text-align:left;line-height:26px;vertical-align:top;border-bottom:1px dotted #ececec}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items td textarea{width:100%}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th select,.woocommerce_order_items_wrapper table.woocommerce_order_items td select{width:50%}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th input,.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items td input,.woocommerce_order_items_wrapper table.woocommerce_order_items td textarea{font-size:14px;padding:4px;color:#555}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items td:last-child{padding-right:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody th:first-child,.woocommerce_order_items_wrapper table.woocommerce_order_items td:first-child{padding-left:12px}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody tr:last-child td{border-bottom:1px solid #dfdfdf}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody tr:first-child td{border-top:8px solid #f8f8f8}.woocommerce_order_items_wrapper table.woocommerce_order_items tbody#order_line_items tr:first-child td{border-top:none}.woocommerce_order_items_wrapper table.woocommerce_order_items td.check-column{padding:8px 8px 8px 12px;width:1%}.woocommerce_order_items_wrapper table.woocommerce_order_items .item{min-width:200px}.woocommerce_order_items_wrapper table.woocommerce_order_items .center,.woocommerce_order_items_wrapper table.woocommerce_order_items .variation-id{text-align:center}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class{text-align:right}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost label,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax label,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity label,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax label,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class label{white-space:nowrap;color:#999;font-size:.833em}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax label input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class label input{display:inline}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class input{width:70px;vertical-align:middle;text-align:right}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost select,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax select,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity select,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax select,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class select{width:85px;height:26px;vertical-align:middle;font-size:1em}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input{display:block;background:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);margin:1px;width:70px}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input input,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input input{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:0;box-shadow:none;margin:0;color:#555;background:0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .split-input input:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .split-input input:last-child{color:#bbb;border-top:1px dashed #ddd}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax .view,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class .view{white-space:nowrap}.woocommerce_order_items_wrapper table.woocommerce_order_items .cost del,.woocommerce_order_items_wrapper table.woocommerce_order_items .item_cost del,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_cost del,.woocommerce_order_items_wrapper table.woocommerce_order_items .line_tax del,.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity del,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax del,.woocommerce_order_items_wrapper table.woocommerce_order_items .tax_class del{color:#ccc}.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity{text-align:center}.woocommerce_order_items_wrapper table.woocommerce_order_items .quantity input{text-align:center;width:50px}.woocommerce_order_items_wrapper table.woocommerce_order_items span.subtotal{opacity:.5}.woocommerce_order_items_wrapper table.woocommerce_order_items td.tax_class,.woocommerce_order_items_wrapper table.woocommerce_order_items th.tax_class{text-align:left}.woocommerce_order_items_wrapper table.woocommerce_order_items .calculated{border-color:#ae8ca2;border-style:dotted}.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta{width:100%}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta{margin:.5em 0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr th,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr th{border:0;padding:0 4px .5em 0;line-height:1.5em;width:20%}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td{padding:0 4px .5em 0;border:0;line-height:1.5em}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td input,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td input{width:100%;margin:0;position:relative;border-bottom:0;box-shadow:none}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td textarea{width:100%;height:4em;margin:0;box-shadow:none}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td input:focus+textarea,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td input:focus+textarea{border-top-color:#999}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td p,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td p{margin:0 0 .5em;line-height:1.5em}.woocommerce_order_items_wrapper table.woocommerce_order_items table.display_meta tr td p:last-child,.woocommerce_order_items_wrapper table.woocommerce_order_items table.meta tr td p:last-child{margin:0}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb{text-align:left;width:27px}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb a{display:block}.woocommerce_order_items_wrapper table.woocommerce_order_items .thumb img{padding:1px;margin:0;border:1px solid #dfdfdf;vertical-align:middle;width:21px;height:21px}.woocommerce_order_items_wrapper table.woocommerce_order_items .refund_by{border-bottom:1px dotted #999}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.fee .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.fee .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.refund .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.refund .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.shipping .thumb div{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:14px;margin:6px}.woocommerce_order_items_wrapper table.woocommerce_order_items tr.shipping .thumb div:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#bbb}.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax{white-space:nowrap}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax{padding:8px 16px 8px 8px}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:12px;visibility:hidden;float:right;margin:2px -16px 0 0}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax:before,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#fff;background-color:#000;-webkit-border-radius:100%;border-radius:100%;border:1px solid #000;box-shadow:0 1px 2px rgba(0,0,0,.2)}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax .delete-order-tax:hover:before,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax .delete-order-tax:hover:before{border-color:#a00;background-color:#a00}.woocommerce_order_items_wrapper table.woocommerce_order_items td.line_tax:hover .delete-order-tax,.woocommerce_order_items_wrapper table.woocommerce_order_items th.line_tax:hover .delete-order-tax{visibility:visible}.woocommerce_order_items_wrapper table.woocommerce_order_items small.refunded{display:block;color:#a00;white-space:nowrap}.wc-order-items-editable .edit-order-item{text-indent:-9999px;position:relative;height:1em;width:1em;display:inline-block;margin:0 .5em 0 0}.wc-order-items-editable .edit-order-item:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";content:"\e603";color:#999}.wc-order-items-editable .edit-order-item:hover:before{color:#555}.wc-order-items-editable .delete-order-item,.wc-order-items-editable .delete_refund{text-indent:-9999px;position:relative;height:1em;width:1em;display:inline-block;margin:0}.wc-order-items-editable .delete-order-item:before,.wc-order-items-editable .delete_refund:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";content:"\e013";color:#999}.wc-order-items-editable .delete-order-item:hover:before,.wc-order-items-editable .delete_refund:hover:before{color:#a00}.wc-order-items-editable .wc-order-edit-line-item-actions{width:2.5em;text-align:right}.wc-order-items-editable .wc-order-totals .wc-order-edit-line-item-actions{width:1.5em}.wc-order-items-editable .wc-order-totals .edit-order-item{margin:0}#woocommerce-order-downloads .buttons{float:left;padding:0;margin:0;vertical-align:top}#woocommerce-order-downloads .buttons .add_item_id,#woocommerce-order-downloads .buttons .chosen-container{width:400px!important;margin-right:9px;vertical-align:top;float:left}#woocommerce-order-downloads .buttons button{margin:2px 0 0}#woocommerce-order-downloads h3 small{color:#999}#poststuff #woocommerce-order-actions .inside{margin:0;padding:0}#poststuff #woocommerce-order-actions .inside ul.order_actions li{padding:6px 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#poststuff #woocommerce-order-actions .inside ul.order_actions li:last-child{border-bottom:0}#poststuff #woocommerce-order-notes .inside{margin:0;padding:0}#poststuff #woocommerce-order-notes .inside ul.order_notes li{padding:0 10px}#woocommerce_customers p.search-box{margin:6px 0 4px;float:left}#woocommerce_customers .tablenav{float:right;clear:none}.widefat.customers td{vertical-align:middle;padding:4px 7px}.widefat .column-order_title{width:15%}.widefat .column-order_title time{display:block;color:#999;margin:3px 0}.widefat .column-orders,.widefat .column-paying,.widefat .column-spent{text-align:center;width:8%}.widefat .column-last_order{width:11%}.widefat .column-order_actions,.widefat .column-user_actions,.widefat .column-wc_actions{width:110px}.widefat .column-order_actions a.button,.widefat .column-user_actions a.button,.widefat .column-wc_actions a.button{float:left;margin:0 4px 2px 0;cursor:pointer;padding:3px 4px;height:auto}.widefat .column-order_actions a.button img,.widefat .column-user_actions a.button img,.widefat .column-wc_actions a.button img{display:block;width:12px;height:auto}.widefat small.meta{display:block;color:#999;font-size:inherit;margin:3px 0}.widefat .column-order_date,.widefat .column-order_total{width:9%}.widefat .column-order_status{width:45px;text-align:center}.widefat .column-order_status mark{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;background:0 0;font-size:1.4em;margin:0 auto}.widefat .column-order_status mark.cancelled:after,.widefat .column-order_status mark.completed:after,.widefat .column-order_status mark.failed:after,.widefat .column-order_status mark.on-hold:after,.widefat .column-order_status mark.pending:after,.widefat .column-order_status mark.processing:after,.widefat .column-order_status mark.refunded:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}.widefat .column-order_status mark.pending:after{content:"\e012";color:#ffba00}.widefat .column-order_status mark.completed:after{content:"\e015";color:#2ea2cc}.widefat .column-order_status mark.on-hold:after{content:"\e033";color:#999}.widefat .column-order_status mark.failed:after{content:"\e016";color:#d0c21f}.widefat .column-order_status mark.cancelled:after{content:"\e013";color:#a00}.widefat .column-order_status mark.processing:after{content:"\e011";color:#73a724}.widefat .column-order_status mark.refunded:after{content:"\e014";color:#999}.widefat td.column-order_status{padding-top:9px}.column-customer_message .note-on{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto;color:#999}.column-customer_message .note-on:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:16px}.column-order_notes .note-on{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto;color:#999}.column-order_notes .note-on:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:16px}.order_actions .complete,.order_actions .processing,.order_actions .view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.order_actions .complete:after,.order_actions .processing:after,.order_actions .view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.order_actions .processing:after{content:"\e00f"}.order_actions .complete:after{content:"\e017"}.order_actions .view:after{content:"\e010"}.user_actions .edit,.user_actions .link,.user_actions .refresh,.user_actions .view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.user_actions .edit:after,.user_actions .link:after,.user_actions .refresh:after,.user_actions .view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.user_actions .edit:after{content:"\e603"}.user_actions .link:after{content:"\e00d"}.user_actions .view:after{content:"\e010"}.user_actions .refresh:after{content:"\e031"}.attributes-table td,.attributes-table th{width:15%;vertical-align:top}.attributes-table .attribute-terms{width:32%}.attributes-table .attribute-actions{width:2em}.attributes-table .attribute-actions .configure-terms{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.attributes-table .attribute-actions .configure-terms:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";line-height:1.85}ul.order_notes{padding:2px 0 0}ul.order_notes li{.note_content:after;.note_content-content:"";.note_content-display:block;.note_content-position:absolute;.note_content-bottom:-10px;.note_content-left:20px;.note_content-width:0;.note_content-height:0;.note_content-border-width:10px 10px 0 0;.note_content-border-style:solid;.note_content-border-color:#efefef transparent}ul.order_notes li .note_content{padding:10px;background:#efefef;position:relative}ul.order_notes li .note_content p{margin:0;padding:0;word-wrap:break-word}ul.order_notes li p.meta{padding:10px;color:#999;margin:0;font-size:11px}ul.order_notes li p.meta .exact-date{border-bottom:1px dotted #999}ul.order_notes li a.delete_note{color:#a00}ul.order_notes li.customer-note{.note_content:after;.note_content-border-color:#d7cad2 transparent}ul.order_notes li.customer-note .note_content{background:#d7cad2}.add_note{border-top:1px solid #ddd;padding:10px 10px 0}.add_note h4{margin-top:5px!important}.add_note #add_order_note{width:100%;height:50px}table.wp-list-table .column-thumb{width:52px;text-align:center;white-space:nowrap}table.wp-list-table .column-name{width:22%}table.wp-list-table .column-product_cat,table.wp-list-table .column-product_tag{width:11%!important}table.wp-list-table .column-featured,table.wp-list-table .column-product_type{width:48px;text-align:left!important}table.wp-list-table .column-customer_message,table.wp-list-table .column-order_notes{width:48px;text-align:center}table.wp-list-table .column-customer_message img,table.wp-list-table .column-order_notes img{margin:0 auto;padding-top:0!important}table.wp-list-table .manage-column.column-featured img,table.wp-list-table .manage-column.column-product_type img{padding-left:2px}table.wp-list-table .column-price .woocommerce-price-suffix{display:none}table.wp-list-table img{margin:1px 2px}table.wp-list-table .row-actions{color:#999}table.wp-list-table td.column-thumb img{margin:0;vertical-align:middle;width:auto;height:auto;max-width:40px;max-height:40px}table.wp-list-table span.na{color:#999}table.wp-list-table .column-is_in_stock{text-align:left!important}table.wp-list-table span.wc-featured,table.wp-list-table span.wc-image,table.wp-list-table span.wc-type{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto}table.wp-list-table span.wc-featured:before,table.wp-list-table span.wc-image:before,table.wp-list-table span.wc-type:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:""}table.wp-list-table span.wc-featured{margin:0;cursor:pointer}table.wp-list-table span.wc-featured:before{content:"\e020"}table.wp-list-table span.wc-featured.not-featured:before{content:"\e021"}table.wp-list-table td.column-featured span.wc-featured{font-size:1.2em}table.wp-list-table span.wc-type{margin:0}table.wp-list-table span.wc-type:before{content:"\e01d"}table.wp-list-table span.product-type{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.2em}table.wp-list-table span.product-type:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:""}table.wp-list-table span.product-type.grouped:before{content:"\e002"}table.wp-list-table span.product-type.external:before{content:"\e034"}table.wp-list-table span.product-type.variable:before{content:"\e003"}table.wp-list-table span.product-type.downloadable:before{content:"\e001"}table.wp-list-table span.product-type.virtual:before{content:"\e000"}table.wp-list-table mark.instock{font-weight:700;color:#7ad03a;background:0 0;line-height:1}table.wp-list-table mark.outofstock{font-weight:700;color:#a44;background:0 0;line-height:1}table.wp-list-table .notes_head,table.wp-list-table .order-notes_head,table.wp-list-table .status_head{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;margin:0 auto}table.wp-list-table .notes_head:after,table.wp-list-table .order-notes_head:after,table.wp-list-table .status_head:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}table.wp-list-table .order-notes_head:after{content:"\e028"}table.wp-list-table .notes_head:after{content:"\e026"}table.wp-list-table .status_head:after{content:"\e011"}table.wp-list-table .column-order_items{width:12%}table.wp-list-table .column-order_items table.order_items{width:100%;margin:3px 0 0;padding:0;display:none}table.wp-list-table .column-order_items table.order_items td{border:0;margin:0;padding:0 0 3px}table.wp-list-table .column-order_items table.order_items td.qty{color:#999;padding-right:6px;text-align:left}mark.notice{background:#fff;color:#a00;margin:0 0 0 10px}a.export_rates,a.import_rates{float:right;margin-left:9px;margin-top:-2px;margin-bottom:0}table.wc_input_table,table.wc_tax_rates{width:100%}table.wc_input_table span.tips,table.wc_tax_rates span.tips{color:#2ea2cc}table.wc_input_table td,table.wc_tax_rates td{padding:0;border-right:1px solid #DFDFDF;border-bottom:1px solid #DFDFDF;border-top:0;background:#fff}table.wc_input_table td input[type=number],table.wc_input_table td input[type=text],table.wc_tax_rates td input[type=number],table.wc_tax_rates td input[type=text]{width:100%;padding:5px 7px;margin:0;border:0;background:0 0}table.wc_input_table td.apply_to_shipping,table.wc_input_table td.compound,table.wc_tax_rates td.apply_to_shipping,table.wc_tax_rates td.compound{padding:5px 7px;vertical-align:middle}table.wc_input_table td.apply_to_shipping input,table.wc_input_table td.compound input,table.wc_tax_rates td.apply_to_shipping input,table.wc_tax_rates td.compound input{width:auto;padding:0}table.wc_input_table td:last-child,table.wc_tax_rates td:last-child{border-right:0}table.wc_input_table tr.current td,table.wc_tax_rates tr.current td{background-color:#fefbcc}table.wc_input_table .cost,table.wc_input_table .cost input,table.wc_input_table .item_cost,table.wc_input_table .item_cost input,table.wc_tax_rates .cost,table.wc_tax_rates .cost input,table.wc_tax_rates .item_cost,table.wc_tax_rates .item_cost input{text-align:right}table.wc_input_table th.sort,table.wc_tax_rates th.sort{width:17px;padding:0}table.wc_input_table td.sort,table.wc_tax_rates td.sort{padding:0 4px;cursor:move;background:#f9f9f9;text-align:center;vertical-align:middle}table.wc_input_table td.sort:before,table.wc_tax_rates td.sort:before{content:"\e032";font-family:WooCommerce;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%}table.wc_input_table td.sort:hover:before,table.wc_tax_rates td.sort:hover:before{color:#333}table.wc_input_table .button,table.wc_tax_rates .button{float:left;margin-right:5px}table.wc_input_table .export,table.wc_input_table .import,table.wc_tax_rates .export,table.wc_tax_rates .import{float:right;margin-right:0;margin-left:5px}table.wc_input_table span.tips,table.wc_tax_rates span.tips{padding:0 3px}table.wc_input_table .pagination,table.wc_tax_rates .pagination{float:right}table.wc_input_table .pagination .button,table.wc_tax_rates .pagination .button{margin-left:5px;margin-right:0}table.wc_input_table .pagination .current,table.wc_tax_rates .pagination .current{background:#bbb;text-shadow:none}table.wc_input_table tfoot th,table.wc_tax_rates tfoot th{padding-left:20px;padding-right:20px}table.wc_input_table tr:last-child td,table.wc_tax_rates tr:last-child td{border-bottom:0}table.wc_gateways,table.wc_shipping{position:relative}table.wc_gateways td,table.wc_shipping td{vertical-align:middle;cursor:move;padding:7px}table.wc_gateways th,table.wc_shipping th{padding:9px 7px!important;vertical-align:middle}table.wc_gateways td.name,table.wc_shipping td.name{font-weight:700}table.wc_gateways .settings,table.wc_shipping .settings{text-align:right}table.wc_gateways .default,table.wc_gateways .radio,table.wc_gateways .status,table.wc_shipping .default,table.wc_shipping .radio,table.wc_shipping .status{text-align:center}table.wc_gateways .default .tips,table.wc_gateways .radio .tips,table.wc_gateways .status .tips,table.wc_shipping .default .tips,table.wc_shipping .radio .tips,table.wc_shipping .status .tips{margin:0 auto}table.wc_gateways .default input,table.wc_gateways .radio input,table.wc_gateways .status input,table.wc_shipping .default input,table.wc_shipping .radio input,table.wc_shipping .status input{margin:0}img.help_tip{vertical-align:middle;margin:0 0 0 9px}.postbox img.help_tip{margin-top:-4px}.status-disabled,.status-enabled{font-size:1.4em;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}.status-enabled:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#a46497}.woocommerce #template div{margin:0}.woocommerce #template div p .button{float:right;margin-left:10px;margin-top:-4px}.woocommerce #template div .editor textarea{margin-bottom:8px}.woocommerce textarea[disabled=disabled]{background:#DFDFDF!important}.woocommerce table.form-table,.woocommerce table.form-table .forminp-radio ul{margin:0}.woocommerce table.form-table .forminp-radio ul li{line-height:1.4em}.woocommerce table.form-table textarea.input-text{height:100%;min-width:150px;display:block}.woocommerce table.form-table input.regular-input{width:25em}.woocommerce table.form-table textarea.wide-input{width:100%}.woocommerce table.form-table img.help_tip{padding:0;margin:-4px 0 0 5px;vertical-align:middle;cursor:help;line-height:1}.woocommerce table.form-table span.help_tip{cursor:help;color:#2ea2cc}.woocommerce table.form-table th{position:relative;padding-right:24px}.woocommerce table.form-table .chosen-container{vertical-align:top;margin-bottom:3px}.woocommerce table.form-table table.widefat th{padding-right:inherit}.woocommerce table.form-table th img.help_tip{margin:0 -24px 0 0;float:right}.woocommerce table.form-table fieldset{margin-top:4px}.woocommerce table.form-table fieldset img.help_tip{margin:-3px 0 0 5px}.woocommerce table.form-table fieldset p.description{margin-bottom:8px}.woocommerce table.form-table fieldset:first-child{margin-top:0}.woocommerce table.form-table .color_box{border:1px solid #ccc;box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.2);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding:4px 6px;float:left;width:90px;margin:0 10px 0 0}.woocommerce table.form-table .color_box strong{text-align:left;display:block;padding:0 0 2px;font-size:.92em}.woocommerce table.form-table .color_box strong img{float:right;margin:1px 0 0}.woocommerce table.form-table .color_box input.colorpick{width:100%;margin:0;font-family:monospace;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce table.form-table .color_box .iris-picker{margin:15px 0 0 -7px}.woocommerce table.form-table .color_box_clear{display:block;clear:both;padding-bottom:10px}.woocommerce table.form-table .iris-picker{z-index:100;position:absolute;display:none;border:1px solid #ccc;box-shadow:1px 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.2);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.2);border-radius:3px}.woocommerce table.form-table .iris-picker .ui-slider{border:0!important;background:none!important;margin:0!important;width:auto!important;height:auto!important}.woocommerce table.form-table .iris-picker .ui-slider .ui-slider-handle{margin-bottom:0!important}.woocommerce table.form-table .image_width_settings{vertical-align:middle}.woocommerce table.form-table .image_width_settings label{margin-left:10px}.woocommerce #tabs-wrap table a.remove{margin-left:4px}.woocommerce #tabs-wrap table p{margin:0 0 4px!important;overflow:hidden;zoom:1}.woocommerce #tabs-wrap table p a.add{float:left}#wp-excerpt-editor-container{background:#fff}#product_variation-parent #parent_id{width:100%}#postimagediv img{border:1px solid #d5d5d5;max-width:100%}#woocommerce-product-images .inside{margin:0;padding:0}#woocommerce-product-images .inside .add_product_images{padding:0 12px 12px}#woocommerce-product-images .inside #product_images_container{padding:0 0 0 9px}#woocommerce-product-images .inside #product_images_container ul{margin:0;padding:0}#woocommerce-product-images .inside #product_images_container ul:after,#woocommerce-product-images .inside #product_images_container ul:before{content:" ";display:table}#woocommerce-product-images .inside #product_images_container ul:after{clear:both}#woocommerce-product-images .inside #product_images_container ul li.add,#woocommerce-product-images .inside #product_images_container ul li.image,#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder{width:80px;float:left;cursor:move;border:1px solid #d5d5d5;margin:9px 9px 0 0;background:#f7f7f7;border-radius:2px;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-product-images .inside #product_images_container ul li.add img,#woocommerce-product-images .inside #product_images_container ul li.image img,#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder img{width:100%;height:auto;display:block}#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder{border:3px dashed #ddd;position:relative}#woocommerce-product-images .inside #product_images_container ul li.wc-metabox-sortable-placeholder:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:2.618em;line-height:72px;color:#ddd}#woocommerce-product-images .inside #product_images_container ul ul.actions{position:absolute;top:-8px;right:-8px;padding:2px;display:none}#woocommerce-product-images .inside #product_images_container ul ul.actions li{float:right;margin:0 0 0 2px}#woocommerce-product-images .inside #product_images_container ul ul.actions li a{width:1em;margin:0;height:0;display:block;overflow:hidden}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.tips{cursor:pointer}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.view{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.4em}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.view:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";background-color:#000;color:#fff}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete{display:block;text-indent:-9999px;position:relative;height:1em;width:1em;font-size:1.4em}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";color:#fff;background-color:#000;border-radius:100%;box-shadow:0 1px 2px rgba(0,0,0,.2)}#woocommerce-product-images .inside #product_images_container ul ul.actions li a.delete:hover before{background-color:#a00}#woocommerce-product-images .inside #product_images_container ul li:hover ul.actions{display:block}#woocommerce-product-data h3.hndle{padding:10px}#woocommerce-product-data h3.hndle span{display:block;vertical-align:middle;line-height:24px}#woocommerce-product-data h3.hndle span span{display:inline;line-height:inherit;vertical-align:baseline}#woocommerce-product-data h3.hndle label{padding-right:1em;font-size:12px;vertical-align:baseline}#woocommerce-product-data h3.hndle label:first-child{margin-right:1em;border-right:1px solid #dfdfdf}#woocommerce-product-data h3.hndle input,#woocommerce-product-data h3.hndle select{margin:-3px 0 0 .5em;vertical-align:middle}#woocommerce-product-data>.handlediv{margin-top:4px}#woocommerce-product-data .wrap{margin:0}#woocommerce-coupon-description{padding:3px 8px;font-size:1.7em;line-height:1.42em;height:auto;width:100%;outline:0;margin:10px 0;display:block}#woocommerce-coupon-description::-webkit-input-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description::-moz-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description:-ms-input-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-description:-moz-placeholder{line-height:1.42em;color:#bbb}#woocommerce-coupon-data .panel-wrap,#woocommerce-product-data .panel-wrap{background:#fff}#woocommerce-coupon-data .wc-metaboxes-wrapper,#woocommerce-coupon-data .woocommerce_options_panel,#woocommerce-product-data .wc-metaboxes-wrapper,#woocommerce-product-data .woocommerce_options_panel{float:left;width:80%}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios,#woocommerce-product-data .woocommerce_options_panel .wc-radios{display:block;float:left;margin:0}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios li,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios li,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios li,#woocommerce-product-data .woocommerce_options_panel .wc-radios li{display:block;padding:0 0 10px}#woocommerce-coupon-data .wc-metaboxes-wrapper .wc-radios li input,#woocommerce-coupon-data .woocommerce_options_panel .wc-radios li input,#woocommerce-product-data .wc-metaboxes-wrapper .wc-radios li input,#woocommerce-product-data .woocommerce_options_panel .wc-radios li input{width:auto}#woocommerce-coupon-data .panel-wrap,#woocommerce-product-data .panel-wrap,.woocommerce .panel-wrap{overflow:hidden}#woocommerce-coupon-data ul.wc-tabs,#woocommerce-product-data ul.wc-tabs,.woocommerce ul.wc-tabs{background:#fafafa;line-height:1em;float:left;width:20%;margin:0;position:relative;padding:0 0 10px;border-right:1px solid #eee;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#woocommerce-coupon-data ul.wc-tabs:after,#woocommerce-product-data ul.wc-tabs:after,.woocommerce ul.wc-tabs:after{content:"";display:block;width:100%;height:9999em;position:absolute;bottom:-9999em;left:0;background-color:#fafafa;border-right:1px solid #eee}#woocommerce-coupon-data ul.wc-tabs li,#woocommerce-product-data ul.wc-tabs li,.woocommerce ul.wc-tabs li{display:block;padding:0;margin:0}#woocommerce-coupon-data ul.wc-tabs li a,#woocommerce-product-data ul.wc-tabs li a,.woocommerce ul.wc-tabs li a{padding:10px;line-height:20px!important;margin:0;display:block;text-decoration:none;border-bottom:1px solid #eee}#woocommerce-coupon-data ul.wc-tabs li a:before,#woocommerce-product-data ul.wc-tabs li a:before,.woocommerce ul.wc-tabs li a:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";text-decoration:none}#woocommerce-coupon-data ul.wc-tabs li:first-child a,#woocommerce-product-data ul.wc-tabs li:first-child a,.woocommerce ul.wc-tabs li:first-child a{border-top:0!important}#woocommerce-coupon-data ul.wc-tabs li.general_options a:before,#woocommerce-product-data ul.wc-tabs li.general_options a:before,.woocommerce ul.wc-tabs li.general_options a:before{content:"\e006"}#woocommerce-coupon-data ul.wc-tabs li.inventory_options a:before,#woocommerce-product-data ul.wc-tabs li.inventory_options a:before,.woocommerce ul.wc-tabs li.inventory_options a:before{content:"\e02c"}#woocommerce-coupon-data ul.wc-tabs li.shipping_options a:before,#woocommerce-product-data ul.wc-tabs li.shipping_options a:before,.woocommerce ul.wc-tabs li.shipping_options a:before{content:"\e01a"}#woocommerce-coupon-data ul.wc-tabs li.linked_product_options a:before,#woocommerce-product-data ul.wc-tabs li.linked_product_options a:before,.woocommerce ul.wc-tabs li.linked_product_options a:before{content:"\e00d"}#woocommerce-coupon-data ul.wc-tabs li.attribute_options a:before,#woocommerce-product-data ul.wc-tabs li.attribute_options a:before,.woocommerce ul.wc-tabs li.attribute_options a:before{content:"\e02b"}#woocommerce-coupon-data ul.wc-tabs li.advanced_options a:before,#woocommerce-product-data ul.wc-tabs li.advanced_options a:before,.woocommerce ul.wc-tabs li.advanced_options a:before{content:"\e01c"}#woocommerce-coupon-data ul.wc-tabs li.variation_options a:before,#woocommerce-product-data ul.wc-tabs li.variation_options a:before,.woocommerce ul.wc-tabs li.variation_options a:before{content:"\e003"}#woocommerce-coupon-data ul.wc-tabs li.usage_restriction_options a:before,#woocommerce-product-data ul.wc-tabs li.usage_restriction_options a:before,.woocommerce ul.wc-tabs li.usage_restriction_options a:before{content:"\e602"}#woocommerce-coupon-data ul.wc-tabs li.usage_limit_options a:before,#woocommerce-product-data ul.wc-tabs li.usage_limit_options a:before,.woocommerce ul.wc-tabs li.usage_limit_options a:before{content:"\e601"}#woocommerce-coupon-data ul.wc-tabs li.general_coupon_data a:before,#woocommerce-product-data ul.wc-tabs li.general_coupon_data a:before,.woocommerce ul.wc-tabs li.general_coupon_data a:before{content:"\e600"}#woocommerce-coupon-data ul.wc-tabs li.active a,#woocommerce-product-data ul.wc-tabs li.active a,.woocommerce ul.wc-tabs li.active a{position:relative;background-color:#eee;color:#555}.woocommerce_page_wc-settings .shippingrows th.check-column{padding-top:20px}.woocommerce_page_wc-settings .shippingrows tfoot th{padding-left:10px}.woocommerce_page_wc-settings .shippingrows .add.button:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";text-decoration:none}.woocommerce_page_wc-settings h4.wc-settings-sub-title{font-size:1.2em}#woocommerce-coupon-data .inside,#woocommerce-order-data .inside,#woocommerce-order-downloads .inside,#woocommerce-product-data .inside,#woocommerce-product-type-options .inside{padding:0;margin:0}.panel,.woocommerce_options_panel{padding:9px;color:#555}.panel,.woocommerce_page_settings .woocommerce_options_panel{padding:0}#woocommerce-product-specs .inside,#woocommerce-product-type-options .panel{padding:9px;margin:0}#woocommerce-product-type-options .panel p,.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p{margin:0 0 9px;font-size:12px;padding:5px 9px;line-height:24px}#woocommerce-product-type-options .panel p:after,.woocommerce_options_panel fieldset.form-field:after,.woocommerce_options_panel p:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce_options_panel .checkbox,.woocommerce_variable_attributes .checkbox{width:auto;vertical-align:middle;margin:7px 0}.woocommerce_options_panel .downloadable_files table,.woocommerce_variations .downloadable_files table{width:100%;padding:0!important}.woocommerce_options_panel .downloadable_files table th,.woocommerce_variations .downloadable_files table th{padding:7px 0 7px 7px!important}.woocommerce_options_panel .downloadable_files table td,.woocommerce_variations .downloadable_files table td{vertical-align:middle!important;padding:4px 0 4px 7px!important;position:relative}.woocommerce_options_panel .downloadable_files table td:last-child,.woocommerce_variations .downloadable_files table td:last-child{padding-right:7px!important}.woocommerce_options_panel .downloadable_files table td input.input_text,.woocommerce_variations .downloadable_files table td input.input_text{width:100%;float:none;margin:1px 0;min-width:0}.woocommerce_options_panel .downloadable_files table td .upload_file_button,.woocommerce_variations .downloadable_files table td .upload_file_button{float:right;width:auto;cursor:pointer}.woocommerce_options_panel .downloadable_files table td .delete,.woocommerce_variations .downloadable_files table td .delete{display:block;text-indent:-9999px;position:relative;height:1em;width:1em}.woocommerce_options_panel .downloadable_files table td .delete:before,.woocommerce_variations .downloadable_files table td .delete:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";content:"\e013";color:#999}.woocommerce_options_panel .downloadable_files table td .delete:hover:before,.woocommerce_variations .downloadable_files table td .delete:hover:before{color:#a00}.woocommerce_options_panel .downloadable_files table th.sort,.woocommerce_variations .downloadable_files table th.sort{width:17px;padding:0}.woocommerce_options_panel .downloadable_files table td.sort,.woocommerce_variations .downloadable_files table td.sort{padding:0 8px;cursor:move;background:#f9f9f9;text-align:center;vertical-align:middle}.woocommerce_options_panel .downloadable_files table td.sort:before,.woocommerce_variations .downloadable_files table td.sort:before{content:"\e032";font-family:WooCommerce;text-align:center;line-height:1;color:#999;display:block;width:17px;float:left;height:100%}.woocommerce_options_panel .downloadable_files table td.sort:hover:before,.woocommerce_variations .downloadable_files table td.sort:hover:before{color:#333}.woocommerce_options_panel{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.woocommerce_options_panel .downloadable_files{padding:0 9px 0 162px;position:relative;margin:9px 0}.woocommerce_options_panel .downloadable_files label{position:absolute;left:0;margin:0 0 0 12px;line-height:24px}.woocommerce_options_panel p{margin:9px 0}.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p.form-field{padding:5px 20px 5px 162px!important}.woocommerce_options_panel .sale_price_dates_fields .short:first-of-type{margin-bottom:1em}.woocommerce_options_panel .sale_price_dates_fields .short:nth-of-type(2){clear:left}.woocommerce_options_panel label,.woocommerce_options_panel legend{float:left;width:150px;padding:0;margin:0 0 0 -150px}.woocommerce_options_panel label .req,.woocommerce_options_panel legend .req{font-weight:700;font-style:normal;color:#a00}.woocommerce_options_panel .description{padding:0;margin:0 0 0 7px;clear:none;display:inline}.woocommerce_options_panel .description-block{margin-left:0;display:block}.woocommerce_options_panel input,.woocommerce_options_panel select,.woocommerce_options_panel textarea{margin:0}.woocommerce_options_panel textarea{vertical-align:top;height:3.5em;line-height:1.5em}.woocommerce_options_panel input[type=email],.woocommerce_options_panel input[type=number],.woocommerce_options_panel input[type=text]{width:50%;float:left}.woocommerce_options_panel input.button{width:auto;margin-left:8px}.woocommerce_options_panel select{float:left}.woocommerce_options_panel .short,.woocommerce_options_panel input[type=email].short,.woocommerce_options_panel input[type=number].short,.woocommerce_options_panel input[type=text].short{width:50%}.woocommerce_options_panel .sized{width:auto!important;margin-right:6px}.woocommerce_options_panel .options_group{border-top:1px solid #fff;border-bottom:1px solid #eee}.woocommerce_options_panel .options_group:first-child{border-top:0}.woocommerce_options_panel .options_group:last-child{border-bottom:0}.woocommerce_options_panel .options_group fieldset{margin:9px 0;font-size:12px;padding:5px 9px;line-height:24px}.woocommerce_options_panel .options_group fieldset label{width:auto;float:none}.woocommerce_options_panel .options_group fieldset ul{float:left;width:50%;margin:0;padding:0}.woocommerce_options_panel .options_group fieldset ul li{margin:0;width:auto}.woocommerce_options_panel .options_group fieldset ul li input{width:auto;float:none;margin-right:4px}.woocommerce_options_panel .options_group fieldset ul.wc-radios label{margin-left:0}.woocommerce_options_panel .dimensions_field .wrap{display:block;width:50%}.woocommerce_options_panel .dimensions_field .wrap input{width:30.75%;margin-right:3.8%}.woocommerce_options_panel .dimensions_field .wrap .last{margin-right:0}.woocommerce_options_panel.padded{padding:1em}#woocommerce-product-data input.dp-applied{float:left}#grouped_product_options,#simple_product_options,#virtual_product_options{padding:12px;font-style:italic;color:#666}.wc-metaboxes-wrapper .toolbar{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #eee;padding:9px 12px!important}.wc-metaboxes-wrapper .toolbar:first-child{border-top:0}.wc-metaboxes-wrapper .toolbar:last-child{border-bottom:0}.wc-metaboxes-wrapper .toolbar .add_variation,.wc-metaboxes-wrapper .toolbar .link_all_variations{float:right;margin-left:5px}.wc-metaboxes-wrapper p.toolbar{overflow:hidden;zoom:1}.wc-metaboxes-wrapper .fr,.wc-metaboxes-wrapper button.add_attribute,.wc-metaboxes-wrapper button.add_variable_attribute,.wc-metaboxes-wrapper select.attribute_taxonomy{float:right;margin:0 0 0 6px}.wc-metaboxes-wrapper .wc-metaboxes{border-bottom:1px solid #eee}.wc-metaboxes-wrapper .wc-metabox-sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;margin-bottom:9px;border-width:1px;border-style:dashed}.wc-metaboxes-wrapper .wc-metabox{background:#fff;border-bottom:1px solid #eee;margin:0!important}.wc-metaboxes-wrapper .wc-metabox select{font-weight:400}.wc-metaboxes-wrapper .wc-metabox:last-of-type{border-bottom:0}.wc-metaboxes-wrapper .wc-metabox .handlediv:before{line-height:.5!important}.wc-metaboxes-wrapper .wc-metabox.closed{border-radius:3px}.wc-metaboxes-wrapper .wc-metabox.closed .handlediv:before{content:"\f140"!important}.wc-metaboxes-wrapper .wc-metabox.closed h3{border:0}.wc-metaboxes-wrapper .wc-metabox h3{margin:0!important;padding:.75em .75em .75em 1em!important;font-size:1em!important;overflow:hidden;zoom:1;cursor:move}.wc-metaboxes-wrapper .wc-metabox h3 button{float:right}.wc-metaboxes-wrapper .wc-metabox h3 strong{line-height:24px;font-weight:700}.wc-metaboxes-wrapper .wc-metabox h3 select{font-family:sans-serif}.wc-metaboxes-wrapper .wc-metabox h3 .handlediv{background-position:6px 5px!important;display:none;height:24px}.wc-metaboxes-wrapper .wc-metabox h3.fixed{cursor:pointer!important}.wc-metaboxes-wrapper .wc-metabox h3:hover .handlediv{display:block}.wc-metaboxes-wrapper .wc-metabox table{width:100%;position:relative;background-color:#fdfdfd;padding:1em;border-top:1px solid #eee}.wc-metaboxes-wrapper .wc-metabox table td{text-align:left;padding:0 6px 1em 0;vertical-align:top;border:0}.wc-metaboxes-wrapper .wc-metabox table td label{text-align:left;display:block;line-height:21px}.wc-metaboxes-wrapper .wc-metabox table td input{float:left;min-width:200px}.wc-metaboxes-wrapper .wc-metabox table td input,.wc-metaboxes-wrapper .wc-metabox table td textarea{width:100%;margin:0;display:block;font-size:14px;padding:4px;color:#555}.wc-metaboxes-wrapper .wc-metabox table td .chosen-container,.wc-metaboxes-wrapper .wc-metabox table td select{width:100%!important}.wc-metaboxes-wrapper .wc-metabox table td input.short{width:200px}.wc-metaboxes-wrapper .wc-metabox table td input.checkbox{width:16px;min-width:inherit;vertical-align:text-bottom;display:inline-block;float:none}.wc-metaboxes-wrapper .wc-metabox table td.attribute_name{width:200px}.wc-metaboxes-wrapper .wc-metabox table .minus,.wc-metaboxes-wrapper .wc-metabox table .plus{margin-top:6px}.wc-metaboxes-wrapper .wc-metabox table .fl{float:left}.wc-metaboxes-wrapper .wc-metabox table .fr{float:right}.wc-metaboxes-wrapper .close_all,.wc-metaboxes-wrapper .expand_all{float:right;margin-left:14px;line-height:22px;text-decoration:none}.wc-metaboxes-wrapper .close_all:before,.wc-metaboxes-wrapper .expand_all:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";text-decoration:none;font-size:.8em;color:#999}.wc-metaboxes-wrapper .expand_all:before{content:"\e035"}.woocommerce_variable_attributes{background-color:#fdfdfd;border-top:1px solid #eee}.woocommerce_variable_attributes .data{padding:1em 2em}.woocommerce_variable_attributes .data:after,.woocommerce_variable_attributes .data:before{content:" ";display:table}.woocommerce_variable_attributes .data:after{clear:both}.woocommerce_variable_attributes .upload_image_button{display:block;width:48px;height:48px;float:left;margin-right:20px;position:relative}.woocommerce_variable_attributes .upload_image_button img{width:100%;height:auto}.woocommerce_variable_attributes .upload_image_button:before{content:"\f317";font-family:Dashicons;display:none;position:absolute;top:0;left:0;right:0;bottom:0;text-align:center;line-height:48px;font-size:2em;font-weight:400;-webkit-font-smoothing:antialiased}.woocommerce_variable_attributes .upload_image_button.remove:before{content:"\f335"}.woocommerce_variable_attributes .upload_image_button:hover:before{display:block}.woocommerce_variable_attributes .options{border:1px solid #eee;border-width:1px 0;padding:.25em 0}.woocommerce_variable_attributes .options label{display:inline-block;padding:4px 1em 2px 0}.woocommerce_variable_attributes .options input[type=checkbox]{margin-top:5px;margin-right:3px}.form-row label{display:block}.form-row input[type=number],.form-row input[type=text],.form-row select{width:100%}.form-row.dimensions_field input{width:25%;float:left;margin-right:1%}.form-row.dimensions_field input:last-of-type{margin-right:0}.form-row-first,.form-row-last{width:48%;float:right}.form-row-first{clear:both;float:left}.form-row-full{clear:both}.tips{cursor:help;text-decoration:none}img.tips{padding:5px 0 0}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#464646}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#464646}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#464646}#tiptip_holder.tip_left{padding-right:5px}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#464646}#tiptip_content,.chart-tooltip,.wc_error_tip{font-size:11px;color:#fff;padding:.5em;background:#464646;border-radius:3px;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.1);-moz-box-shadow:1px 1px 3px rgba(0,0,0,.1);box-shadow:1px 1px 3px rgba(0,0,0,.1);text-align:center;max-width:150px}#tiptip_content code,.chart-tooltip code,.wc_error_tip code{background:#888;padding:1px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}.wc_error_tip{background:#d82223;max-width:20em;white-space:normal;position:absolute;margin:1.5em 1px 0 -1em;z-index:9999999}.wc_error_tip:after{content:"";display:block;border:8px solid #d82223;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;position:absolute;top:-3px;left:50%;margin:-1em 0 0 -3px}img.ui-datepicker-trigger{vertical-align:middle;margin-top:-1px;cursor:pointer}.wc-metabox-content img.ui-datepicker-trigger,.woocommerce_options_panel img.ui-datepicker-trigger{float:left;margin-right:8px;margin-top:4px;margin-left:4px}#ui-datepicker-div{display:none}.woocommerce-reports-wide.woocommerce-reports-wrap,.woocommerce-reports-wrap.woocommerce-reports-wrap{margin-left:300px;padding-top:18px}.woocommerce-reports-wide.halved,.woocommerce-reports-wrap.halved{margin:0;overflow:hidden;zoom:1}.woocommerce-reports-wide .widefat td,.woocommerce-reports-wrap .widefat td{vertical-align:top;padding:7px}.woocommerce-reports-wide .widefat td .description,.woocommerce-reports-wrap .widefat td .description{margin:4px 0 0}.woocommerce-reports-wide .postbox:after,.woocommerce-reports-wrap .postbox:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce-reports-wide .postbox h3,.woocommerce-reports-wrap .postbox h3{cursor:default!important}.woocommerce-reports-wide .postbox .inside,.woocommerce-reports-wrap .postbox .inside{padding:10px;margin:0!important}.woocommerce-reports-wide .postbox h3.stats_range,.woocommerce-reports-wrap .postbox h3.stats_range{padding:0!important;border-bottom-color:#dfdfdf}.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{float:right;line-height:26px;border-left:1px solid #dfdfdf;padding:10px;display:block;text-decoration:none}.woocommerce-reports-wide .postbox h3.stats_range .export_csv:before,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;content:"";text-decoration:none;margin-right:4px}.woocommerce-reports-wide .postbox h3.stats_range ul,.woocommerce-reports-wrap .postbox h3.stats_range ul{list-style:none;margin:0;padding:0;zoom:1;background:#f5f5f5}.woocommerce-reports-wide .postbox h3.stats_range ul:after,.woocommerce-reports-wide .postbox h3.stats_range ul:before,.woocommerce-reports-wrap .postbox h3.stats_range ul:after,.woocommerce-reports-wrap .postbox h3.stats_range ul:before{content:" ";display:table}.woocommerce-reports-wide .postbox h3.stats_range ul:after,.woocommerce-reports-wrap .postbox h3.stats_range ul:after{clear:both}.woocommerce-reports-wide .postbox h3.stats_range ul li,.woocommerce-reports-wrap .postbox h3.stats_range ul li{float:left;margin:0;padding:0;line-height:26px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li a{border-right:1px solid #dfdfdf;padding:10px;display:block;text-decoration:none}.woocommerce-reports-wide .postbox h3.stats_range ul li.active,.woocommerce-reports-wrap .postbox h3.stats_range ul li.active{background:#fff;-webkit-box-shadow:0 4px 0 0 #fff;box-shadow:0 4px 0 0 #fff}.woocommerce-reports-wide .postbox h3.stats_range ul li.active a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.active a{color:#777}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:9px 10px;vertical-align:middle}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom div,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom form,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom div,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom form{display:inline;margin:0}.woocommerce-reports-wide .postbox h3.stats_range ul li.custom div input.range_datepicker,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom form input.range_datepicker,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom div input.range_datepicker,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom form input.range_datepicker{padding:0;margin:0 10px 0 0;background:0 0;border:0;color:#777;text-align:center;-webkit-box-shadow:none;box-shadow:none}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding:12px 12px 12px 249px;margin:0!important}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{width:225px;margin-left:-237px;float:left}.woocommerce-reports-wide .postbox .chart-widgets,.woocommerce-reports-wrap .postbox .chart-widgets{margin:0;padding:0}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget{margin:0 0 1em;background:#fafafa;border:1px solid #dfdfdf}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget:after{content:".";display:block;height:0;clear:both;visibility:hidden}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget h4,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget h4{background:#fff;border:1px solid #dfdfdf;border-left-width:0;border-right-width:0;padding:10px;margin:0;color:#2ea2cc;border-top-width:0;background:-webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9)) #fff;background:-webkit-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:-moz-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:-o-linear-gradient(bottom,#ececec,#f9f9f9) #fff;background:#f9f9f9 #fff}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget h4.section_title:hover,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget h4.section_title:hover{color:#a00}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title{cursor:pointer}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title span,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title span{display:block}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title span:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title span:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin-left:.618em;content:"";text-decoration:none;float:right;font-size:.9em;line-height:1.618}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title.open,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title.open{color:#333}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section_title.open span:after,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section_title.open span:after{display:none}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section{border-bottom:1px solid #dfdfdf}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section .chosen-container,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section .chosen-container{width:100%!important}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .section:last-of-type,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .section:last-of-type{border-radius:0 0 3px 3px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table{width:100%}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td{padding:7px 10px;vertical-align:top;border-top:1px solid #e5e5e5;line-height:1.4em}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table tr:first-child td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table tr:first-child td{border-top:0}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.count,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.count{background:#f5f5f5}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.name,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.name{max-width:175px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.name a,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.name a{word-wrap:break-word}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table td.sparkline,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table td.sparkline{vertical-align:middle}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table .wc_sparkline,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table .wc_sparkline{width:32px;height:1em;display:block;float:right}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget table tr.active td,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget table tr.active td{background:#f5f5f5}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget form,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget p,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget form,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget p{margin:0;padding:10px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget form .submit,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget p .submit,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget form .submit,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget p .submit{margin-top:10px}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget #product_ids,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget #product_ids{width:100%}.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .select_all,.woocommerce-reports-wide .postbox .chart-widgets li.chart-widget .select_none,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .select_all,.woocommerce-reports-wrap .postbox .chart-widgets li.chart-widget .select_none{float:right;color:#999;margin-left:4px;margin-top:10px}.woocommerce-reports-wide .postbox .chart-legend,.woocommerce-reports-wrap .postbox .chart-legend{list-style:none;margin:0 0 1em;padding:0;border:1px solid #dfdfdf;border-right-width:0;border-bottom-width:0;background:#fff}.woocommerce-reports-wide .postbox .chart-legend li,.woocommerce-reports-wrap .postbox .chart-legend li{border-right:5px solid #aaa;color:#aaa;padding:1em;display:block;margin:0;-webkit-transition:all ease .5s;box-shadow:inset 0 -1px 0 0 #dfdfdf}.woocommerce-reports-wide .postbox .chart-legend li strong,.woocommerce-reports-wrap .postbox .chart-legend li strong{font-size:1.618em;line-height:1.2em;color:#464646;font-weight:400;display:block;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif}.woocommerce-reports-wide .postbox .chart-legend li:hover,.woocommerce-reports-wrap .postbox .chart-legend li:hover{box-shadow:inset 0 -1px 0 0 #dfdfdf,inset 300px 0 0 rgba(156,93,144,.1);border-right:5px solid #9c5d90!important;padding-left:1.5em;color:#9c5d90}.woocommerce-reports-wide .postbox .pie-chart-legend,.woocommerce-reports-wrap .postbox .pie-chart-legend{margin:12px 0 0;overflow:hidden}.woocommerce-reports-wide .postbox .pie-chart-legend li,.woocommerce-reports-wrap .postbox .pie-chart-legend li{float:left;margin:0;padding:6px 0 0;border-top:4px solid #999;text-align:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:50%}.woocommerce-reports-wide .postbox .stat,.woocommerce-reports-wrap .postbox .stat{font-size:1.5em!important;font-weight:700;text-align:center}.woocommerce-reports-wide .postbox .chart-placeholder,.woocommerce-reports-wrap .postbox .chart-placeholder{width:100%;height:650px;overflow:hidden;position:relative}.woocommerce-reports-wide .postbox .chart-prompt,.woocommerce-reports-wrap .postbox .chart-prompt{line-height:650px;margin:0;color:#999;font-size:1.2em;font-style:italic;text-align:center}.woocommerce-reports-wide .postbox .chart-container,.woocommerce-reports-wrap .postbox .chart-container{background:#fff;padding:12px;position:relative;border:1px solid #dfdfdf;border-radius:3px}.woocommerce-reports-wide .postbox .main .chart-legend,.woocommerce-reports-wrap .postbox .main .chart-legend{margin-top:12px}.woocommerce-reports-wide .postbox .main .chart-legend li,.woocommerce-reports-wrap .postbox .main .chart-legend li{border-right:0;margin:0 8px 0 0;float:left;border-top:4px solid #aaa}.woocommerce-reports-wide .woocommerce-reports-main,.woocommerce-reports-wrap .woocommerce-reports-main{float:left;min-width:100%}.woocommerce-reports-wide .woocommerce-reports-main table td,.woocommerce-reports-wrap .woocommerce-reports-main table td{padding:9px}.woocommerce-reports-wide .woocommerce-reports-sidebar,.woocommerce-reports-wrap .woocommerce-reports-sidebar{display:inline;width:281px;margin-left:-300px;clear:both;float:left}.woocommerce-reports-wide .woocommerce-reports-left,.woocommerce-reports-wrap .woocommerce-reports-left{width:49.5%;float:left}.woocommerce-reports-wide .woocommerce-reports-right,.woocommerce-reports-wrap .woocommerce-reports-right{width:49.5%;float:right}.woocommerce-reports-wide .column-wc_actions a.edit,.woocommerce-reports-wide .column-wc_actions a.view,.woocommerce-reports-wrap .column-wc_actions a.edit,.woocommerce-reports-wrap .column-wc_actions a.view{display:block;text-indent:-9999px;position:relative;padding:0!important;height:2em!important;width:2em}.woocommerce-reports-wide .column-wc_actions a.edit:after,.woocommerce-reports-wide .column-wc_actions a.view:after,.woocommerce-reports-wrap .column-wc_actions a.edit:after,.woocommerce-reports-wrap .column-wc_actions a.view:after{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:1.85}.woocommerce-reports-wide .column-wc_actions a.edit:after,.woocommerce-reports-wrap .column-wc_actions a.edit:after{content:"\e01c"}.woocommerce-reports-wide .column-wc_actions a.view:after,.woocommerce-reports-wrap .column-wc_actions a.view:after{content:"\e010"}.woocommerce-wide-reports-wrap{padding-bottom:11px}.woocommerce-wide-reports-wrap .widefat .export-data{float:right}.woocommerce-wide-reports-wrap .widefat td,.woocommerce-wide-reports-wrap .widefat th{vertical-align:middle;padding:7px}form.report_filters div,form.report_filters input,form.report_filters label,form.report_filters p{vertical-align:middle}.chart-tooltip{position:absolute;display:none;line-height:1}table.bar_chart{width:100%}table.bar_chart thead th{text-align:left;color:#ccc;padding:6px 0}table.bar_chart tbody th{padding:6px 0;width:25%;text-align:left!important;font-weight:400!important;border-bottom:1px solid #fee}table.bar_chart tbody td{text-align:right;line-height:24px;padding:6px 6px 6px 0;border-bottom:1px solid #fee}table.bar_chart tbody td span{color:#8a4b75;display:block}table.bar_chart tbody td span.alt{color:#47a03e;margin-top:6px}table.bar_chart tbody td.bars{position:relative;text-align:left;padding:6px 6px 6px 0;border-bottom:1px solid #fee}table.bar_chart tbody td.bars a,table.bar_chart tbody td.bars span{text-decoration:none;clear:both;background:#8a4b75;float:left;display:block;line-height:24px;height:24px;-moz-border-radius:3px;-webkit-border-radius:3px;-o-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}table.bar_chart tbody td.bars span.alt{clear:both;background:#47a03e}table.bar_chart tbody td.bars span.alt span{margin:0;color:#c5dec2!important;text-shadow:0 1px 0 #47a03e;background:0 0}#profile-page .api-keys-wrapper{float:left;padding-bottom:10px}#profile-page .api-keys-get-qr{float:left;padding-left:10px}.chosen-container-single .chosen-single{height:26px;line-height:26px;margin-top:1px}.chosen-container-single .chosen-single div b{background:url(../images/chosen-sprite.png) 0 4px no-repeat!important}.chosen-container-active .chosen-single-with-drop div b{background-position:-18px 2px!important}.chosen-container-single .chosen-search input{line-height:13px;width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{width:100%!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container-multi .chosen-choices .search-field input{height:21px!important}.woocommerce_options_panel .chosen-container-multi{width:50%!important;float:left}.woocommerce_options_panel .chosen-container-multi .search-field{min-width:50%}.woocommerce_options_panel .chosen-container-multi .search-field input{min-width:100%}.chosen-container-single .chosen-single abbr{top:8px}@media only screen and (max-width:1280px){.woocommerce_options_panel .chosen-container-multi{width:80%!important}#order_data .order_data_column{width:48%}#order_data .order_data_column:first-child{width:100%}.woocommerce_options_panel .description{display:block;clear:both;margin-left:0}.woocommerce_options_panel .dimensions_field .wrap,.woocommerce_options_panel .short,.woocommerce_options_panel input[type=email].short,.woocommerce_options_panel input[type=number].short,.woocommerce_options_panel input[type=text].short{width:80%}.woocommerce_options_panel .downloadable_files,.woocommerce_variations .downloadable_files{padding:0;clear:both}.woocommerce_options_panel .downloadable_files label,.woocommerce_variations .downloadable_files label{position:static}.woocommerce_options_panel .downloadable_files table,.woocommerce_variations .downloadable_files table{margin:0 12px 24px;width:94%}.woocommerce_options_panel .downloadable_files table .sort,.woocommerce_variations .downloadable_files table .sort{display:none}.woocommerce_options_panel .woocommerce_variable_attributes .downloadable_files table,.woocommerce_variations .woocommerce_variable_attributes .downloadable_files table{margin:0 0 1em;width:100%}}@media only screen and (max-width:900px){#woocommerce-product-data .wc-tabs-back,#woocommerce-product-data ul.product_data_tabs{width:10%}#woocommerce-coupon-data .wc-metaboxes-wrapper,#woocommerce-coupon-data .woocommerce_options_panel,#woocommerce-product-data .wc-metaboxes-wrapper,#woocommerce-product-data .woocommerce_options_panel{width:90%}#woocommerce-product-data ul.product_data_tabs li a{position:relative;text-indent:-999px;padding:10px}#woocommerce-product-data ul.product_data_tabs li a:before{position:absolute;top:0;right:0;bottom:0;left:0;text-indent:0;text-align:center;line-height:40px;width:100%;height:40px}}@media only screen and (max-width:782px){#wp-excerpt-media-buttons a{font-size:16px;line-height:37px;height:39px;padding:0 20px 0 15px}#wp-excerpt-editor-tools{padding-top:20px;padding-right:15px;overflow:hidden;margin-bottom:-1px}#woocommerce-product-data .checkbox{width:25px}}@media only screen and (max-width:500px){.woocommerce_options_panel label,.woocommerce_options_panel legend{float:none;width:auto;display:block;margin:0}.woocommerce_options_panel fieldset.form-field,.woocommerce_options_panel p.form-field{padding:5px 20px!important}}.wc-backbone-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:160000}.wc-backbone-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.wc-backbone-modal .wc-backbone-modal-content{position:absolute;top:50%;left:50%;width:500px;background:#fff;margin:-150px 0 0 -250px}.wc-backbone-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.wc-backbone-modal-main{padding-bottom:50px}.wc-backbone-modal-main article,.wc-backbone-modal-main header{display:block;position:relative;padding:4px 16px}.wc-backbone-modal-main header{border-bottom:1px solid #ddd}.wc-backbone-modal-main article{padding:10px 16px}.wc-backbone-modal-main article .pagination{padding:10px 0 0;text-align:center}.wc-backbone-modal-main h1{font-size:22px;font-weight:200;line-height:45px;margin:0}.wc-backbone-modal-main footer{position:absolute;left:0;right:0;bottom:0;height:30px;z-index:100;padding:10px 0;border:0 solid #dfdfdf;border-width:1px 0 0;box-shadow:0 -4px 4px -4px rgba(0,0,0,.1)}.wc-backbone-modal-main footer .inner{padding:0 10px;text-align:right} \ No newline at end of file diff --git a/assets/css/admin.scss b/assets/css/admin.scss index 5f07a53ceee..2f309d430d7 100644 --- a/assets/css/admin.scss +++ b/assets/css/admin.scss @@ -83,6 +83,26 @@ } } } + + .storefront { + background: url(../images/storefront-bg.jpg) bottom right #f6f6f6; + border: 1px solid #ddd; + padding: 20px; + overflow: hidden; + zoom: 1; + + img { + width: 278px; + height: auto; + float: left; + margin: 0 20px 0 0; + box-shadow: 0 1px 6px rgba(0,0,0,0.1); + } + + p { + max-width: 750px; + } + } } .woocommerce-message { diff --git a/assets/images/storefront-bg.jpg b/assets/images/storefront-bg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1ba57202afbfb33636ab8559fafd608f8412b07e GIT binary patch literal 16420 zcmb_@2V9d$^YD{U6cIHdoYF+%n+lji z2uN3|v`|71y?#$nPdxSg-v9Uih9A$)&d$!xw%OT|oew*ofFo+kmy`hr1Oljnf51); z@CQImNl8gXNlisXO+yX-)9$CH-cNh*zyaC=2M!)NxC=)P9y)yF@S%hB^v90T)3Y!$ zGqbS&17snPef##&9i%&cvhxan?S~ps|3(4f0H81k1q`xN3oro? zfP$>;H-JDXD5>^?X_7}E02B&<%2QHNP*RY2z%&@;(Nn_b&R@GtMbF`QOyt5{&g&6> z(G45~g+pN!FhBuVcL9z*c=b)2J=h_8 zeufMlnah8I`Pj6wtM^|)}pJ99EX0nD4iobD#qPxEK6K<$N zB|nb0&QaxFzQfeQE7y@#G`+*2=gZDUXD+W!i*LLD#5T{^b-9ibQj{9(nW;E>KT1#T z0B1Tj*6v3L8){nhSa-2X;^AVd#RwM-D_nzZK4Y;ct|glimm`%smmu_f!l2RF-j}|{ z1n1LsSz}nMAzMy#Q|Gi!LE4p}ik5PhUi}8c?pOk5(zM`yHLHhTf(=XZQhaD7mTdtu zFFApp3`kU0>gMm73{xn7K)ts5ydktOo=7huzN9sOqROaY45g`T(?)HJI-q{8FEiU{*O@zJw0=1&d;-{LO;{L@2ekqDOi#%=`>bC)>W?BN}lsE zKrc>IdybFR&$FH00kUG{?oJtWVC>s6SDZ&y|D@II!0!MyxWZ{fU%G|w`@?_m)?s%5 z4Rl3mo@2$8je%<#U*@G*9c2&aWw}B!FyXUG ztX(36J8dSHW1N~hTCp~-jZnEFEK$`jD!tw9{LbWiH~~QLmgrwCAvDR9!my{;7@RBT_RrbQi+UfjwR8H^c0o(KQboP*A8`FO6#_Z zHE~tQP+xF#t1#fmh5HqCWoJP-EQ_xi@?0K4*))s37{|Su*WF?Y(;uI}&7qfsHWXz? zvqD$qIxVM`h38lV6*NWHn{}0xl&m?g9zJ=p#v{o+RBy#)cvVAkzTa}XrJq8;hxc$; zjp|0TPU?^C`+uQ`)S=m~EUal1vcLbvN#zj5DytK)Q93)%0vqfb`@s4~*gT89Woh#gYT$&Bhcb{HP^x?)pzuqMponK z;B69U%QKq6W@svtYQNN_6C*=shv)k_KMtD>l{`lAH}~YTdzH%b-;;%jZ#UVZj|~Y9 zcCZ)=`FwQpm_C>KMY6qaI!p1Kj(JV=eY+?05f?K?0to-XS$*U7)Ew^!Hy5{HDrP>y(nDxu#0 zpt#e#qqR8>#p$RKi!@@?;3YVXrrE3!KdL8NsMYrKu|!C(mp6CA?0KBw(XT5V+*3Rm z2lEYit}Ngkx=H<N6H?;<#4s zg3f%I_+A`>5=mC_Tz%c0#d)~I1nc?CVRV4AOHELh*gOl$F-W0AhQ~y@apK|X3==vl z(U&tza@E!H<;~cN;taZbC?=I&mL1@6bJW6}=6=m6oY`h$a>RtL@gajv8A{ixS^1eD z6PzZU2_w0bUjogAtGj93G(Tra2q21NvZ>S(t%kf83+y2SQDK9K^%aHbNkaX+!{Wro z$1z~M9_OgL(m12|MU-9Gy&;G0s1+2l*6a8-y~BE3SAn$Sroy9)2?F|# z#}XDRjZtsTe|oZ}BxxI^x8lu!wPC_2spOp>8(zKQKWXImeiHZkPWv=@g1!2=e*Yyk z7#=gPuF`u{DtrDATV+O~Z}g_-Z&3?5lXA9)>V%RQWZeUt{eBCsUn?zSi-DsL4-)&O zGI|+`YaJc*h!SWspXLCwxmIBuri`ejBc>Oy!NuZ#x8A=AFTVWf!|EBPl;@>OC@hkL zL*}bO9E#ofk(~IOQJIUTvM~j^w=8p{Ia>JtK(ki83=Nq1MRQYfg)5RJaMK{k!4JT4 zk`Y(oQk^#G@9up@=w##ItdX3(g0Y7p$XO^nQvE33A?LL8{H91?vF~-cKFMu{AX&F0 z-!h5@MA)CrQLitd-Sfj94$iM4PP(Noo5?Kl#}kgX8pOEG=So+ zlwUM48?~2DMOQ{z7DGacl0Cd{Ri154-aM=Pvcd2(PHl|J2R3neilFL=(QoU*A1#na z^7|fUj1LTCc?5*^eW&FAHgYjzA|aE@5?|@C1Gp)Vt-DaIJ;e*GH|_wg6ZEj>l*rEo z9B6iqF^0WM`DJnJ>PRvx;Z-<4ZW#%&TwxR>S0-Zo}R#2x?QO>DatM4 z9Z%%6giGSD^DW|HkZURHuAME2qVkPJ1L2LBG$kvBfIw7A`D~xHhx8iuWg>(nA~TSf z7C<0Q_ZUa$6)d9p{wou{TR)l$ivR1{{6qlV>vo_elfv>Ug(5V;)MM;p2oH%VduBXI zH$U;LIohFwm!UAO+e=#Cba2fw(bB1XR|ch#*Er3gIjlQ@ddz>$m3S1TPv~{gsCcdB zzJZH)z7QH&l}hF5yYAll>L+FXK-y2HP`)8=dVT@Ws6@2qGF5$iKyO}hpI`jIl?)++ zu6|?sC|-d&Q!JL)qTdk7gVr>(7n@x%6trkz!WeenNI$HwPcI(h4Iw#r26c_2$_L;% z%_u>;k$$XEI;ZcDtKirnss3T_6m0#iT4K!ySa8y4S5n=}tY2vH3o@ic90*NMr7w|? zf9wx~dt?Y~X<-xc;jwdDFy_Jxuk9Y{N^L^=me-_j@_Zb3#x?&Jy)B~Kx7^S-aEGN) z21FExMO(ih(CLxvmEsyd&00L#wvG+v8b}mmDFWU1a)p|%$XvwS4Cl&O)5I&-DnwE7 zK*J1Ot*^gnT&EjlH#-6SySkF%{`E>1Cmi|)@<%=Q6J9Qr3_QtCtcWf2T3Dp26E;g~ ztgW@LiYhT(a>B1=BqhbRjAF-GVb;xvz%G~4T)bzl)9Ua1uJuph`>bD)Wqt>1Cv;jahOOV%@IZdQ#3bTWNSLUj}pKNo8p< zb6{u>`jX4_T)hsyOhcWeZRA)6omHB%VQe37Ml@~*2ysx?jVFX69H;Y4TSW^nT&UP>1&c;;X9G#F2)$Vsh9EZKND zy|uv$I~&CcmQ+6d$PnC(NHP-95=&Uhj=pc3e9=>Ifxt7*-1X7NJ;@>cX?jMNEnm$j z0n>A>p#<%L7W5RyJ>qLvQeVIc<%nc++X+X-N?AHO$Y*U`-)U)M)l@a96+A!`?M5of2_h6isEiabN3fZ&oA@+=L8il-m7~# zn30suoKCd+A0WR_53zQmHDuJg^V?Xnz&-OPmTFG%H4YAbLsI9!T&1L)je7#tGO^Ge zT38oa-r;l0+!&xkvMSOg0+UueCNfRP<3=Ha#P!muKEvADx5JHl3;P%Td3XcST>ql~ z|A}^s(}-u%d@LYKyYLS4RVZ~+Dzhly3W)Oge0V-o@CWUt$}tZUyREzJvc&ndv6>g) z%K2M;oR2x`uLd+&J5O>JRYJxM7Qr1kY~{9}0+qL>#79E2e(zE^tNUu`r8ynW*^Y;+ zk5}g5el0EWnGe$WJg4bfB{l>Xmb@-*7;0^({w|&8(_>b39BUF$X)mMlvUA-}^On*T zcm0W0|EAXuC2eD$VF$bP2GCj3wO5|-xUykqYgL-pP^Y`g3jHl*iN4Y*(G(t=g1p|z zQ6~#T@V0LCB5DgAiqsW?Ymz~l(Tm%dh)UPcPs_E}d)u*-0lN`GrEWyVm`X z{Qp1@2ST12=ZPcfcL&d|08We79OAY|$+*CmE(AWUhKNNLFNOH4c%#EI#A(o@lZVAb z6YGW(C5$8$Gl?T>lCutN;+WR{hC1O^JJ@rSeXjIev;B-hf`8n?%Ayy)ocGc`bw@F* z-N~1g!i`=I`7CRk+$*pKrp{rVCn>qU+)#geHwPzvdGp;MuCSsa`{8S zvs8{H0;a1|G@R{BVcUC~y0*B0;mYRw&x~TR3nf0wTjHY$%c#&f$2I|uN36ToZ83B@@;S>HK=x0?JQ| z67H1DhOxBvYspp{pB<`}%Nv>RNmKIt!}v>`eicaU|G=ed%xm!;WPrXo#STF8^0>av z$a6y?%BLNg>qiK9+gSHam6{_Y+1Fm0I(hGyaC($9ilT#K`lfw7#f*pX*?nC(`lr(v z9}cP-K+K+iGh5(A%U8n*shel=5ZbsLIO!NYHaJaWHC^_!zVB`NI_yTZXuqkm@Msa; z(}1vayHG(d54#-1LQc1^JrBtb3`4io(lD8_xDMNI7YGk_cNJs7g!B zeeY46HObjP9%U3aV>X2KKa(O>%@-zV9CH6Mq28k-+r)qvo3;Gd-Mf3Up>1i$L@VOr$gJVUYmv$8jqe>Oy=+a_f%bUjU_bkd6D&rX-Q zp!g-j^);JI?K3`OaAe85H7tEez(}w1ShHWSS!I@3K-e*&acPNjlX{eA2yt?BVS3vQ zi$L_*ux+&C^rq+>VoiDriLL${O7;wEA9?tNS$QNXo&6uY3OQ<6B>aL$VK_gm0Z{#qCpb==87Aqx$P?fI4)pfS*=Tfb5=J zxvD7eMHD@Ah^&onY@5+&id@`b`ZwlPo{1`L^3IcoggzB%|~rZ-FD04$(ufX)b0P5S_7$k342Q((0etIG93GIB5=M1B?d)?y`y0i%u?HxNnj&MP@Q>R@kLOR7e8{Nv`R}~u{#!U<@ zTp7?$n9LC_bTTLl2zXhT<>{}CJ|ktLPi(;YH2|Rovq`snuYXeu#2_Vr$~kdb<{OmL zyL9AHa6SFKTRh}mkN8Xcy`dzH*SDELN2TC&;ypzG(D4q;+vNiQr}>*=4n1jQ(e)=) zWf7R+qO`HeMUhXBL3`^SUBY{;wY&I^p+(1J+aY<|nCzu}%IO6d&ssr!4S4?PPBEaB z@!@SNszECqMykjcuRxhOp!okDkY8CT|6>1&eiw3dJ@e6mtz15s3yboZ*9Vt3R!DYZ zIzggm`+7OZ(*~hSY zGeVBnb;+jY(@3yUQle{18@y8P2Cm=48+VD?i;)C@@exkRrp6bD2HrlK*ln7zxKD{Y zS?yEK10=w6bhj_ay8but&975Gb@rzjAepF7-zQKHvb>78^*5~@vm*5?$k_+4z^0+p zr`0r91onJS$y&4RM6J(kJGa3+F?e%}ItR5}}&gm%f1w*$~(Dq60VC zcIo};hl^GWt)5p{6NEg{~-zI`VB@y^)!ckl^Hk_t;!C{1|am(NN^*R zUr6wFQ)+BnQUs5eraKrXlKgZgBT0)o0}ayQIxS0T2jegXa)V-t&4>@2mjYYTplzKe zHiQlg)Y4!IFnRDiI-To`pz|*9!WdkezQKNMmQ|nS9U8i~MNJjT`~#8srJd^(ir*N1 z!1i4ELjMyVs5&!cKsUthsTD-#A4UNfxF|B{>(794p?R@Vf>jY4cfB3b{Ix|>E**h9 zD}ahdr-Eq!gte-E;n=hYn_~P_jA>rKam*8K2u7fZ+k+D48lwjQT#&0|K6Agkj_4K2 zeer+@J}wIWsW7`s6=SfvpfYJ z>wME~;}&ciuBKG?hvC0%#fEZjB8 zk>sPoYxVfr4EoiTGD3sR28H2#vY5<(^8~BjwhT8|=)s(gHQW2$8A#YN7t;jN!fltAEok;DK^1{xMXI0$G^Uq$t_v1hscDV# zbg4ra%y7mYkStDGtVzjY>&RQ_}>na-G*kg#tCcC3z|j>!8G;4vexh3Cm01*z)1?H{o*&UxK6)Y4zSW^Ph7gsww`NJ zomaQk-6x=|UZH)?r}Pi{AYhsaY&o75RtuN0>XS8EOU{}( z()&&hOFl+NJ@Q+YS7D7Jom)_OcD}qPvt}UId6rYR2PI&CCW{i{+JA>QY>QMCTk|Cy~{Bkk1bZ1g%MV}kpRdxnc z!YOWEc&-}DWAu7V0jZ<+$ZGjzFvY4XfE5_^jz05 zHJVv=>5R#KBpQAsL6PG|arC;-?+a82KeTJ_2cdEU-i9=3ei=%$X_~ZjQ)}I{`%kzn zTw}v&fc-Oh;2psJO3y5@CDns-CTn_6k_cUi^J+?swXVf3U|;MW%vC6!krJF|xs}`b zk@w?Ck)ac^qK~f;*{95-f(IvtDtw=29ey=ZJ!X;Q{fDj3Nji=8K+xMhSbb7_;!lR` znGn!6dOp6k)t49msXuubv((@XH*EX!wI&@0d7yrQmsb|lYwcUQ z&Pr~@H*kuSNs0g<6xz~*zv!gWR;}prSa@uqc*(8=^(q`tXGem|C8ZkU4FD2T{w}Xz zB}UOSHmao1$7On!EhMH`Zw09i&u3oJ$Da_3%w2cbHoVvJd+7MWmGfu(cyg=kRu)`@ z@ik4CdJW;PhEt?hee$h>h-oVN@MQVZIC}&s0bYnT)eceQrl)}@8E_Uyr+Xtu3kAaj ztR?8XZ)syQs+GF(RVh0oXvzCxfabvynKS@UN<+QM1g(DY90ps#j%N(n3TckO%Ojik zt^2FrbzCwsj-a9Rg$J~+z5AQenlhD+pZ|>@GxE+zU?~5!^%Tbvb5y0gnM|(yj@!i74*`r6F%wYqbyL$!4WsIWN!55?OD&{ zs2Q5-T1l_vgo+KmRg?(t=B+1v8~*LT_fi72gHFbCTtfpg*( z{fFboUHStsh~|QtrXo#`y!1AECNW%g8VriDJWb@-CsDS4m_+-Su8%MObr%+~f zT>0})Dl1-_Ct;*q*ZHnziRSMC0S>U``T04{0~CC-r?K*UiX7MYl&|iMw(wD5)KSt z?bsS6^*by3m`smv-&$civF`>)e?Z_wHP;kOr_h|vn)b~#8URTJ76AgKIuSk*_=A@L z<;VqhK;S_77aZ9WhZ~cs7AE}@d zn{lE`UtvR08VR2CNLHQFD6F0u_VO{8%F*2Ls(5v|c+gove10^8ws_EOTkdIR>f$TP zH`?G#107Qc(*q}M<6~=gd|teykp6@-BoQZ<&UGz$xmyKJ9kOw^YVx^!Pl*St8#izi z$Vi+^!(K(uf;#|+BWU00Z@_xNr!f%53vC}k3lCUYttT`sw{crm@UMKLazKVdC zEnB@yd16|yWMu4FkR^x9*8apKfZ;j{?x4tf4(zmWwvcOtRWCHTjo9s<$J06BZ@#9G zlpWa}x=!uYYt4DR(!?|)E>e-)V0(ee$?T;xNv)+*T-~0bj`5{ruzM&nXD>CQ@{ykg~01oua$DVm4O$kmDniP@3;GW5@r!uOHv0jy9+9Acb8hqJ6nwLaS zt@0C5`%r~9J+~~gqc60*8S2EIEKfImicVttJ-%?IYbL0le8^MrNYW#q-rfLb)!SgM z_#Vnr9*9|6^jHotFm0KtXcAAZP+B+4JnJ$CQwYkKtsW=1ZJsH|+j!}2-fsh_{<=Zl z?NM2lB(Z~fQgZF%T218h=!gwh1;Akq037e$ETr8d)<`!EdQgYQ+%^VjpV!2r`@vo` zTs21}8r2AtQ^@AF*?M^H03(LmT^EamJ7K{Ler7#el@J7m^Rm*^dzSYsFQ(|v@o&=< zK;$gpa2uCLH#_=wfZQy@YSl$b{1dbIb-#(ATHaVYX{6S}x=kr;*+S3NR_4y++;sob zubR_0Ty2i{p!JOu0}SXuo%OX-L0y0(C3h9M^Bg?$`>`wU|MQzGGCOc&_xt7Zt2GK> z07ojd+f2*ldq_a@HeU7y$!TGdx7pah)xScl?$Z1fcX`998lhEJ%`*nxm!7H?wc``x zhuu(BSKqBY{S$XAkWhYaxp2Ca$j9&!F2udA(q^P;jIh>1b@xAQ(q_HMAa)td z2S`L?Hzd@w3;?Gi)cbT^D!DQTMN~R5*-3Q=RJnhLu!96Bj1Qu=SlovZuGYXBGhKN1 z<~>*^$XRk1LXL(rfcQbngmQtx6#M*COTR`(_)@c8@yDW!4){qrOYUqD1@+~vyZ&67 z5>b~;(PtVL4>UKDqOEmDSL6ezIQ>)v*0PyV?+Z*yM1s;!72FP!&#F~&qt>oN%(h@{ z7^cEO6+obTLw|%^ta^%=!$ni)o@`V%GJ|U|aGLg_E8z>zXU?C0zgt!S=!KtiDgA{2 z&D_OuE^0pBvh(z;EGJ65+uRG@7PsB%zb{)dG(XFFw@#whxBN-zg4Q$3<=6@ZTC0jC z)pgSXuk_7>e!(`~=Nk}(8P0N7$2Si-7-Y%Hr<;0rrJiN#PcAc~2`J2nm2O=2@|dVs z>uRZcGZJK!omA}zKq0>ao+tPlB0Co2vR}7FJxcR>3%=kDQ#joG_PT7I`&N0SLJp|0 zAnOBdb^yv-c8whgMj^2deCC7!0sF`?s=wF)Ac6+0C6b}Sp0Q3rX+KWR0#YD!aL|Li zKrm{bCAZ$Sb4YNi)#7y^VceCBb(eMQCIo>a;S3|$X}tg3?27^^yjKq-#vqlWGJ#!S zC}* z0TV>(TW?IZ&bKI1rosMVKh+Q!#h9=(Nz~~e?4#SVEN7O^zg=kQJ6w;qqP*Us-*c%! zgt=fwuek2bXoW+K(H)mNu}P+A#Q4XXdRd{#xm!Bms;-w@Se)XX-B-SU;%qNi#Alb7 z61jU?eMo=4;W<85EN%v>t;(fHb0i!*uG+8bRiV~6b0`3QERCeY+mQyn4$g+%vkb^- z%$KGC0AA(0&~6Bm=-xqiF{>I8+6uPowtXJCshrpq5hKFxQH zlJH)$X=T^SYOQ6!13K30`!yawT{>mXb+3-4k{|39oQ|hNf}S+ls{$XiHnVc{hiKO` z{Co0FULbf-Tk>Yjdn%2N=aV>QpTpFvh%<$AT>af*|x1I4tw~%=C@`khJk5 zf~gGc88PfkNOB?oVOb&s%}%1;ryxZhN0A7z@twtbBvX5tYt8iv{9c3|V2)LBm-D+% zs1;=pNfo?fXhhPz`_e$re?J+d{4NUs?CpeaNswzI;FCXS+%3aps-yRfqqB03hNMzB zVLDq&4qQAX2OLF$GbC+ETez1Q%ya|*y9^4taby99eh<}8TvwZDxa{*WJ~T2Q7(mz? zdhw3-GQ4ja)qG)kjDoAqPVh-#828<16SRDA9X~BO8yRRqC$x=0l_(MHqMw@1CbQFyD6h5NVbS1a1W#&jYUo>n-#NO11Y^(ZV3<8}`nm^;*%JaDEL zCFtTfG-P>(4;S|=o4&z8SNAZ}Yt zElE>7O73YltCXaV`{;mm(-P~cRQ{l%m(rbWr2*~lUhUT6^Jn*NL4rL`>aQF3JfE>D zf)nO5(5XUQQWQ_8s4234p?nE`=qcp)>0e^7-wm|EE(kwy%Eq1SaUKn)GN)BbrGbz~ zU}sbrruo>)BXZVwwNv1jTsls0I5sH311IZwbray-093&bWlG zup)%tVty!-{hau+b$_s?rfWpz4iJ5hJQY%yD4Fyq5z>1y|AYR!p?~o(9HJdTUPO+S zh1h*0cOLieK#b0H?|Vw>#A;>Tp*h_pd*8b`L)Enkk?4w?Y6jFmmXWcS4mf<{A39pp z#qo0UI`@sb#>~S%Ea=SlL#A~SZyCUaR13Y;UV-8SUc3jt2Og||-_OvV5q(53lWZtI zKREqL-wi1Q)=EvU4N<2LS(rA-fz9 z7_Fgyp5}@cn;R~apzj2N4gHavSfbu=@ZiejpSt&w7LH&pxsEM0`0e z3Rk2ahknr}1dkpW9I6UWEOD!=?z6E;EGLb>^otiS^)VdTeTSdS7rHNmnCXcPE?0y#P&cBz3`Ukk5p5 zqFSslDh~1!V6x5{pXRY~#yyM>{TachiZ5KkVQI)cQ*%36&m>Bw?dreV9$dQ+Ln+*`zO@&JT*Y>P@GJRU z;FDGjdsI-5MAv|Jh$aHH1AIyd*454s^Vf|uWrM4R+PSo^-A&S}7wJqQPE0jbD_;s_Td4R91n$8Bv|xha;g0d<5sjs)YPK47181gjuC+gJTz_UqYw zGM0)1MGF=Gs^H=m2KBN9G*@~8hloHdqifN)pxj1 zA=dvLKW1+k;9AJRV_CotnkpSZcrJU+aAjUkU=_dlnrlEW;&{p9m^zeam6_?B9_x#y zn~wJS1s5yDN0Y|tZhBhs%Gn7szO3{;VHSY1jX1%F7?2PowzD2z&1#1EI5P*#t+`lg zh<6rfit#fOFZFjO&eQwcyvSF6#no%sVDpUOjG)Iz@rKt{(V_4F5T-xt#nFW|b&C&J zaUK|A5%bm*-JnQw+~x;=Vx;HFRW1F^pQd#!%ji{KFfmA ziMegI%3+jm-|i2htmPo=d#bt@-z6V?fZPrL{lTp0Gw!bD6l`ZCYRopowFEtL;c_PD zhZ5Dfjyy;`>boHneCTG?{+<_T+KSa#*fi_;M?Umnu>n|%0=^F)hY@-TEmXGAi8gZAVIyYqvc{a3_%&IP%^y+G( zChsgKRHgTE7D#iRoLl3?2xcx$A%WC?RhBU9Y+lDOlA^S72mE>GD)!uAjZK{c?iCKL z(mB<&S?hcvE8~L<%mX1qf@2MAje;VGz6^gyTNm)vzhC@^(_%IE2|A=or#Ch=ot`%M z&C9xpoPQrrkKUc3VuL1@=vawZ&hY_@rP~BpoT5~3@J=Jh&?JdSu$GROhqx@MsK?sl?`1&A={H~Xki6%89zNm>&?C>=anSy4_ zU5REAzj{%qdP`eedg#8$s3?}zq3(?uhZ>S8&ai1ZOsfR3kV_&h;1o!n_mhHZ@Un&dmDm{r|P@x@&!#Rn@ikTl=lrwRgQ%Pw{j9=NbS@MnYNw00##Lkb3+B{Dc8S z0Z0f42#5$sh=@o}kscE&3K9|uD%!JWsL!6EVWItYV4-1PVqs#S;o#un;@}X0Kp-Nr z-;ZBR;E<7#(b3Qeu&@XS@v!j-e<%KT3qLym*eGzVaOd!Fjrs4vNxw!gso2;KX=X5=C zCU|V~zcdQ~z&&z)q>y4i_U6eG_&-tMo?yd2N5FY$#3u4{5r78&NXLf91_%T8XKHKl z;xNAKkWI?N-u$4d)x6jMb->niFuX0mV&SAJO1% z@@+eM8)&@^=CxIp<%EV%Ckz}xEf-~mN;@58XnSfox1ur@8yxPOV$7&=E~eS`h^B-l zy1^B%6grkho4vudIzmx1lcFD0!4{}ry5^H6b=`F;jzlsij4tA;toMxB8zA5%e(8#* zIzh9_(#1u=J)1QKj)&xHr8y$|g*pi5y`8m)KRWoAU~ttH`KfAeno#Kc{fpqgM{?KJ zQP^9F6p)iYAt(Fa&Jw%NGoEJ`Omi(PVsZFoZDnf9%N7Y zztd2${RB{5ZT?6Q6C*nLAC~_!mj5q4BJ$nf_rbv^zh_*YJhI~h1w|oV_o8$p*SSUU zbXp3gfg)%n;ZDms%R~|A4ps{XD*bp}eRUU+=pyLJ-#8MbhT-cD8(_80ODZ1c*BFB3|Y_S^)V^3%XkxH`9*i2J;Hqrry%-SBI zb+x%A9^^ zy-0lb+14ADNk5I>swoI^hpf&>R?b9ZLPzb&Dko|NMp8(PQtc_;-e`3A(m8M`!*aJp zX!`TdbZ!brQhM$8bIOBFsfR}rv4pGZHs2W+zJ14vvXHnctOTnrC`1VQtxl?!Jzjee zbnMe=C;RL?%hZ9!OIP!%$=ar7d(g>DOXle2lt<~kn#cJH!#lO`U@B#7IBYEJzs!(0 zKKp-aDc=F5yi3pJlxJ?M+%yEhR~rwC5u}YqKyp23JduX>&e<9ls(G-O+6zsy(d;Nl zk9bG-Y2HaHt`+uxOfIVo`bKKa$k9w*PcG#h^Gi1_x?PZVssw{q@MSNywWRzBW$;^j z7yJF(HIEOqX#e!t|1kmnUGiHxOQK)`T{7xZv1n=y_#=OkoyB=f_)cV<8*eT?KBj=w zU{;UVRwJIrWI>Kb@>o&r*X87Y;`=@{T_qj3R#FsM#h2{NxtO@c`G7Xy>M4q58kXd} z6Q0p;G9jlZU2G7{O_T*81*T}oY0e?F_)b_kQXPR94^S`2=CPIMzBrxK^@5)EEv`7& z-0&{gPt_a2pWZ7;XZPhq*Z#O3Hj1Bz`Eno3SIHk$dp%)(C!*YSj@^$C8+$=DDXgWT zx?4tgpc(l362qz;ynS!t)Nm*nkTBHSM=UkRDoU|!H3TZ#*s0*1l-~GC#(Buy07l{N z(KanzXU-O&&Lp7S34F2DOZOsbVu-=iJRduScc+i&DJB5N`<#*B>==Jp81I;gEUm;Q zH)`Rd;5E?#SG;p@>mvV3btAHfm>7cCtG~&_i>(;>Y^Z6EH-?RJj(rvr;NX)P>h>@E z^gXTc>-744yZo)hvsK^aF(&#OTVlHEdp(6OELn6Qf(M_Q&m`!Y4<*AOp3C@larKzQ z%VaYL%PF1LjQ(zABXxB@_?)zF?fg7(ZOr=J3CQmcSJI0w=ml*=deh)jk^ zLndmEz|L}KPf&IRwiHw?$5y8GCxF9#^0*fCoE9h6ES90$|8x2Ohhw5<7h?$vwsF*E z->iUBete_Se<#x(g`KalRmKBr|GTSa@6)H7FZlk$w(0t7D4IaI8)3jV?Bt(1$wsP*b#=!XB8{MsDGTz85rYm78Q&|;NJ zT4fU9(uq->4zh0Op{7eJX1d2fHuRRqa@8#H7|n8iZ^Jisop2jqRI{o6;H|Bbku`$BOb+uq zr}@j_dP_OFMrCKY6O z!CAv4P}seflg_iOMD5M>elYr`VeyJ@gdIQ4T)tHBSucsdOYT0y)z+qX%i zUW!FxaLGK_cmq;TXDP`4&6t%gi|C9_t~D3~kz0dKey3N?zG(J?v-*Ra0q!5)0dic8JzCcp z;hss)K_9U!y1-OY36bt@l3U+|qr1T2GwXW)8*3l-{5CcE6*3#2?)L^u=~$t`&ti4H!+PvddJH)Q;Ew1XL&RRJKjU@@;g4y5d>ep&A8( zKe?nlgUBUuDceNwYc37*BYtbZw$SoI{mZVV>2;PBV3%i?_E+rFC`l7Jy;#{!upxiG zTv~f+Ufa~Uul{n}nnXc$D8Y)v-%&? ztAU3j^Q~xR!sD>=NbLBRHoIY%TYvyW$5S>SM*8I^`33OQQATkXo2-)q6tN3U-_|Ib z-#2R|WI*QrZpNB)wo+(OMog9vvA;}&I;Y+~*^Y|j{9gWIVPRavz@-T>r&`%a4P%nW zB)%;zW=Kwqcm6v?;`Qb5ILa5M^tp2_FVJ6(LQ+k?ctt8o2QAy@N~ldb(KWnNVBLZ~ zd+YY3{t*H^WQ{mfTfglu-^o|p|HlNpwD&&&s}1fCMWi<$yt;qy5uR7*u38RfZKN8v zG=pqrR25udsFhLsH<8`*zqLsIj}t^N6+fuC#5kJJYI1~i258{ z4K*9=(x7UHqu|v>KGUA8m)hZ&6g22r30C4xd9-uVC?*9R(EJr|t}U?L8X6&9sqN+T z#nxP%uZOFS>OCyUP}kkJmBF+=k7-Z2lu=1#Oi_}EW7wL?a7V_=?Z(c{Zc+VpUMrow z%(LwOZ-4&QBO-r7Zw?&tb-Sg{{O<){81QDMU2vmk)#VnwG(qWBxnLV@zAu#`;YI`j z4D^NcoAFQKQ|I(y1czk}Ufs#vE!WG#ml% z?ccg6e-Mz_3VlJcdP3C4O!^a{n$vw(Dw|kx)?8j;Wf-%St-EHhWM=; zb)HaC3%(kWPfCh&dU{;E67eHTQb+9q)B=SXc8qVO;E_#>*}zRHUUoBAXA**4%I)r zw3~puUxs+Gd{W);KqPjRvTHKe8#R0xQ62o86SPnTm+1BECPtD~i~7S!Zg9UMZlt(; zR8!=F{vh$C+mO!$Djp@^Nw*=$@4pfFLL;(A&g)|xtk}=K>}A%lA?MZa?>nQkx8erc zETS}2%`!AFbe_>SSf9z!z7Iny;Hp9e&(7DCs3*7O2TEBo@C2xo zMi;9uRLw7aC#_hr)&2>f;XE1r{u6+if1R1qaVjG~2t9Xk$30H>3aki3%g@%3*{-M1 z8Nu+Z&yr$NiAi?f@%#x0n)3NmQ3+yMtDs=Dnzr*mDu4DzNu)M=hL^X%*FEFFn;hEMHq{BdX0_V+*iT z6De<(Ngt8l)hA|jl-V6>JeqB%wR+(Wv%dX2xzFd7qew-i`EqvFx@_ba*m~uxx=;48 zyC(nH;sY(6MJTUtz6E#Ub~WUt_XbQ?^Os&3cEc#k(xQoyvC9aisppIKj47wg&2=Ce zb4_gRxZl&TLAmu5<};gU^ijQ51{;@0=RA1Fu3_O0j|=gHdPucQ&)UU?XrMPN=?uuBH?bQP9_@u9rF#mo>T4Hrf!H`7 zK1?-h&iM}3)?wAjXw{xqjM>;|&cUt%W~t00*5b--4rsGKdm|?9X_LI#2R4lXI01<7 z=K&(B;&vVjl+Pt!RufGUx!dxO>&kv;6(9Pj@;whC7Z&E{eGu*ji_pH=z-9h4A(YvG zlh(5CwgrJUb3FHxS;w^{fY8N71ZI7e5Mjb-gRR=1zL7!+_TSLT311i~tIX^@T^O{* zLyN69@yD=nTktVqduk;o79UhQ!fbcuI9>yNRuDWl#^ds_wsihz=?Vf0Qt$B3`6n4j zJ2wJ08RMVf`tGrXkW4$`v%)L?m_(>UNOG{uIJn~Qo>1#|j=2WRjR?`JWz1T@lB|MZa(K#Jv(W+h<>%iYa^jXmLt@On%Cb zO4yz#|1o98iUZ42`sp4MEfu!-!DGdLRaV~{WUWZchs~H%ihTov$Zr3p-rq3AE6?bs zS58|y6j3GL=yw#CMZiy!hW~)r42$tRd7bmQaOv3sT_Y9QA7Rf*y9X3{ zHUWX-&tX3SExRQ z=(*k=jTM!r)7e%0<)zV5h^a{^xbquI-T-XEQ-8bJD6@3|grl4aewo`FVp-IBBoarGggY!-p7cZ`PBk_ac{N-$oalKI@Au3Ukf1!> zAX2Lppm6bom-dY>lNLPH$J9&T)Aid|Cry2PKv{@>m7alm#j(hEV4~6FjI1o8n3L)h z%m7svH7Ui-#;z$cx6dfSQ@1k_Q4sC*GpQbIWQ%4NpMLL8D>6~}DcA*;%zT$FJj87^ z#IJcZ&m1%sr%!eDMwt)}8LXiTDK5`zR^ZY?YDwVk1Ky-`a8#=2bO={uhKh+Hey0oz z=a#1MH!&Q(BJRM5J8#)MubFDPF$&xbf1%98857Q-zdLB?O*#Vo2;DTILK+EsOI6{; zMDGg{4@?zBE^sR<#tN4e)|n)SR5ftdy6Tcjou*o#`QvowptbiJX zCX7hR85g8>(9OH6x;ADP9=z1`ko*i|*=E>*3La~>7Hx8)ZEwvwDa=x9g-a9>+C4`O zYlX?*8hcRPj@p|Q{=hqs?>nLnHM0NA@qOXZK^U|GXsfu}*4D+vd|Zpw)G>vC?Q6N+ zoPDF;Z958wj0;r?Jip)JuA06JJ%C4%`QwfWpgYCjDHG-c?txXIVQC&a~5Pw&riHcl*seC>J>HG|tZ@*Ky! zp7UkTlcVM))my)Bq!^P@$9RtMyra%9J`YUVfxJ9MJIC`qP7LB4hIH;D+}9K1Fz5m& zH#B{^vIFa=73DeH`FN4cGkyY|nMZVB_Btu%yrqJ0!}9=&-AuR%l2i467)57oK_6(& z^z43BaBcxmtL9pwH-TJMhFjXSqjmiRggk933bB^Dh-0rKI5FHw z(Y^3e=p|*Q(dgyb62j3^mO&gYF(0zuJ7<_5#R)PwCwg7Y6Bb45qcCvEqs!@kUB>@u zGnJ}ZYGdNzM8k$u7#M=Y$Fpqbx4S5&K-FxYyb^o+!01LV6KrF-S^SZQT_h2?rgAgW zZ>k3Cb-e&Ih_$x%{o)D_>4=#aPb($oXxw+Hfo`tJ`PQ$fdJAs4H~9H?W;2WOJp{5^ z@@P&n+)sYkNkWpxX0WT*PiEp_S@s^Livxr;Jg{hLScwn*>U-XsVq6e}`@My6spR{2 zMymOzXoqT_PcaW^$tSSk9PM-4kvB;?tj@mR8@%WeO(jIUm_FKR<9DsMLaiQTbYyLl z3}m%;hWgE(4ZjJgR{i3>gB`7V>+E)6;Dw2|J|D}`X9hHJcMhm?Et}}fC#0oCn?zMt z4{TjKvDMkM-@q`ga#TR9z~3Wvqwv*6eoDU_@D(xKN6g&Zd%3c46lwOH&db_DG`P(( z&3*WAOt^|K(vC+~R~P?CjEMkMr6UE@!Nh&26TrHS@E-yM8vz+b_!?8{C*bnS*bSyW z`NR)aum(J|m$HVi;4sMK;=Or9uB~&Rq$|8{z|knyyHk>=pMaydjB}C}t{|g0u5Z>> z$*4&$;w1%-pimR{#xYMDZ7_7pZPV$iEf-{MW3yTXsJxlye9@4`RpRfw z`M2dMrS3eN_y%V2BAZ7{lX@(D=@J4rQAGH*oG*wG1(-mI1B`?)#BrgB9ZB-S&t{xX zL%DCNF4&t`Dg$F7U;3d7X*Myn%O4EZn~{q%lcsoHSTUskn7`sl5xz|JaxU<>oQT4F!?#kCqL$E-2Vq>4)Y zty4D+@|k`)%dR%{2L}rws_u0D0@pJbdY1u_rruA$;w+)&;tu9v*W5dg@a$}UA*dm) z7k|#Y9lT^+0$M?MGB@$@Oem0a#dWEUUKk*ZN0Li>2e?!EC4m?xz?KF$<#B5@Fy9%@ zS%pQN3p~s?p&*g+0_zkE&QOK$`a{Refk}6d^{+KUkz0>H#R;R>1~G> z&``T9L*C1po(w!aQggx8{3wS|iU4ASbMBMQ5#LDiN(VE&n5emzlZdqs#T3hJ^Q}A! zdhABR&V7r`LSz?VO>vX=!E9`(i9OI2%ros89%}k~7JsaqAOmqqmXJ(y8##Mq4(=0- zQFm9SDqkN(drbpEzOz){GZ8k)>B;|tscBd;h-G+-Hodp?<9u=%Oz4?}o7WRs3O<-cBg)EzXnJpfZB8KgB zE%A?UtSN})Ote?EeBZsI`0wwc+DJV^GbB$;sQmWsvF! zu4<%cQC<#&$Y7?gPhwTYwz>#*X;N#9-!y>4jZ;zDEU6XqEZDYnNxqetK>>(p=Yf1b zgSmMp^Az!=3(Oz@lI$Ly81dFt?ru*^!LiF5l(O!u#FVjvrqL;js2OM_!fPk%8HfW`j-p(clZ; z8?pm8zSR+A*&ObGqMN?VQ*u46%HM@M;5hB=2qF&IblF zd`m-a=OCSufDlyNNU8on2zlHsyp+%JmXs!k@1PMV;5+b2rAvRj|ctK>HSP%6aL zq4lkW_=AyJ&nWYryI?NeZx5U3<#4}ylXZpTZ%WI=}}HzzzHr(yrn z#UoYFV_lGM2U1#~D>N_jG}qF;HulcO2pBm{9;9$Et6$vZrqumb98i8C(UgGZyl?t( zh&X-0q+Mus=Ez&8h+LAp#nF;~x-8=KJzI-jq6>lU*E@$0+-sA~)d=Q|@;FsqcOO$~(wT#itkl%eql)P^^c-brcCjUfA}Du4fkI z6@1>Qr=W?e;HtB_&(~{yOBRrl6`PFbXO-#^kGp8T$!L<8C_&i$7k(5C@@OKRap(Th}j4WvYr8T1tG`7ay{H@I5sk`<)#`G zLQK$YF(RPiOaf@km28d{DxyX$34;vFW?L^6Nka;NR9{%4x+hyxqze{-!Rn&oBH`oH zv#KqUii)_0&MQ|Su2R4eWm(<_Nk$J{#<;v_)a9~y_qZQ0|Ji1g-p`JjNLr^i!9_X3 zivjDK4{A63iYj<|0$dJ9f%#zh7bJ{OO#598ixkzXNu!&P)2=6ud0t>+_TjXjxsr|0r03Ndk9^UnN#sfE5-4Eusf~cEM9oz&qZ@r)oP~$**d2&889l%i)A@*#NNgEc{>@a+ zK8MbBtt>TGH_!p|sNBZ~W>Lh&n6Fx|vTwEe03L^XlQ7`MN3u>`8QH-ehK|&gMwyWr^@j zTeB7WnisB#@iui);SS4WHvUJ`?zIR*U(pw(l<`=S%WVBbqnc%Pnz~C36@%4l1DcY! z#uk#7ckgW5JbGQiaL=Z|@#$BtX~|lc1&>Ax8UzqRC}S)7=7FuO_;Z3zLfhy=dUy4d zS(~McLi5V;bwjkG^>jrTDQ?GScm{THfyKQGP_Rk9V;Ij-B_sKP`-D1gC3s^F2-{oq zw={^mc_)c`WKw z?)I%MU#4^5PSk0RUJ4+?U*m-?>4FC6egfz+5U}r>$KUZdjM*0an5nahKpsw)2{cKR zwWdbLk)tp4UwN?-#LqRVlR~Gkv9=} zi8eHFN2)xi2tEDFR;CiXFn2Is9L4?w@I@XoqkqNy35Xr@a|a@Qd-m>&MJK{L=5x|f zA`TecgRA=9=*Py+(n&PV#=a5D62Gr$9nQ1w{#W~W5~%+Ej-m=EORjR)WW)a;T7Hu% z8ec{^nJ82HtqZU$!jzmJ@Xsy8&eERs6xDvymi&w^YoOcjnpN$mOt%BPx#gL2LTF%x) z%XpaoLy_CDHeu!Ex#)y-$?NEzlF8R!Q^UT?UZZr6z zHj`BUg5md$geNDb8(HPp`rks3ugl}#bd!3F^W$bXFKovCYQrBnOSbyaBJBHhQuV$9 zz7VnKi!X=5uCwWgox?fk5#b!j`l(~E-)v@UDB;It$(K=%-sRpF@Njd}<;g;$$?H1{ zPWfn_A^XcogPd_J^UAyu8|mR!mG0U%{|*mndX$ma?7@(#RT09xp`RLzS_48MzO{)Z z>LJxA8)fJT{7;9O*)3l5Z@@C!{vo{kXyAdQIm^)}9w_>CC{}|Ndkd4W>=xL0Z)KPI zpkaax7(&=Jg6FXpl33w9`y9@uFUuk*oSQYLYU}VX3Y%Kk{mQcAv-7bTr&(NT%DA@$ z57}ZM%bNp>nMP}KVlOzq@kMA;Z~QQE4%dXqf^t5U48ELdG(csbfP1hyO33p#Idr;S>?rXL2Ia>fPdH!8`Utv>2zs^FOUnjo*q{#mzg81J^q#{c9m3QF=$mrX^jHgA*oaT?RFd6H z&q~hRbsQE8V$CUXcu1%?W7H?XR%WJbtzR36YQ809gHYhf<3~y-e5vSAr%<2}UvQElqq1su zAzPIdd+n+vR|ikiH#oXV*P{uum!g@;f|9}0bGYTdajb)^CTA0P<0M68~wpzuZdOpnMi(TSi7QxRm3($cC8OLW&E|Zj$gohB$kEk9; z)ts3FV^n+|$A}+JFqBXTvj$9`&PDP9L^C|MW0TH142?o|hkbk9dCd|=>VHJgRkU7O zP~colmqD?&?Y$(+mDHy+VXjpYHv$CK=OGRJ`-9|KTo#%LVYIqtl22oQ-MN~j?jegRoJs=* zp_cUIl$ojGa-I~Y)vVf37qOxSo4BQ4Ycg8$NRJQduP+m9nj7}XzWg#5Q=c>`Ubnhd zHol7iRSuJmno1B2=|>loqx>$$c{oS}8M4r^qKwv+UQ}}M&MJ+!(h8L5pMJ4SXOj-c zrF8*=FX1@Q^PPUtpdY)Ynf59#x5%VuSi+adF+-g=0X!6{3thHWdu2$7o--+19#8MMXJe%S0g5_)0ymv9yNi33AX5h3;)Qq9?G{^Yv(dQ4`q%5p$WNOP3|nTGOXfPs>s=J3tu60B!7Z zIvgUkld9FWd=RwakIKjo}mLpLz&Dw~ERP~4A9?O-}-yKi{(D~3MIan+tH78d(( zyqQs(9!2FzozxmmnmtJtw(!tyR5yRl%_*j3`)_rOl^7pBt!|v^nV2Td;nBR;D`5BX z!`M%NRSN`ZB`-)ZtJWb|bh)VCQQMR5DDnHyiAB0w*NT0if^m$xsKg%a=BxryXMFF{ zX4~2Rf>5U(Y5{35M%x857Y`*QVNN-EFB`iPy#oX*L&b%z9O- zev#YykvA!52?BPm7Fu0c*w-Np@3cPCPBe9+kfY1PsMh2MpQp^97veE3ZiZ!aV&hu= z)@|)es_ZztIFFA)V`xa6j=6t``Tja@z1hvrz%2-o+*m_m< z6Mww^@-ne4=1fcXkjJJ^UI`t{-Dcx=oR-GVQtuSsMbEHL+Y>jwPt%Ab2;*ly`3c~k zoQaW}7E=}zdnIoEx#6{}eE3LCttgRQqOsuU=5xoglCr_XYRwlVb#gbADNHAj&omRF zL?Td6lL97ZHwgH`wZO#$Tq}QU%cvxm9X2a}Z_;X2l5*4UH7@-(r=|a<{sXFpoUESm zR7{&Ps)V^sX#?@7X7OIc$T(J0h-@Ih8KiyrD`(rIH=AaDNIr(xG`ymLSUp0)_1 z>yjv;a;;0bXvPvxOQuA$h0^v`eC5eq3}gm0yXazyJeLKJp7`PWf`XDK{*0ER7+NJb z>iF0W$Ghr_%kFb5$#N8uFVti;a8J_B8=9gfXUF)RdBY*|3sm0H1A61t8(oDaUCl|O zuHerd&Y*^xP*BXIT~_uu8a~Y%KAPeFiT!T^)@7ThL<38YXuL&j;#Q`w2;If<0Oev^RzilzaPvIkqMAJl`Jyh#W} zR)^*3{KKyG_}fNyc8(Qb zngaVQi&K(I5_}i8{`;1?OHbT}*B1IyV&c8?zov}HP|esLeD)$;Zkz|A9jTt68cDep zBl^ca*Qh!X+eyx2_csB5en7{cfL!>LhxoH`J^S6|_6ZYB^vO0%*FH(hLEto0GpWoH zOVi*IJOH}%&yA_iyiAlNxqv;?CgWTw(A>`p_bQf}f4rai^tk+ud8Uz`5oVd2=!4Dw zl)R3+T8E!%fRrGywQGeVo0r9Yy`E|Q!4C`)ecv#;&Y;Iw4dg_w?F^{gsh!`LWL7xo z)sH;UPaO9pIX98x3`axq^Q(K7v_J`scf<;x;AU&nB6=r2r4iv9&TN09*)85Fpk4kD zeffMRb;hOZP)s~9zDRRNOjLZd7abfvAsZ|n+!pD0EyXtdMEmG{JtP=8c>@gn;)x~B zkAdN4@rr13($*gXeHnm%_~x@8=NlRHZgA0=)txwbFhxVn1G(dW7XNRd!2hzRO5ox= zesY<2&s4fbk{s5>RZ1&Lyk=(6{mCZ{3%O;@l`k0>}!<3IRT4|?&)V$?h23m``WZ&Uv3~PlAY1L4M___1C7rtpI zb}lr@>8lw;R6@TP};~4>Ja-&x< z(dC)$EeitnE~D6x?0GCF&kk^KjZtmV4%J&P_?ES>B*+}^y)n<|CgE3hKO7pp6>{e` zUkOkwE=RqIL3SzRLO@DvIFgVnok!BsD|yl!wqJWhFg1z|EAUWwVUVl&@k2wYAd@ae zq4)fOD#}+Qm<4kwnQZDJ0_@Q&z++|H6$nW(9txj3wfPDbljsEf|g& z#fzM|Vz-{&k33MIi~uA%2aPOo%&+~x+ZV)|pr?;lQ#Opnol%B_cvxkHOGGn`IBTQK zt2X_wt)3{!N6#l@ZVG1R45ztV-{@!woR1GulrS>yaK;!imi*C-LN*Gs$S!wEgGFWM zH=5s@!QCed$()eK?=I3&3tBtpbd^T{d(dTvzap-9zg9gkcy45_?h+ndJmNe81dj(~m5+mTetc>AR@%%G zWfFtcZg+LsF+9{h95PmC`=8gG%}ibT!6i?v^^~>;Kone1UvFt&=lX3FzUO^KJr(;B zTo-CeQ#FJ`I0=?n%WO-1>>V71k46Sou|R<% zI~eijk1n}oRo0c(GKG(k)s}gFIW_&VgD+h?Vq<3GSr61&e38jAkz7r|Ml-GAC}p`I z9a#&V2F$kTebZcMPBC(lL2vwr9Tk7Qee4fx=6@*}8|UD2vZGO*vbUQT&d7Ujtd0)P zFZJ8C)_q3Tc&4xM;g-wb`oJPtUWbFxI^;Vdg#}vz5M+vccR}`H#vyOZgS1-hCm=kz z47a5m{?fYrYHcIJ$qsBh^p$lXantd?$@Kf{+uGfY77^Hi zH9)~k^!HwIa~qXa8WOv?)vtKF?Jy0B))7dG16UY3?vu;!T>iu%f0S+{TwXLx5n&19 zP+51Jp-rS!X97bDqBR_xj_K1E?n7_uZr@(2AQR@d z);i<(w63p|)wOdO0B4B5TI>&PVuYTP4gFI8$DCdcI5-xMgFg> z^mT$<#SfF`{Tc{SJbG2^>b$wGOCZ`k9jw!Ny&0eGC!1F?wV^zVD7Bb~HUz?2CFuxR0Q@q));dCFr8h~n z<9@*zFiU@RJO9_sb6?1Aek1&Lmu6v6er|qzQIWaI)T=4VsR2>VK5p++g*9N(dGnrQ zh-B^}6t{aXzhf^g?%OQ#fwkMo3*BWULD18KeUZKU-?`30JL^&TgbNb+4``FEZ1zgn z(7=+&Lgel|JURk)yRNN>ki*hXeRCpl{~EJjJ-bH0Q+*!$@CZPvz6M_6eg8cIqa<xsCcJ^E+cl#yqDb$d#SChV=vmS$;bZdPu5Rh4?DJiP2y+;#`RpXL|I>KEVIoiLR> zN!1Zr9}kHa==$L*%^DOdx(j*kvWaIS02f=m3<=ID#7Q|qA|3R%>oF#q?(aZ1nx}lP z32g}n1xyZpd$}c+2jrf$Gv}n*zb?HgIRVXQd6x5<{U(AyYxH>R25CivvaASVv*%vW*o1Kuh)iNp8V zI5%BETV+antSLiv@OZZc>ZHcrRyNjo*;neivAlYbq2m^0MhRcB#SFVfIBp}3#bE^k zj@lKzl45UgvAk`FEd>IZ7uv5EEJ`#sVi|`#dCL)k0J65+M+$r6I^7r}^%uS<>`~eU zg@M_ErV7KWZ<_v#+WrrvPEPu`#_@Ui<>OioGD2w|8*qR3v$4w*e}1>KHlOaMA+mP# zJKy8UmXq_mDWDDO5q5z)hnX)qvh?Dj8>#ZULZpC#76Gfa7(OXlMTgU%XavsDp8zfA zcem9iM`#tgV<9o#53_RyRzlI`BFvRN7y&+PJqwu)X&n$M1e=Q8@|A#ZRs<7qnMfxU z2Rg4NLN-Bq6iJ}8CU$9I=!dFLMLEgI?w$NjG9zn00qLnB4=EIJLb$M+S6!$<7Ko66y?%V=bC<8Uilu7tGRg^Dm;>>rdvL8vuvuZ_ehTo!_%_%mPQ-VmY-X z%$An3VZ6=4erR+yrvnn@Y8e#vvFvwqM=Ne_c!;)5x*r1OiNzEwZ0Q3^N#Wx?T zFhau;s{68VNXtLYR=sufOVqUXkkkIBgktv;Q$7~J5s#fhhx~Jqr!&3wSA@^57)NX_ z!rW$?Idlb)jdU?(9zv#_r73S1LeE}#FFw0W(iB8bOTG2|u4s+P(MuNI(0^~(c&;U* zJU6JQf_r+cIcmP@u0GSS_YQEQmCeUtkehfIiQK8IC@YJ{m^_=fJxm$5JyIL4gq&yT z;&(Wn_(F~Zu-`DNiazf*>HxqeN#k88V(wPZExy{NDdkj%YUbZU^ z2voS5!s9GWBQ$cQtP)Wr^buQ4g?Fk-Sempbb>dL|T8Kq7L~>PGk?1GjxOQp%x^7=m zjEA$IbCkaDR0T+snU3GayIO3L#9-h=Y%+@IZ=tN`E+G`+k=h%*N6mr8xznE4y|_my z1hvg7CCT>_JCXb4Z8Cic<}X;-kvi#?q^x??KnjtA%WPQ))o#Xphd+~E!i)Rel6wa z-t!wDPMIB}Yi1eCwP9DU!^Zp==EFHRof|9#hn;Txpgjq|2x*6bpiYtou~=F$KKVUWvEqYGQg@Q7#AgeOQ|DnW*XulI-LT5D=q_tURoDK8Ot3us|>(9mf@ zobWY|Bif=a8;atOL}iTp+Ft2X7Mzy>UtjFz7I>N@YcWcUS{!8B9UYsTP3QEA7!#S`zBy&igX;Zsg2buQ{ihd3EzUUn}BMqzE@I+W`^eU&wk{6W~R>EiPkZ&&x2f?6BIZF7N8Zzt=i6p0&K5D z>iQw!D*M{g2n{b>F$1M^P12vH#C1IWOAA56C0v8JNlqti?Zgzy=U|D8n$jMwhOf+ZwPJ@-I9XO98z zLR0HgDaVu9lo~&87PoVVmNPrBPlpvrFadeoPFT%$avVR1U~{Mf-pIy`eLzn89PSG$?HGE!x(-Q2D*v$3-U$K1{A78YhxO-RfF?U?|2y397>OSXJp&_q5O zbvC*_nXOlp{0XQbkOwZJeXNt@>P-M6)|1bk$0Y`{5eG~(8G+wWVvac|EH{=eye($> zcMSQjeHXFc%xASN+_X7fbwNJ2QZuIoL-IKf- zos^s#F3E%xD%z7x1zAS zgo4k|HS2Fd6IHJ{BSjS9)_b?VSh;bV}5P@s)G8k`QFO?y4{N;HKBxt0ss+Kki;f6$zW3 zRyZ8r7>Kri5;+0|~ zGtXv2i_1|+5j$@s%k{G2ED23h+!nerPg#GZ*-LQ|P}(qS?pXbbe@QXRWJ6O; zT(0IioK&T^@|oe3!VV{X^c-@%)?}&4>2^-I8&Q?m8e*TJhyw!lWd4F%qzKI0uj+y; zgo$=4IgAF2$U|HO;3HCr0wZ84$+vZzchi;(?@c2sF6d5Keio&ydWkQ~YH8!FW9I*A zekNapcdPF+TE$tV8)sT0aa#RqW7mOOkF*QF7qP3Y^XBWdZLdbELQjlAYN_Bwc2=bK z!Yh~zb(YQFmH)2*Tmhs0MtTSZaorbVTZP2NfYz|&0D1=X)pQzXKMjig0?8ARw)81x zca7{(9SU8Y<9iiyd{pERlK1M`KW$i&nwol6!ekjmh;wcDb*!19Y_a5Z?XcV%8-sEB zg^27I4>q$hfzS!tzW4Q@rxKzp5t)mN97u6+%nOCTo%>Y|8A|ANZ<+65Ad9$cwe}BM zslhP(tpS8(H`q?!L0?ed^f0}$HJ@nFVDfHykXVj`4-z@TrOq+99HrvTEa1O8@mHUP(7fEowC269w?5ZhTkbU#*jUoS#|K;yUvs6?%lN6%x6+HQB1^W1zo;Oa*;xkqRD zC^Get+&3`0w+rw805)Gs5)3kq2Zuz=rKaO)-)nyYvd|F`0TB=p5djep5fK3q5P$#K D%;^Cp literal 0 HcmV?d00001 diff --git a/includes/admin/views/html-admin-page-addons.php b/includes/admin/views/html-admin-page-addons.php index a0625c3e13c..84666b1f550 100644 --- a/includes/admin/views/html-admin-page-addons.php +++ b/includes/admin/views/html-admin-page-addons.php @@ -8,7 +8,8 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } -$view = isset( $_GET['view'] ) ? sanitize_text_field( $_GET['view'] ) : ''; +$view = isset( $_GET['view'] ) ? sanitize_text_field( $_GET['view'] ) : ''; +$theme = wp_get_theme(); ?> @@ -17,7 +18,6 @@ $view = isset( $_GET['view'] ) ? sanitize_text_field( $_GET['view'] ) : '';

    -

      @@ -93,4 +93,27 @@ $view = isset( $_GET['view'] ) ? sanitize_text_field( $_GET['view'] ) : '';

      WooCommerce Extensions Catalog', 'woocommerce' ), 'http://www.woothemes.com/product-category/woocommerce-extensions/' ); ?>

      + + + +
      + Storefront + +

      + +

      + ', '' ); ?> +

      + +

      + ', '' ); ?> +

      + +

      + Read all about it + +

      +
      + +
    From ee8125d97c4a79439dfae6769e098747dda4bc59 Mon Sep 17 00:00:00 2001 From: Bryce Date: Tue, 16 Dec 2014 18:43:58 +0700 Subject: [PATCH 435/743] remove var keyword in WC_Product_Cat_Dropdown_Walker --- includes/walkers/class-product-cat-dropdown-walker.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/walkers/class-product-cat-dropdown-walker.php b/includes/walkers/class-product-cat-dropdown-walker.php index 4a5f0142b1c..23f0cea9234 100644 --- a/includes/walkers/class-product-cat-dropdown-walker.php +++ b/includes/walkers/class-product-cat-dropdown-walker.php @@ -13,10 +13,12 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } +if ( ! class_exists( 'WC_Product_Cat_Dropdown_Walker' ) ) : + class WC_Product_Cat_Dropdown_Walker extends Walker { - var $tree_type = 'category'; - var $db_fields = array ('parent' => 'parent', 'id' => 'term_id', 'slug' => 'slug' ); + public $tree_type = 'category'; + public $db_fields = array ('parent' => 'parent', 'id' => 'term_id', 'slug' => 'slug' ); /** * @see Walker::start_el() @@ -79,3 +81,5 @@ class WC_Product_Cat_Dropdown_Walker extends Walker { parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); } } + +endif; \ No newline at end of file From 19d06c3d5b779de057a34aebe3ceedadf89e5e6a Mon Sep 17 00:00:00 2001 From: Bryce Date: Tue, 16 Dec 2014 18:45:02 +0700 Subject: [PATCH 436/743] remove var keyword in WC_Product_Cat_List_Walker --- includes/walkers/class-product-cat-list-walker.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/includes/walkers/class-product-cat-list-walker.php b/includes/walkers/class-product-cat-list-walker.php index 9cdd88d5003..f4131077249 100644 --- a/includes/walkers/class-product-cat-list-walker.php +++ b/includes/walkers/class-product-cat-list-walker.php @@ -4,7 +4,7 @@ * * @extends Walker * @class WC_Product_Cat_Dropdown_Walker - * @version 1.6.4 + * @version 2.3.0 * @package WooCommerce/Classes/Walkers * @author WooThemes */ @@ -13,10 +13,12 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } +if ( ! class_exists( 'WC_Product_Cat_List_Walker' ) ) : + class WC_Product_Cat_List_Walker extends Walker { - var $tree_type = 'product_cat'; - var $db_fields = array ( 'parent' => 'parent', 'id' => 'term_id', 'slug' => 'slug' ); + public $tree_type = 'product_cat'; + public $db_fields = array ( 'parent' => 'parent', 'id' => 'term_id', 'slug' => 'slug' ); /** * @see Walker::start_lvl() @@ -119,3 +121,5 @@ class WC_Product_Cat_List_Walker extends Walker { parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); } } + +endif; \ No newline at end of file From 481aee39690f34adb5dab8daf95f129d9592392c Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 16 Dec 2014 10:10:25 -0200 Subject: [PATCH 437/743] Fixed dead variable in my account shortcode class --- includes/shortcodes/class-wc-shortcode-my-account.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/shortcodes/class-wc-shortcode-my-account.php b/includes/shortcodes/class-wc-shortcode-my-account.php index b49b29aed0c..dca64d0b144 100644 --- a/includes/shortcodes/class-wc-shortcode-my-account.php +++ b/includes/shortcodes/class-wc-shortcode-my-account.php @@ -280,7 +280,7 @@ class WC_Shortcode_My_Account { $wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user_login ) ); // Send email notification - $mailer = WC()->mailer(); + WC()->mailer(); // load email classes do_action( 'woocommerce_reset_password_notification', $user_login, $key ); wc_add_notice( __( 'Check your e-mail for the confirmation link.', 'woocommerce' ) ); From 8180de7fecf71d27e47a57cb8aa6b221c33d13f3 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 16 Dec 2014 15:29:37 -0200 Subject: [PATCH 438/743] Created the WC_Webhook::get_i18n_status() method --- includes/admin/class-wc-admin-post-types.php | 2 +- includes/class-wc-webhook.php | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index c834f7e2f37..9c25f923a08 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -736,7 +736,7 @@ class WC_Admin_Post_Types { break; case 'webhook_status' : - echo $the_webhook->get_status(); + echo $the_webhook->get_i18n_status(); break; case 'webhook_topic' : echo $the_webhook->get_topic(); diff --git a/includes/class-wc-webhook.php b/includes/class-wc-webhook.php index a01558e6f2e..bbcb0d0c56d 100644 --- a/includes/class-wc-webhook.php +++ b/includes/class-wc-webhook.php @@ -629,6 +629,22 @@ class WC_Webhook { return apply_filters( 'woocommerce_webhook_status', $status, $this->id ); } + /** + * Get the webhook i18n status + * + * @return string + */ + public function get_i18n_status() { + $status = $this->get_status(); + $statuses = apply_filters( 'woocommerce_webhook_i18n_statuses', array( + 'active' => __( 'Active', 'woocommerce' ), + 'paused' => __( 'Paused', 'woocommerce' ), + 'disabled' => __( 'Disabled', 'woocommerce' ), + ) ); + + return isset( $statuses[ $status ] ) ? $statuses[ $status ] : $status; + } + /** * Update the webhook status, see get_status() for valid statuses * From d8ff34710d819bc439e3d559e72ee4ba9ea2249b Mon Sep 17 00:00:00 2001 From: Patrick Rauland Date: Tue, 16 Dec 2014 11:32:54 -0700 Subject: [PATCH 439/743] adding email styles back to email preview. closes #6965 --- includes/admin/class-wc-admin.php | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/includes/admin/class-wc-admin.php b/includes/admin/class-wc-admin.php index b9df9d473da..fed4d57db39 100644 --- a/includes/admin/class-wc-admin.php +++ b/includes/admin/class-wc-admin.php @@ -114,17 +114,25 @@ class WC_Admin { die( 'Security check' ); } - global $email_heading; - - ob_start(); - - include( 'views/html-email-template-preview.php' ); - + // load the mailer class $mailer = WC()->mailer(); - $message = ob_get_clean(); + + // get the preview email subject $email_heading = __( 'HTML Email Template', 'woocommerce' ); - echo $mailer->wrap_message( $email_heading, $message ); + // get the preview email content + ob_start(); + include( 'views/html-email-template-preview.php' ); + $message = ob_get_clean(); + + // create a new email + $email = new WC_Email(); + + // wrap the content with the email template and then add styles + $message = $email->style_inline( $mailer->wrap_message( $email_heading, $message ) ); + + // print the preview email + echo $message; exit; } } From b247997bd2ede144b403d589e47c58cc2a52a42d Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 16 Dec 2014 18:54:48 -0200 Subject: [PATCH 440/743] Created method to get the webhook statuses --- includes/class-wc-webhook.php | 18 ++++++++---------- includes/wc-webhook-functions.php | 27 +++++++++++++++++++++++++++ woocommerce.php | 1 + 3 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 includes/wc-webhook-functions.php diff --git a/includes/class-wc-webhook.php b/includes/class-wc-webhook.php index bbcb0d0c56d..250c77b4fbf 100644 --- a/includes/class-wc-webhook.php +++ b/includes/class-wc-webhook.php @@ -636,11 +636,7 @@ class WC_Webhook { */ public function get_i18n_status() { $status = $this->get_status(); - $statuses = apply_filters( 'woocommerce_webhook_i18n_statuses', array( - 'active' => __( 'Active', 'woocommerce' ), - 'paused' => __( 'Paused', 'woocommerce' ), - 'disabled' => __( 'Disabled', 'woocommerce' ), - ) ); + $statuses = wc_get_webhook_statuses(); return isset( $statuses[ $status ] ) ? $statuses[ $status ] : $status; } @@ -652,26 +648,28 @@ class WC_Webhook { * @param $status */ public function update_status( $status ) { + global $wpdb; switch ( $status ) { - case 'active': + case 'active' : $post_status = 'publish'; break; - case 'paused': + case 'paused' : $post_status = 'draft'; break; - case 'disabled': + case 'disabled' : $post_status = 'pending'; break; - default: + default : $post_status = 'draft'; + break; } - wp_update_post( array( 'ID' => $this->id, 'post_status' => $post_status ) ); + $wpdb->update( $wpdb->posts, array( 'post_status' => $post_status ), array( 'ID' => $this->id ) ); } /** diff --git a/includes/wc-webhook-functions.php b/includes/wc-webhook-functions.php new file mode 100644 index 00000000000..425d231d4e0 --- /dev/null +++ b/includes/wc-webhook-functions.php @@ -0,0 +1,27 @@ + __( 'Active', 'woocommerce' ), + 'paused' => __( 'Paused', 'woocommerce' ), + 'disabled' => __( 'Disabled', 'woocommerce' ), + ) ); +} diff --git a/woocommerce.php b/woocommerce.php index 0062da8f069..e2b6df10b0c 100644 --- a/woocommerce.php +++ b/woocommerce.php @@ -200,6 +200,7 @@ final class WooCommerce { include_once( 'includes/class-wc-autoloader.php' ); include_once( 'includes/wc-core-functions.php' ); include_once( 'includes/wc-widget-functions.php' ); + include_once( 'includes/wc-webhook-functions.php' ); include_once( 'includes/class-wc-install.php' ); include_once( 'includes/class-wc-download-handler.php' ); include_once( 'includes/class-wc-comments.php' ); From 4d3673c4c25af6db73869943a83c17bec86a48d1 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 16 Dec 2014 19:05:03 -0200 Subject: [PATCH 441/743] Created webhook data meta box class --- .../class-wc-meta-box-webhook-data.php | 194 ++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php diff --git a/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php b/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php new file mode 100644 index 00000000000..2b19164ff18 --- /dev/null +++ b/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php @@ -0,0 +1,194 @@ +ID ); + ?> + + +
    +
    + 'name', + 'label' => __( 'Name', 'woocommerce' ), + 'description' => sprintf( __( 'Friendly name for identifying this webhook, defaults to Webhook created on %s.', 'woocommerce' ), strftime( _x( '%b %d, %Y @ %I:%M %p', 'Webhook created on date parsed by strftime', 'woocommerce' ) ) ), + 'desc_tip' => true, + 'value' => $webhook->get_name() + ) ); + ?> +
    + +
    + 'status', + 'label' => __( 'Status', 'woocommerce' ), + 'description' => __( 'The options are "Active" (delivers payload), "Paused" (does not deliver), or "Disabled" (does not deliver due delivery failures).', 'woocommerce' ), + 'desc_tip' => true, + 'options' => wc_get_webhook_statuses(), + 'value' => $webhook->get_status() + ) ); + ?> +
    + +
    + get_topic(); + $event = ''; + + if ( $topic ) { + list( $resource, $event ) = explode( '.', $topic ); + + if ( 'action' === $resource ) { + $topic = 'action'; + } else if ( ! in_array( $resource, array( 'coupon', 'customer', 'order', 'product' ) ) ) { + $topic = 'custom'; + } + } + + woocommerce_wp_select( array( + 'id' => 'topic', + 'label' => __( 'Topic', 'woocommerce' ), + 'description' => __( 'Select when the webhook will fire.', 'woocommerce' ), + 'desc_tip' => true, + 'options' => array( + '' => __( 'Select an option…', 'woocommerce' ), + 'coupon.created' => __( 'Coupon Created', 'woocommerce' ), + 'coupon.updated' => __( 'Coupon Updated', 'woocommerce' ), + 'coupon.deleted' => __( 'Coupon Deleted', 'woocommerce' ), + 'customer.created' => __( 'Customer Created', 'woocommerce' ), + 'customer.updated' => __( 'Customer Updated', 'woocommerce' ), + 'customer.deleted' => __( 'Customer Deleted', 'woocommerce' ), + 'order.created' => __( 'Order Created', 'woocommerce' ), + 'order.updated' => __( 'Order Updated', 'woocommerce' ), + 'order.deleted' => __( 'Order Deleted', 'woocommerce' ), + 'product.created' => __( 'Product Created', 'woocommerce' ), + 'product.updated' => __( 'Product Updated', 'woocommerce' ), + 'product.deleted' => __( 'Product Deleted', 'woocommerce' ), + 'action' => __( 'Action', 'woocommerce' ), + 'custom' => __( 'Custom', 'woocommerce' ) + ), + 'value' => $topic + ) ); + + // Action + woocommerce_wp_text_input( array( + 'id' => 'action_event', + 'label' => __( 'Action Event', 'woocommerce' ), + 'description' => __( 'Enter the Action that will trigger this webhook.', 'woocommerce' ), + 'desc_tip' => true, + 'value' => $event + ) ); + + // Custom Topic + woocommerce_wp_text_input( array( + 'id' => 'custom_topic', + 'label' => __( 'Custom Topic', 'woocommerce' ), + 'description' => __( 'Enter the Custom Topic that will trigger this webhook.', 'woocommerce' ), + 'desc_tip' => true, + 'value' => $webhook->get_topic() + ) ); + ?> +
    + +
    + 'delivery_url', + 'label' => __( 'Delivery URL', 'woocommerce' ), + 'description' => __( 'URL where the webhook payload is delivered.', 'woocommerce' ), + 'data_type' => 'url', + 'desc_tip' => true, + 'value' => $webhook->get_delivery_url() + ) ); + ?> +
    + +
    + 'secret', + 'label' => __( 'Secret', 'woocommerce' ), + 'description' => __( 'The a Secret Key is used to generate a hash of the delivered webhook and provided in the request headers. This will default to the current API user\'s consumer secret if not provided.', 'woocommerce' ), + 'desc_tip' => true, + 'value' => $webhook->get_secret() + ) ); + ?> +
    + + + +
    +
    + update( $wpdb->posts, array( 'post_title' => $name ), array( 'ID' => $post_id ) ); + + $status = ! empty( $_POST['status'] ) ? wc_clean( $_POST['status'] ) : ''; + $delivery_url = ! empty( $_POST['delivery_url'] ) ? $_POST['delivery_url'] : ''; + $secret = ! empty( $_POST['secret'] ) ? $_POST['secret'] : get_user_meta( get_current_user_id(), 'woocommerce_api_consumer_secret', true ); + + if ( ! empty( $_POST['topic'] ) ) { + list( $resource, $event ) = explode( '.', wc_clean( $_POST['topic'] ) ); + + if ( 'action' === $resource ) { + $event = ! empty( $_POST['action_event'] ) ? wc_clean( $_POST['action_event'] ) : ''; + } else if ( ! in_array( $resource, array( 'coupon', 'customer', 'order', 'product' ) ) && ! empty( $_POST['custom_topic'] ) ) { + list( $resource, $event ) = explode( '.', wc_clean( $_POST['custom_topic'] ) ); + } + + $topic = $resource . '.' . $event; + } + + // Update/Set + $webhook->update_status( $status ); + $webhook->set_delivery_url( $delivery_url ); + $webhook->set_secret( $secret ); + $webhook->set_topic( $topic ); + + do_action( 'woocommerce_webhook_options_save', $post_id ); + } +} From 10b2b6bccc2ab01a9501f33d6afcab3441b5a3ea Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 16 Dec 2014 19:05:53 -0200 Subject: [PATCH 442/743] Removed support for title in webhooks --- includes/admin/class-wc-admin-post-types.php | 3 --- includes/class-wc-post-types.php | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 9c25f923a08..9c389249302 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -2045,9 +2045,6 @@ class WC_Admin_Post_Types { case 'shop_coupon' : $text = __( 'Coupon code', 'woocommerce' ); break; - case 'shop_webhook' : - $text = __( 'Webhook name', 'woocommerce' ); - break; } return $text; diff --git a/includes/class-wc-post-types.php b/includes/class-wc-post-types.php index 69aad8e340f..d13d8e07513 100644 --- a/includes/class-wc-post-types.php +++ b/includes/class-wc-post-types.php @@ -392,9 +392,9 @@ class WC_Post_types { 'hierarchical' => false, 'rewrite' => false, 'query_var' => false, - 'supports' => array( 'title' ), + 'supports' => false, 'show_in_nav_menus' => false, - 'show_in_admin_bar' => false, + 'show_in_admin_bar' => false ) ) ); From 802ebdee38863ea9d8275c68ba0257552ca696c9 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 16 Dec 2014 19:06:47 -0200 Subject: [PATCH 443/743] Added URL data_type for woocommerce_wp_text_input() --- includes/admin/wc-meta-box-functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/admin/wc-meta-box-functions.php b/includes/admin/wc-meta-box-functions.php index 8b85a75dcfd..75fbe521cbf 100644 --- a/includes/admin/wc-meta-box-functions.php +++ b/includes/admin/wc-meta-box-functions.php @@ -42,6 +42,10 @@ function woocommerce_wp_text_input( $field ) { $field['class'] .= ' wc_input_stock'; $field['value'] = wc_stock_amount( $field['value'] ); break; + case 'url' : + $field['class'] .= ' wc_input_url'; + $field['value'] = esc_url( $field['value'] ); + break; default : break; From 1fae690e68f040c361d08471d95c05ab025a6377 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 16 Dec 2014 19:07:28 -0200 Subject: [PATCH 444/743] Added methods to save and display the webhook data meta box --- includes/admin/class-wc-admin-meta-boxes.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/includes/admin/class-wc-admin-meta-boxes.php b/includes/admin/class-wc-admin-meta-boxes.php index faa318b21e7..966d533c710 100644 --- a/includes/admin/class-wc-admin-meta-boxes.php +++ b/includes/admin/class-wc-admin-meta-boxes.php @@ -53,7 +53,10 @@ class WC_Admin_Meta_Boxes { add_action( 'woocommerce_process_shop_coupon_meta', 'WC_Meta_Box_Coupon_Data::save', 10, 2 ); // Save Rating Meta Boxes - add_action( 'comment_edit_redirect', 'WC_Meta_Box_Order_Reviews::save', 1, 2 ); + add_action( 'comment_edit_redirect', 'WC_Meta_Box_Order_Reviews::save', 1, 2 ); + + // Save Webhook Meta Boxes + add_action( 'woocommerce_process_shop_webhook_meta', 'WC_Meta_Box_Webhook_Data::save', 10 ); // Error handling (for showing errors from meta boxes on next page load) add_action( 'admin_notices', array( $this, 'output_errors' ) ); @@ -124,6 +127,9 @@ class WC_Admin_Meta_Boxes { add_meta_box( 'woocommerce-rating', __( 'Rating', 'woocommerce' ), 'WC_Meta_Box_Order_Reviews::output', 'comment', 'normal', 'high' ); } } + + // Webhook + add_meta_box( 'woocommerce-webhook-data', __( 'Webhook Data', 'woocommerce' ), 'WC_Meta_Box_Webhook_Data::output', 'shop_webhook', 'normal', 'high' ); } /** @@ -138,6 +144,9 @@ class WC_Admin_Meta_Boxes { remove_meta_box( 'woothemes-settings', 'shop_coupon' , 'normal' ); remove_meta_box( 'commentstatusdiv', 'shop_coupon' , 'normal' ); remove_meta_box( 'slugdiv', 'shop_coupon' , 'normal' ); + remove_meta_box( 'submitdiv', 'shop_webhook' , 'side' ); + remove_meta_box( 'slugdiv', 'shop_webhook' , 'normal' ); + remove_meta_box( 'commentstatusdiv', 'shop_webhook' , 'normal' ); foreach ( wc_get_order_types( 'order-meta-boxes' ) as $type ) { remove_meta_box( 'commentsdiv', $type, 'normal' ); @@ -196,7 +205,7 @@ class WC_Admin_Meta_Boxes { // Check the post type if ( in_array( $post->post_type, wc_get_order_types( 'order-meta-boxes' ) ) ) { do_action( 'woocommerce_process_shop_order_meta', $post_id, $post ); - } elseif ( in_array( $post->post_type, array( 'product', 'shop_coupon' ) ) ) { + } elseif ( in_array( $post->post_type, array( 'product', 'shop_coupon', 'shop_webhook' ) ) ) { do_action( 'woocommerce_process_' . $post->post_type . '_meta', $post_id, $post ); } } From 9f83541d9f660ba4f31f21c491458abbfc134c8d Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 16 Dec 2014 19:07:48 -0200 Subject: [PATCH 445/743] Added webhook meta box js --- assets/js/admin/meta-boxes-webhook.js | 16 ++++++++++++++++ assets/js/admin/meta-boxes-webhook.min.js | 1 + includes/admin/class-wc-admin-assets.php | 23 +++++++++++++---------- includes/admin/wc-admin-functions.php | 2 ++ 4 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 assets/js/admin/meta-boxes-webhook.js create mode 100644 assets/js/admin/meta-boxes-webhook.min.js diff --git a/assets/js/admin/meta-boxes-webhook.js b/assets/js/admin/meta-boxes-webhook.js new file mode 100644 index 00000000000..bd2748ebe18 --- /dev/null +++ b/assets/js/admin/meta-boxes-webhook.js @@ -0,0 +1,16 @@ +jQuery( function ( $ ) { + $( '#webhook-options #topic' ).on( 'change', function() { + var current = $( this ).val(), + action_event_field = $( '#webhook-options .action_event_field' ), + custom_topic_field = $( '#webhook-options .custom_topic_field' ); + + action_event_field.hide(); + custom_topic_field.hide(); + + if ( 'action' === current ) { + action_event_field.show(); + } else if ( 'custom' === current ) { + custom_topic_field.show(); + } + }).change(); +}); diff --git a/assets/js/admin/meta-boxes-webhook.min.js b/assets/js/admin/meta-boxes-webhook.min.js new file mode 100644 index 00000000000..a09261dd0fc --- /dev/null +++ b/assets/js/admin/meta-boxes-webhook.min.js @@ -0,0 +1 @@ +jQuery(function(a){a("#webhook-options #topic").on("change",function(){var b=a(this).val(),c=a("#webhook-options .action_event_field"),d=a("#webhook-options .custom_topic_field");c.hide(),d.hide(),"action"===b?c.show():"custom"===b&&d.show()}).change()}); \ No newline at end of file diff --git a/includes/admin/class-wc-admin-assets.php b/includes/admin/class-wc-admin-assets.php index ac4fab1de1a..a4463ccd717 100644 --- a/includes/admin/class-wc-admin-assets.php +++ b/includes/admin/class-wc-admin-assets.php @@ -196,6 +196,9 @@ class WC_Admin_Assets { if ( in_array( $screen->id, array( 'shop_coupon', 'edit-shop_coupon' ) ) ) { wp_enqueue_script( 'wc-admin-coupon-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-coupon' . $suffix . '.js', array( 'wc-admin-meta-boxes' ), WC_VERSION ); } + if ( 'shop_webhook' == $screen->id ) { + wp_enqueue_script( 'wc-admin-webhook-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes-webhook' . $suffix . '.js', array( 'jquery' ), WC_VERSION, true ); + } if ( in_array( str_replace( 'edit-', '', $screen->id ), array_merge( array( 'shop_coupon', 'product' ), wc_get_order_types( 'order-meta-boxes' ) ) ) ) { $params = array( 'remove_item_notice' => __( 'Are you sure you want to remove the selected items? If you have previously reduced this item\'s stock, or this order was submitted by a customer, you will need to manually restore the item\'s stock.', 'woocommerce' ), @@ -224,16 +227,16 @@ class WC_Admin_Assets { 'no_customer_selected' => __( 'No customer selected', 'woocommerce' ), 'plugin_url' => WC()->plugin_url(), 'ajax_url' => admin_url( 'admin-ajax.php' ), - 'order_item_nonce' => wp_create_nonce("order-item"), - 'add_attribute_nonce' => wp_create_nonce("add-attribute"), - 'save_attributes_nonce' => wp_create_nonce("save-attributes"), - 'calc_totals_nonce' => wp_create_nonce("calc-totals"), - 'get_customer_details_nonce' => wp_create_nonce("get-customer-details"), - 'search_products_nonce' => wp_create_nonce("search-products"), - 'grant_access_nonce' => wp_create_nonce("grant-access"), - 'revoke_access_nonce' => wp_create_nonce("revoke-access"), - 'add_order_note_nonce' => wp_create_nonce("add-order-note"), - 'delete_order_note_nonce' => wp_create_nonce("delete-order-note"), + 'order_item_nonce' => wp_create_nonce( 'order-item' ), + 'add_attribute_nonce' => wp_create_nonce( 'add-attribute' ), + 'save_attributes_nonce' => wp_create_nonce( 'save-attributes' ), + 'calc_totals_nonce' => wp_create_nonce( 'calc-totals' ), + 'get_customer_details_nonce' => wp_create_nonce( 'get-customer-details' ), + 'search_products_nonce' => wp_create_nonce( 'search-products' ), + 'grant_access_nonce' => wp_create_nonce( 'grant-access' ), + 'revoke_access_nonce' => wp_create_nonce( 'revoke-access' ), + 'add_order_note_nonce' => wp_create_nonce( 'add-order-note' ), + 'delete_order_note_nonce' => wp_create_nonce( 'delete-order-note' ), 'calendar_image' => WC()->plugin_url().'/assets/images/calendar.png', 'post_id' => isset( $post->ID ) ? $post->ID : '', 'base_country' => WC()->countries->get_base_country(), diff --git a/includes/admin/wc-admin-functions.php b/includes/admin/wc-admin-functions.php index cd9568d2331..fbcee3ec605 100644 --- a/includes/admin/wc-admin-functions.php +++ b/includes/admin/wc-admin-functions.php @@ -35,6 +35,8 @@ function wc_get_screen_ids() { 'edit-product_tag', 'edit-product_shipping_class', 'profile', + 'shop_webhook', + 'edit-shop_webhook' ); foreach ( wc_get_order_types() as $type ) { From 4c47def6389c794d13a041693b1b77b8a0f97195 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 16 Dec 2014 20:16:38 -0200 Subject: [PATCH 446/743] Stop hook webhooks when is not configured the hooks and delivery URL --- includes/class-wc-webhook.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/class-wc-webhook.php b/includes/class-wc-webhook.php index 250c77b4fbf..29978ee887d 100644 --- a/includes/class-wc-webhook.php +++ b/includes/class-wc-webhook.php @@ -83,9 +83,10 @@ class WC_Webhook { * @since 2.2 */ public function enqueue() { - - foreach ( $this->get_hooks() as $hook ) { - add_action( $hook, array( $this, 'process' ) ); + if ( is_array( $this->get_hooks() ) && ! empty( $this->get_delivery_url() ) ) { + foreach ( $this->get_hooks() as $hook ) { + add_action( $hook, array( $this, 'process' ) ); + } } } From 509147b1052e4079af6d92ac093232358c988055 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 16 Dec 2014 20:18:06 -0200 Subject: [PATCH 447/743] Created webhook actions meta box --- includes/admin/class-wc-admin-meta-boxes.php | 1 + .../class-wc-meta-box-webhook-actions.php | 75 +++++++++++++++++++ .../class-wc-meta-box-webhook-data.php | 26 ++++--- 3 files changed, 90 insertions(+), 12 deletions(-) create mode 100644 includes/admin/meta-boxes/class-wc-meta-box-webhook-actions.php diff --git a/includes/admin/class-wc-admin-meta-boxes.php b/includes/admin/class-wc-admin-meta-boxes.php index 966d533c710..c0a449590d1 100644 --- a/includes/admin/class-wc-admin-meta-boxes.php +++ b/includes/admin/class-wc-admin-meta-boxes.php @@ -130,6 +130,7 @@ class WC_Admin_Meta_Boxes { // Webhook add_meta_box( 'woocommerce-webhook-data', __( 'Webhook Data', 'woocommerce' ), 'WC_Meta_Box_Webhook_Data::output', 'shop_webhook', 'normal', 'high' ); + add_meta_box( 'woocommerce-webhook-actions', __( 'Webhook Actions', 'woocommerce' ), 'WC_Meta_Box_Webhook_Actions::output', 'shop_webhook', 'side', 'high' ); } /** diff --git a/includes/admin/meta-boxes/class-wc-meta-box-webhook-actions.php b/includes/admin/meta-boxes/class-wc-meta-box-webhook-actions.php new file mode 100644 index 00000000000..0654b54425f --- /dev/null +++ b/includes/admin/meta-boxes/class-wc-meta-box-webhook-actions.php @@ -0,0 +1,75 @@ + + + + post_modified_gmt ) : ?> +
      + post_date_gmt ) : ?> +
    • + : post_modified_gmt ); ?> +
    • + +
    • + : post_date_gmt ); ?> +
    • +
    • + : post_modified_gmt ); ?> +
    • + +
    + + +
    +
    + ID ) ) : ?> +
    +
    + + +
    + + +
    +
    +
    +
    +
    'name', 'label' => __( 'Name', 'woocommerce' ), 'description' => sprintf( __( 'Friendly name for identifying this webhook, defaults to Webhook created on %s.', 'woocommerce' ), strftime( _x( '%b %d, %Y @ %I:%M %p', 'Webhook created on date parsed by strftime', 'woocommerce' ) ) ), 'desc_tip' => true, - 'value' => $webhook->get_name() + 'value' => ( 'auto-draft' == $post->post_status ) ? '' : $webhook->get_name() ) ); ?>
    @@ -167,10 +166,19 @@ class WC_Meta_Box_Webhook_Data { $name = ! empty( $_POST['name'] ) ? $_POST['name'] : sprintf( __( 'Webhook created on %s', 'woocommerce' ), strftime( _x( '%b %d, %Y @ %I:%M %p', 'Webhook created on date parsed by strftime', 'woocommerce' ) ) ); $wpdb->update( $wpdb->posts, array( 'post_title' => $name ), array( 'ID' => $post_id ) ); - $status = ! empty( $_POST['status'] ) ? wc_clean( $_POST['status'] ) : ''; - $delivery_url = ! empty( $_POST['delivery_url'] ) ? $_POST['delivery_url'] : ''; - $secret = ! empty( $_POST['secret'] ) ? $_POST['secret'] : get_user_meta( get_current_user_id(), 'woocommerce_api_consumer_secret', true ); + // Status + $status = ! empty( $_POST['status'] ) ? wc_clean( $_POST['status'] ) : ''; + $webhook->update_status( $status ); + // Delivery URL + $delivery_url = ! empty( $_POST['delivery_url'] ) ? $_POST['delivery_url'] : ''; + $webhook->set_delivery_url( $delivery_url ); + + // Secret + $secret = ! empty( $_POST['secret'] ) ? $_POST['secret'] : get_user_meta( get_current_user_id(), 'woocommerce_api_consumer_secret', true ); + $webhook->set_secret( $secret ); + + // Topic if ( ! empty( $_POST['topic'] ) ) { list( $resource, $event ) = explode( '.', wc_clean( $_POST['topic'] ) ); @@ -180,15 +188,9 @@ class WC_Meta_Box_Webhook_Data { list( $resource, $event ) = explode( '.', wc_clean( $_POST['custom_topic'] ) ); } - $topic = $resource . '.' . $event; + $webhook->set_topic( $resource . '.' . $event ); } - // Update/Set - $webhook->update_status( $status ); - $webhook->set_delivery_url( $delivery_url ); - $webhook->set_secret( $secret ); - $webhook->set_topic( $topic ); - do_action( 'woocommerce_webhook_options_save', $post_id ); } } From e0ad955afe03fa660f1486b5752a9a97c457acf8 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 17 Dec 2014 01:44:35 -0200 Subject: [PATCH 448/743] Fixed WC_Webhook::enqueue() --- includes/class-wc-webhook.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/class-wc-webhook.php b/includes/class-wc-webhook.php index 29978ee887d..24eb5792101 100644 --- a/includes/class-wc-webhook.php +++ b/includes/class-wc-webhook.php @@ -83,8 +83,10 @@ class WC_Webhook { * @since 2.2 */ public function enqueue() { - if ( is_array( $this->get_hooks() ) && ! empty( $this->get_delivery_url() ) ) { - foreach ( $this->get_hooks() as $hook ) { + $hooks = $this->get_hooks(); + + if ( is_array( $hooks ) && ! empty( $this->get_delivery_url() ) ) { + foreach ( $hooks as $hook ) { add_action( $hook, array( $this, 'process' ) ); } } From b8e842d2eec51fb9ac58607193d9f2b61921076c Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 17 Dec 2014 01:48:29 -0200 Subject: [PATCH 449/743] Fixed WC_Webhook::enqueue() [2] --- includes/class-wc-webhook.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/class-wc-webhook.php b/includes/class-wc-webhook.php index 24eb5792101..ad896e5e3dc 100644 --- a/includes/class-wc-webhook.php +++ b/includes/class-wc-webhook.php @@ -84,8 +84,9 @@ class WC_Webhook { */ public function enqueue() { $hooks = $this->get_hooks(); + $url = $this->get_delivery_url(); - if ( is_array( $hooks ) && ! empty( $this->get_delivery_url() ) ) { + if ( is_array( $hooks ) && ! empty( $url ) ) { foreach ( $hooks as $hook ) { add_action( $hook, array( $this, 'process' ) ); } From 429c91708b466192899f5aa342c77909a27a7e48 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 17 Dec 2014 09:29:43 -0200 Subject: [PATCH 450/743] Improved the WC_Meta_Box_Webhook_Data:save() method --- .../admin/meta-boxes/class-wc-meta-box-webhook-data.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php b/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php index bbb721e4ad4..3fad95fbbf4 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php @@ -167,12 +167,10 @@ class WC_Meta_Box_Webhook_Data { $wpdb->update( $wpdb->posts, array( 'post_title' => $name ), array( 'ID' => $post_id ) ); // Status - $status = ! empty( $_POST['status'] ) ? wc_clean( $_POST['status'] ) : ''; - $webhook->update_status( $status ); + $webhook->update_status( $_POST['status'] ); // Delivery URL - $delivery_url = ! empty( $_POST['delivery_url'] ) ? $_POST['delivery_url'] : ''; - $webhook->set_delivery_url( $delivery_url ); + $webhook->set_delivery_url( $_POST['delivery_url'] ); // Secret $secret = ! empty( $_POST['secret'] ) ? $_POST['secret'] : get_user_meta( get_current_user_id(), 'woocommerce_api_consumer_secret', true ); From d1bed7bef9ee1c2922a098f6c2d8115c9f92fcd1 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 17 Dec 2014 09:45:59 -0200 Subject: [PATCH 451/743] Changed the shop_webhook postupdated messages --- includes/admin/class-wc-admin-post-types.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 9c389249302..95ee85b0bac 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -1872,6 +1872,20 @@ class WC_Admin_Post_Types { 10 => __( 'Coupon draft updated.', 'woocommerce' ) ); + $messages['shop_webhook'] = array( + 0 => '', // Unused. Messages start at index 1. + 1 => __( 'Webhook saved.', 'woocommerce' ), + 2 => __( 'Custom field updated.', 'woocommerce' ), + 3 => __( 'Custom field deleted.', 'woocommerce' ), + 4 => __( 'Webhook saved.', 'woocommerce' ), + 5 => '', + 6 => __( 'Webhook saved.', 'woocommerce' ), + 7 => __( 'Webhook saved.', 'woocommerce' ), + 8 => __( 'Webhook saved.', 'woocommerce' ), + 9 => '', + 10 => __( 'Webhook saved.', 'woocommerce' ) + ); + return $messages; } From 5b318b1d2ad9868454593c5c4b41c7c2f0f1fe7a Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 17 Dec 2014 10:16:14 -0200 Subject: [PATCH 452/743] Added the wc_is_webhook_valid_topic() and wc_is_valid_url() conditional functions --- includes/admin/class-wc-admin-post-types.php | 2 +- .../class-wc-meta-box-webhook-actions.php | 56 ++++++++-------- includes/api/class-wc-api-webhooks.php | 65 ++----------------- includes/wc-conditional-functions.php | 55 ++++++++++++++++ 4 files changed, 88 insertions(+), 90 deletions(-) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 95ee85b0bac..72e8cdd1590 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -1892,7 +1892,7 @@ class WC_Admin_Post_Types { /** * Disable the auto-save functionality for Orders. */ - public function disable_autosave(){ + public function disable_autosave() { global $post; if ( $post && in_array( get_post_type( $post->ID ), wc_get_order_types( 'order-meta-boxes' ) ) ) { diff --git a/includes/admin/meta-boxes/class-wc-meta-box-webhook-actions.php b/includes/admin/meta-boxes/class-wc-meta-box-webhook-actions.php index 0654b54425f..79035a31b66 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-webhook-actions.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-webhook-actions.php @@ -39,37 +39,37 @@ class WC_Meta_Box_Webhook_Actions { #poststuff #woocommerce-webhook-actions .inside { padding: 0; margin: 0; } - post_modified_gmt ) : ?> -
      - post_date_gmt ) : ?> -
    • - : post_modified_gmt ); ?> -
    • - -
    • - : post_date_gmt ); ?> -
    • -
    • - : post_modified_gmt ); ?> -
    • - -
    - + post_modified_gmt ) : ?> +
      + post_date_gmt ) : ?> +
    • + : post_modified_gmt ); ?> +
    • + +
    • + : post_date_gmt ); ?> +
    • +
    • + : post_modified_gmt ); ?> +
    • + +
    + -
    -
    - ID ) ) : ?> -
    -
    - +
    +
    + ID ) ) : ?> +
    +
    + -
    - - -
    -
    +
    + +
    +
    - + is_valid_topic( strtolower( $data['topic'] ) ) ) { + if ( empty( $data['topic'] ) || ! wc_is_webhook_valid_topic( strtolower( $data['topic'] ) ) ) { throw new WC_API_Exception( 'woocommerce_api_invalid_webhook_topic', __( 'Webhook topic is required and must be valid', 'woocommerce' ), 400 ); } // validate delivery URL - if ( empty( $data['delivery_url'] ) || ! $this->is_valid_url( $data['delivery_url'] ) ) { + if ( empty( $data['delivery_url'] ) || ! wc_is_valid_url( $data['delivery_url'] ) ) { throw new WC_API_Exception( 'woocommerce_api_invalid_webhook_delivery_url', __( 'Webhook delivery URL must be a valid URL starting with http:// or https://', 'woocommerce' ), 400 ); } @@ -249,7 +249,7 @@ class WC_API_Webhooks extends WC_API_Resource { // update topic if ( ! empty( $data['topic'] ) ) { - if ( $this->is_valid_topic( strtolower( $data['topic'] ) ) ) { + if ( wc_is_webhook_valid_topic( strtolower( $data['topic'] ) ) ) { $webhook->set_topic( $data['topic'] ); @@ -260,7 +260,7 @@ class WC_API_Webhooks extends WC_API_Resource { // update delivery URL if ( ! empty( $data['delivery_url'] ) ) { - if ( $this->is_valid_url( $data['delivery_url'] ) ) { + if ( wc_is_valid_url( $data['delivery_url'] ) ) { $webhook->set_delivery_url( $data['delivery_url'] ); @@ -303,63 +303,6 @@ class WC_API_Webhooks extends WC_API_Resource { } } - - /** - * Check if the given topic is a valid webhook topic, a topic is valid if: - * - * + starts with `action.woocommerce_` or `action.wc_` - * + it has a valid resource & event - * - * @since 2.2 - * @param string $topic webhook topic - * @return bool true if valid, false otherwise - */ - private function is_valid_topic( $topic ) { - - // custom topics are prefixed with woocommerce_ or wc_ are valid - if ( 0 === strpos( $topic, 'action.woocommerce_' ) || 0 === strpos( $topic, 'action.wc_' ) ) { - return true; - } - - @list( $resource, $event ) = explode( '.', $topic ); - - if ( ! isset( $resource ) || ! isset( $event ) ) { - return false; - } - - $valid_resources = apply_filters( 'woocommerce_valid_webhook_resources', array( 'coupon', 'customer', 'order', 'product' ) ); - $valid_events = apply_filters( 'woocommerce_valid_webhook_events', array( 'created', 'updated', 'deleted' ) ); - - if ( in_array( $resource, $valid_resources ) && in_array( $event, $valid_events ) ) { - return true; - } - - return false; - } - - /** - * Simple check for validating a URL, it must start with http:// or https:// - * and pass FILTER_VALIDATE_URL validation - * - * @since 2.2 - * @param string $url delivery URL for the webhook - * @return bool true if valid, false otherwise - */ - private function is_valid_url( $url ) { - - // must start with http:// or https:// - if ( 0 !== strpos( $url, 'http://' ) && 0 !== strpos( $url, 'https://' ) ) { - return false; - } - - // must pass validation - if ( ! filter_var( $url, FILTER_VALIDATE_URL ) ) { - return false; - } - - return true; - } - /** * Delete a webhook * diff --git a/includes/wc-conditional-functions.php b/includes/wc-conditional-functions.php index 5334013aaa1..a540c71783e 100644 --- a/includes/wc-conditional-functions.php +++ b/includes/wc-conditional-functions.php @@ -326,3 +326,58 @@ if ( ! function_exists( 'wc_prices_include_tax' ) ) { return get_option( 'woocommerce_prices_include_tax' ) === 'yes'; } } + +/** + * Check if the given topic is a valid webhook topic, a topic is valid if: + * + * + starts with `action.woocommerce_` or `action.wc_` + * + it has a valid resource & event + * + * @param string $topic webhook topic + * @return bool true if valid, false otherwise + */ +function wc_is_webhook_valid_topic( $topic ) { + + // custom topics are prefixed with woocommerce_ or wc_ are valid + if ( 0 === strpos( $topic, 'action.woocommerce_' ) || 0 === strpos( $topic, 'action.wc_' ) ) { + return true; + } + + @list( $resource, $event ) = explode( '.', $topic ); + + if ( ! isset( $resource ) || ! isset( $event ) ) { + return false; + } + + $valid_resources = apply_filters( 'woocommerce_valid_webhook_resources', array( 'coupon', 'customer', 'order', 'product' ) ); + $valid_events = apply_filters( 'woocommerce_valid_webhook_events', array( 'created', 'updated', 'deleted' ) ); + + if ( in_array( $resource, $valid_resources ) && in_array( $event, $valid_events ) ) { + return true; + } + + return false; +} + + +/** + * Simple check for validating a URL, it must start with http:// or https:// + * and pass FILTER_VALIDATE_URL validation + * + * @param string $url + * @return bool + */ +function wc_is_valid_url( $url ) { + + // must start with http:// or https:// + if ( 0 !== strpos( $url, 'http://' ) && 0 !== strpos( $url, 'https://' ) ) { + return false; + } + + // must pass validation + if ( ! filter_var( $url, FILTER_VALIDATE_URL ) ) { + return false; + } + + return true; +} From 6ccf39116815627cbc7ef37c437fbb420d92f594 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 17 Dec 2014 10:42:39 -0200 Subject: [PATCH 453/743] Improved the webhook data class and send a webhook ping when create a new --- .../class-wc-meta-box-webhook-data.php | 105 ++++++++++++++++-- 1 file changed, 93 insertions(+), 12 deletions(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php b/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php index 3fad95fbbf4..4c5eb418002 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php @@ -155,28 +155,56 @@ class WC_Meta_Box_Webhook_Data { } /** - * Save meta box data + * Updated the Webhook name + * + * @param int $post_id */ - public static function save( $post_id ) { + private static function update_name( $post_id ) { global $wpdb; - $webhook = new WC_Webhook( $post_id ); - - // Name $name = ! empty( $_POST['name'] ) ? $_POST['name'] : sprintf( __( 'Webhook created on %s', 'woocommerce' ), strftime( _x( '%b %d, %Y @ %I:%M %p', 'Webhook created on date parsed by strftime', 'woocommerce' ) ) ); $wpdb->update( $wpdb->posts, array( 'post_title' => $name ), array( 'ID' => $post_id ) ); + } - // Status - $webhook->update_status( $_POST['status'] ); + /** + * Updated the Webhook status + * + * @param WC_Webhook $webhook + */ + private static function update_status( $webhook ) { + $status = ! empty( $_POST['status'] ) ? wc_clean( $_POST['status'] ) : ''; - // Delivery URL - $webhook->set_delivery_url( $_POST['delivery_url'] ); + $webhook->update_status( $status ); + } - // Secret + /** + * Updated the Webhook delivery URL + * + * @param WC_Webhook $webhook + */ + private static function update_delivery_url( $webhook ) { + $delivery_url = ! empty( $_POST['delivery_url'] ) ? $_POST['delivery_url'] : ''; + + $webhook->set_delivery_url( $delivery_url ); + } + + /** + * Updated the Webhook secret + * + * @param WC_Webhook $webhook + */ + private static function update_secret( $webhook ) { $secret = ! empty( $_POST['secret'] ) ? $_POST['secret'] : get_user_meta( get_current_user_id(), 'woocommerce_api_consumer_secret', true ); - $webhook->set_secret( $secret ); - // Topic + $webhook->set_secret( $secret ); + } + + /** + * Updated the Webhook topic + * + * @param WC_Webhook $webhook + */ + private static function update_topic( $webhook ) { if ( ! empty( $_POST['topic'] ) ) { list( $resource, $event ) = explode( '.', wc_clean( $_POST['topic'] ) ); @@ -188,6 +216,59 @@ class WC_Meta_Box_Webhook_Data { $webhook->set_topic( $resource . '.' . $event ); } + } + + /** + * Set Webhook post data. + * + * @param int $post_id + */ + private static function set_post_data( $post_id ) { + global $wpdb; + + $password = uniqid( 'webhook_' ); + $password = strlen( $password ) > 20 ? substr( $password, 0, 20 ) : $password; + + $wpdb->update( + $wpdb->posts, + array( + 'post_password' => $password, + 'ping_status' => 'closed', + 'comment_status' => 'open' + ), + array( 'ID' => $post_id ) + ); + } + + /** + * Save meta box data + */ + public static function save( $post_id ) { + $webhook = new WC_Webhook( $post_id ); + + // Name + self::update_name( $post_id ); + + // Status + self::update_status( $webhook ); + + // Delivery URL + self::update_delivery_url( $webhook ); + + // Secret + self::update_secret( $webhook ); + + // Topic + self::update_topic( $webhook ); + + // Webhook Created + if ( isset( $_POST['original_post_status'] ) && 'auto-draft' === $_POST['original_post_status'] ) { + // Set Post data like ping status and password + self::set_post_data( $post_id ); + + // Ping webhook + $webhook->deliver_ping(); + } do_action( 'woocommerce_webhook_options_save', $post_id ); } From 9b9243fb92de53261ed7f6df639e65d5bc0c9b86 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 17 Dec 2014 10:45:20 -0200 Subject: [PATCH 454/743] Validated webhook delivery_url and topic --- .../meta-boxes/class-wc-meta-box-webhook-data.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php b/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php index 4c5eb418002..1de4623267e 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php @@ -185,7 +185,9 @@ class WC_Meta_Box_Webhook_Data { private static function update_delivery_url( $webhook ) { $delivery_url = ! empty( $_POST['delivery_url'] ) ? $_POST['delivery_url'] : ''; - $webhook->set_delivery_url( $delivery_url ); + if ( wc_is_valid_url( $delivery_url ) ) { + $webhook->set_delivery_url( $delivery_url ); + } } /** @@ -214,7 +216,11 @@ class WC_Meta_Box_Webhook_Data { list( $resource, $event ) = explode( '.', wc_clean( $_POST['custom_topic'] ) ); } - $webhook->set_topic( $resource . '.' . $event ); + $topic = $resource . '.' . $event; + + if ( wc_is_webhook_valid_topic( $topic ) ) { + $webhook->set_topic( $topic ); + } } } From 67f90fbb87eee8825f47e134081c90bc5f95307d Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 17 Dec 2014 15:50:19 -0200 Subject: [PATCH 455/743] Created webhook logs meta box --- includes/admin/class-wc-admin-meta-boxes.php | 1 + .../class-wc-meta-box-webhook-logs.php | 99 +++++++++++++++++++ .../meta-boxes/views/html-webhook-log.php | 37 +++++++ .../meta-boxes/views/html-webhook-logs.php | 39 ++++++++ 4 files changed, 176 insertions(+) create mode 100644 includes/admin/meta-boxes/class-wc-meta-box-webhook-logs.php create mode 100644 includes/admin/meta-boxes/views/html-webhook-log.php create mode 100644 includes/admin/meta-boxes/views/html-webhook-logs.php diff --git a/includes/admin/class-wc-admin-meta-boxes.php b/includes/admin/class-wc-admin-meta-boxes.php index c0a449590d1..01cd6e77b5a 100644 --- a/includes/admin/class-wc-admin-meta-boxes.php +++ b/includes/admin/class-wc-admin-meta-boxes.php @@ -131,6 +131,7 @@ class WC_Admin_Meta_Boxes { // Webhook add_meta_box( 'woocommerce-webhook-data', __( 'Webhook Data', 'woocommerce' ), 'WC_Meta_Box_Webhook_Data::output', 'shop_webhook', 'normal', 'high' ); add_meta_box( 'woocommerce-webhook-actions', __( 'Webhook Actions', 'woocommerce' ), 'WC_Meta_Box_Webhook_Actions::output', 'shop_webhook', 'side', 'high' ); + add_meta_box( 'woocommerce-webhook-logs', __( 'Webhook Logs', 'woocommerce' ), 'WC_Meta_Box_Webhook_Logs::output', 'shop_webhook', 'normal', 'low' ); } /** diff --git a/includes/admin/meta-boxes/class-wc-meta-box-webhook-logs.php b/includes/admin/meta-boxes/class-wc-meta-box-webhook-logs.php new file mode 100644 index 00000000000..e9fbb7c5fc4 --- /dev/null +++ b/includes/admin/meta-boxes/class-wc-meta-box-webhook-logs.php @@ -0,0 +1,99 @@ +ID ); + + $count_comments = wp_count_comments( $webhook->id ); + $total = $count_comments->approved; + $current = isset( $_GET['log_page'] ) ? absint( $_GET['log_page'] ) : 1; + $args = array( + 'post_id' => $webhook->id, + 'status' => 'approve', + 'type' => 'webhook_delivery', + 'number' => self::$quantity + ); + + if ( 1 < $current ) { + $args['offset'] = ( $current - 1 ) * self::$quantity; + } + + remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_webhook_comments' ), 10, 1 ); + + $logs = get_comments( $args ); + + add_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_webhook_comments' ), 10, 1 ); + + if ( $logs ) { + include_once( 'views/html-webhook-logs.php' ); + } else { + echo '

    ' . __( 'This Webhook has no log yet.', 'woocommerce' ) . '

    '; + } + } + + /** + * Get the logs navigation. + * + * @param int $total + * + * @return string + */ + public static function get_navigation( $total ) { + global $post; + + $pages = ceil( $total / self::$quantity ); + $current = isset( $_GET['log_page'] ) ? absint( $_GET['log_page'] ) : 1; + + $html = '
    '; + + $html .= '

    '; + $html .= sprintf( '%s – Page %d of %d', _n( '1 item', sprintf( '%d items', $total ), $total, 'woocommerce' ), $current, $pages ); + $html .= '

    '; + + if ( 1 < $pages ) { + $html .= '

    '; + if ( 1 == $current ) { + $html .= ' '; + } else { + $html .= '' . __( '‹ Previous', 'woocommerce' ) . ' '; + } + + if ( $pages == $current ) { + $html .= ''; + } else { + $html .= '' . __( 'Next ›', 'woocommerce' ) . ''; + } + $html .= '

    '; + } + + $html .= '
    '; + + return $html; + } +} diff --git a/includes/admin/meta-boxes/views/html-webhook-log.php b/includes/admin/meta-boxes/views/html-webhook-log.php new file mode 100644 index 00000000000..e183da11e68 --- /dev/null +++ b/includes/admin/meta-boxes/views/html-webhook-log.php @@ -0,0 +1,37 @@ + + + + comment_date_gmt ), true ); ?> + + +

    :

    +

    :

    +

    :

    +
      + $value ) : ?> +
    • :
    • + +
    +

    :

    +
    + + +

    :

    +

    :

    +
      + $value ) : ?> +
    • :
    • + +
    + +

    :

    +

    + + + diff --git a/includes/admin/meta-boxes/views/html-webhook-logs.php b/includes/admin/meta-boxes/views/html-webhook-logs.php new file mode 100644 index 00000000000..3504d64776b --- /dev/null +++ b/includes/admin/meta-boxes/views/html-webhook-logs.php @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + get_delivery_log( $log->comment_ID ); + + include( 'html-webhook-log.php' ); + } + ?> + +
    + + From 690b04b29aa974cde58fff2c679fb52a3a066e87 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 17 Dec 2014 16:20:37 -0200 Subject: [PATCH 456/743] Improved the webhook meta boxes --- .../class-wc-meta-box-webhook-data.php | 44 +++++++++++++------ .../class-wc-meta-box-webhook-logs.php | 6 +-- .../meta-boxes/views/html-webhook-logs.php | 3 ++ 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php b/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php index 1de4623267e..f254e37e3ee 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-webhook-data.php @@ -19,6 +19,33 @@ if ( ! defined( 'ABSPATH' ) ) { */ class WC_Meta_Box_Webhook_Data { + /** + * Get the webhook topic data + * + * @return array + */ + private static function get_topic_data( $webhook ) { + $topic = $webhook->get_topic(); + $event = ''; + $resource = ''; + + if ( $topic ) { + list( $resource, $event ) = explode( '.', $topic ); + + if ( 'action' === $resource ) { + $topic = 'action'; + } else if ( ! in_array( $resource, array( 'coupon', 'customer', 'order', 'product' ) ) ) { + $topic = 'custom'; + } + } + + return array( + 'topic' => $topic, + 'event' => $event, + 'resource' => $resource + ); + } + /** * Output the metabox */ @@ -62,18 +89,7 @@ class WC_Meta_Box_Webhook_Data {
    get_topic(); - $event = ''; - - if ( $topic ) { - list( $resource, $event ) = explode( '.', $topic ); - - if ( 'action' === $resource ) { - $topic = 'action'; - } else if ( ! in_array( $resource, array( 'coupon', 'customer', 'order', 'product' ) ) ) { - $topic = 'custom'; - } - } + $topic_data = self::get_topic_data( $webhook ); woocommerce_wp_select( array( 'id' => 'topic', @@ -97,7 +113,7 @@ class WC_Meta_Box_Webhook_Data { 'action' => __( 'Action', 'woocommerce' ), 'custom' => __( 'Custom', 'woocommerce' ) ), - 'value' => $topic + 'value' => $topic_data['topic'] ) ); // Action @@ -106,7 +122,7 @@ class WC_Meta_Box_Webhook_Data { 'label' => __( 'Action Event', 'woocommerce' ), 'description' => __( 'Enter the Action that will trigger this webhook.', 'woocommerce' ), 'desc_tip' => true, - 'value' => $event + 'value' => $topic_data['event'] ) ); // Custom Topic diff --git a/includes/admin/meta-boxes/class-wc-meta-box-webhook-logs.php b/includes/admin/meta-boxes/class-wc-meta-box-webhook-logs.php index e9fbb7c5fc4..27cc771d849 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-webhook-logs.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-webhook-logs.php @@ -30,10 +30,8 @@ class WC_Meta_Box_Webhook_Logs { public static function output( $post ) { $webhook = new WC_Webhook( $post->ID ); - $count_comments = wp_count_comments( $webhook->id ); - $total = $count_comments->approved; - $current = isset( $_GET['log_page'] ) ? absint( $_GET['log_page'] ) : 1; - $args = array( + $current = isset( $_GET['log_page'] ) ? absint( $_GET['log_page'] ) : 1; + $args = array( 'post_id' => $webhook->id, 'status' => 'approve', 'type' => 'webhook_delivery', diff --git a/includes/admin/meta-boxes/views/html-webhook-logs.php b/includes/admin/meta-boxes/views/html-webhook-logs.php index 3504d64776b..ff9a7580a77 100644 --- a/includes/admin/meta-boxes/views/html-webhook-logs.php +++ b/includes/admin/meta-boxes/views/html-webhook-logs.php @@ -4,6 +4,9 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } +$count_comments = wp_count_comments( $webhook->id ); +$total = $count_comments->approved; + ?> From c32b40ac1057403d5e461bac2d893db3cd5d0590 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 17 Dec 2014 16:33:51 -0200 Subject: [PATCH 457/743] Changed the position of the webhook menu --- includes/admin/class-wc-admin-menus.php | 12 +++++++++++- includes/class-wc-post-types.php | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/includes/admin/class-wc-admin-menus.php b/includes/admin/class-wc-admin-menus.php index 622cb3e90d5..f8b81083220 100644 --- a/includes/admin/class-wc-admin-menus.php +++ b/includes/admin/class-wc-admin-menus.php @@ -27,6 +27,7 @@ class WC_Admin_Menus { add_action( 'admin_menu', array( $this, 'admin_menu' ), 9 ); add_action( 'admin_menu', array( $this, 'reports_menu' ), 20 ); add_action( 'admin_menu', array( $this, 'settings_menu' ), 50 ); + add_action( 'admin_menu', array( $this, 'webhooks_menu' ), 55 ); add_action( 'admin_menu', array( $this, 'status_menu' ), 60 ); if ( apply_filters( 'woocommerce_show_addons_page', true ) ) { @@ -74,6 +75,15 @@ class WC_Admin_Menus { add_action( 'load-' . $settings_page, array( $this, 'settings_page_init' ) ); } + /** + * Add webhook item + */ + public function webhooks_menu() { + if ( apply_filters( 'woocommerce_show_webhooks_menu', 'yes' == get_option( 'woocommerce_api_enabled' ) ) ) { + add_submenu_page( 'woocommerce', __( 'Webhooks', 'woocommerce' ), __( 'Webhooks', 'woocommerce' ), 'manage_woocommerce', 'edit.php?post_type=shop_webhook' ); + } + } + /** * Loads gateways and shipping methods into memory for use within settings. */ @@ -103,7 +113,7 @@ class WC_Admin_Menus { public function menu_highlight() { global $menu, $submenu, $parent_file, $submenu_file, $self, $post_type, $taxonomy; - $to_highlight_types = array( 'shop_order', 'shop_coupon' ); + $to_highlight_types = array( 'shop_order', 'shop_coupon', 'shop_webhook' ); if ( isset( $post_type ) ) { if ( in_array( $post_type, $to_highlight_types ) ) { diff --git a/includes/class-wc-post-types.php b/includes/class-wc-post-types.php index d13d8e07513..27311f02a4c 100644 --- a/includes/class-wc-post-types.php +++ b/includes/class-wc-post-types.php @@ -383,12 +383,12 @@ class WC_Post_types { 'parent' => __( 'Parent Webhook', 'woocommerce' ) ), 'public' => false, - 'show_ui' => ( current_user_can( 'manage_woocommerce' ) && 'yes' == get_option( 'woocommerce_api_enabled' ) ), + 'show_ui' => true, 'capability_type' => 'shop_webhook', 'map_meta_cap' => true, 'publicly_queryable' => false, 'exclude_from_search' => true, - 'show_in_menu' => 'woocommerce', + 'show_in_menu' => false, 'hierarchical' => false, 'rewrite' => false, 'query_var' => false, From 380769808a44b3b5fa3da2f94fc58498af0ffb8d Mon Sep 17 00:00:00 2001 From: boohoogal Date: Wed, 17 Dec 2014 19:02:23 +0000 Subject: [PATCH 458/743] Changes as proposed in #6949. --- templates/content-widget-product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/content-widget-product.php b/templates/content-widget-product.php index 69be66796d2..37eef24dbfd 100644 --- a/templates/content-widget-product.php +++ b/templates/content-widget-product.php @@ -2,7 +2,7 @@
  • get_image(); ?> - get_title(); ?> + get_title(); ?> get_rating_html(); ?> get_price_html(); ?> From d821dbf88e830df4807df39f83df79903be1fa3f Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Thu, 18 Dec 2014 15:01:54 -0200 Subject: [PATCH 459/743] [API] Fixed the individual_use, enable_free_shipping and exclude_sale_items params for coupons endpoint --- includes/api/class-wc-api-coupons.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/api/class-wc-api-coupons.php b/includes/api/class-wc-api-coupons.php index 9fa142f86c3..3adf17bb455 100644 --- a/includes/api/class-wc-api-coupons.php +++ b/includes/api/class-wc-api-coupons.php @@ -225,7 +225,7 @@ class WC_API_Coupons extends WC_API_Resource { $defaults = array( 'type' => 'fixed_cart', 'amount' => 0, - 'individual_use' => 'no', + 'individual_use' => false, 'product_ids' => array(), 'exclude_product_ids' => array(), 'usage_limit' => '', @@ -233,10 +233,10 @@ class WC_API_Coupons extends WC_API_Resource { 'limit_usage_to_x_items' => '', 'usage_count' => '', 'expiry_date' => '', - 'enable_free_shipping' => 'no', + 'enable_free_shipping' => false, 'product_category_ids' => array(), 'exclude_product_category_ids' => array(), - 'exclude_sale_items' => 'no', + 'exclude_sale_items' => false, 'minimum_amount' => '', 'maximum_amount' => '', 'customer_emails' => array(), @@ -267,7 +267,7 @@ class WC_API_Coupons extends WC_API_Resource { // set coupon meta update_post_meta( $id, 'discount_type', $coupon_data['type'] ); update_post_meta( $id, 'coupon_amount', wc_format_decimal( $coupon_data['amount'] ) ); - update_post_meta( $id, 'individual_use', $coupon_data['individual_use'] ); + update_post_meta( $id, 'individual_use', ( true === $coupon_data['individual_use'] ) ? 'yes' : 'no' ); update_post_meta( $id, 'product_ids', implode( ',', array_filter( array_map( 'intval', $coupon_data['product_ids'] ) ) ) ); update_post_meta( $id, 'exclude_product_ids', implode( ',', array_filter( array_map( 'intval', $coupon_data['exclude_product_ids'] ) ) ) ); update_post_meta( $id, 'usage_limit', absint( $coupon_data['usage_limit'] ) ); @@ -275,10 +275,10 @@ class WC_API_Coupons extends WC_API_Resource { update_post_meta( $id, 'limit_usage_to_x_items', absint( $coupon_data['limit_usage_to_x_items'] ) ); update_post_meta( $id, 'usage_count', absint( $coupon_data['usage_count'] ) ); update_post_meta( $id, 'expiry_date', wc_clean( $coupon_data['expiry_date'] ) ); - update_post_meta( $id, 'free_shipping', wc_clean( $coupon_data['enable_free_shipping'] ) ); + update_post_meta( $id, 'free_shipping', ( true === $coupon_data['enable_free_shipping'] ) ? 'yes' : 'no' ); update_post_meta( $id, 'product_categories', array_filter( array_map( 'intval', $coupon_data['product_category_ids'] ) ) ); update_post_meta( $id, 'exclude_product_categories', array_filter( array_map( 'intval', $coupon_data['exclude_product_category_ids'] ) ) ); - update_post_meta( $id, 'exclude_sale_items', wc_clean( $coupon_data['exclude_sale_items'] ) ); + update_post_meta( $id, 'exclude_sale_items', ( true === $coupon_data['exclude_sale_items'] ) ? 'yes' : 'no' ); update_post_meta( $id, 'minimum_amount', wc_format_decimal( $coupon_data['minimum_amount'] ) ); update_post_meta( $id, 'maximum_amount', wc_format_decimal( $coupon_data['maximum_amount'] ) ); update_post_meta( $id, 'customer_email', array_filter( array_map( 'sanitize_email', $coupon_data['customer_emails'] ) ) ); @@ -348,7 +348,7 @@ class WC_API_Coupons extends WC_API_Resource { } if ( isset( $data['individual_use'] ) ) { - update_post_meta( $id, 'individual_use', $data['individual_use'] ); + update_post_meta( $id, 'individual_use', ( true === $data['individual_use'] ) ? 'yes' : 'no' ); } if ( isset( $data['product_ids'] ) ) { @@ -392,7 +392,7 @@ class WC_API_Coupons extends WC_API_Resource { } if ( isset( $data['exclude_sale_items'] ) ) { - update_post_meta( $id, 'exclude_sale_items', wc_clean( $data['exclude_sale_items'] ) ); + update_post_meta( $id, 'exclude_sale_items', ( true === $data['exclude_sale_items'] ) ? 'yes' : 'no' ); } if ( isset( $data['minimum_amount'] ) ) { From fb51984a6bb86e656aedbac791d83418bbc1a575 Mon Sep 17 00:00:00 2001 From: tc33 Date: Thu, 18 Dec 2014 20:09:07 +0000 Subject: [PATCH 460/743] Fixes #6979 by fetching attribute slugs instead of names. --- includes/class-wc-ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 9a852c200f4..a24bed9e3bc 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -697,7 +697,7 @@ class WC_AJAX { $attribute_field_name = 'attribute_' . sanitize_title( $attribute['name'] ); if ( $attribute['is_taxonomy'] ) { - $options = wc_get_product_terms( $post_id, $attribute['name'], array( 'fields' => 'names' ) ); + $options = wc_get_product_terms( $post_id, $attribute['name'], array( 'fields' => 'slugs' ) ); } else { $options = explode( WC_DELIMITER, $attribute['value'] ); } From 88d5997cda9488f1a3d227e5d4981d4af381e4ad Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 19 Dec 2014 10:12:31 -0200 Subject: [PATCH 461/743] Moved the "cart notes" before the "proceed to checkout" button, closes #6935 --- templates/cart/cart-totals.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/cart/cart-totals.php b/templates/cart/cart-totals.php index 921d89cc27b..abbf31142a3 100644 --- a/templates/cart/cart-totals.php +++ b/templates/cart/cart-totals.php @@ -76,12 +76,6 @@ if ( ! defined( 'ABSPATH' ) ) { -
    - - - -
    - cart->get_cart_tax() ) : ?>

    +
    + + + +
    +
  • From 7e780a64b1e6b730cd1f320bb191c2a491237272 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 19 Dec 2014 10:29:47 -0200 Subject: [PATCH 462/743] Introduces the woocommerce_restock_refunded_item and woocommerce_order_refunded actions, closes #6922 --- includes/class-wc-ajax.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index a24bed9e3bc..263eb3a6d6c 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -1850,6 +1850,8 @@ class WC_AJAX { $new_quantity = $_product->increase_stock( $qty ); $order->add_order_note( sprintf( __( 'Item #%s stock increased from %s to %s.', 'woocommerce' ), $order_item['product_id'], $old_stock, $new_quantity ) ); + + do_action( 'woocommerce_restock_refunded_item', $_product->id, $old_stock, $new_quantity, $order ); } } } @@ -1890,6 +1892,8 @@ class WC_AJAX { } } + do_action( 'woocommerce_order_refunded', $order_id, $refund->id ); + // Clear transients wc_delete_shop_order_transients( $order_id ); From d53210dfbf5fafd62289a5826448763aef099be8 Mon Sep 17 00:00:00 2001 From: Rtransat Date: Fri, 19 Dec 2014 17:15:24 +0100 Subject: [PATCH 463/743] Fix label "for" attribute for products_categories --- includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php b/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php index 3e3f46fcb2e..2bc5b29a54e 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php @@ -141,7 +141,7 @@ class WC_Meta_Box_Coupon_Data { // Categories ?> -

    +

    /> +

    + + @@ -329,7 +342,7 @@ class WC_Admin_Attributes {
    |
    attribute_name ); ?> - attribute_type ) ); ?> + attribute_type ) ); ?> attribute_public ? '(' . __( 'Public', 'woocommerce' ) . ')' : ''; ?> attribute_orderby ) { case 'name' : @@ -400,6 +413,12 @@ class WC_Admin_Attributes {

    +
    + + +

    +
    +
    \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ -
    \ - \ -
    \ - \ - \ - \ - \ -
    '); - - } else { - - // Reveal taxonomy row - var thisrow = $('.product_attributes .woocommerce_attribute.' + attribute_type); - $('.product_attributes').append( $(thisrow) ); - $(thisrow).show().find('.woocommerce_attribute_data').show(); + $wrapper.find( 'select.multiselect' ).chosen(); attribute_row_indexes(); - $('select.attribute_taxonomy').find('option[value="' + attribute_type + '"]').attr('disabled','disabled'); + $wrapper.unblock(); + }); + if ( attribute ) { + $( 'select.attribute_taxonomy' ).find( 'option[value="' + attribute + '"]' ).attr( 'disabled','disabled' ); + $( 'select.attribute_taxonomy' ).val( '' ); } - $('select.attribute_taxonomy').val(''); + return false; }); $('.product_attributes').on('blur', 'input.attribute_name', function(){ @@ -399,8 +371,8 @@ jQuery( function( $ ){ $('.product_attributes').block({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } }); - var attribute = $(this).attr('data-attribute'); - var $wrapper = $(this).closest('.woocommerce_attribute_data'); + var $wrapper = $(this).closest('.woocommerce_attribute'); + var attribute = $wrapper.data('taxonomy'); var new_attribute_name = prompt( woocommerce_admin_meta_boxes.new_attribute_prompt ); if ( new_attribute_name ) { @@ -432,7 +404,6 @@ jQuery( function( $ ){ } return false; - }); // Save attributes and update variations diff --git a/assets/js/admin/meta-boxes-product.min.js b/assets/js/admin/meta-boxes-product.min.js index ec075765e42..85934674b55 100644 --- a/assets/js/admin/meta-boxes-product.min.js +++ b/assets/js/admin/meta-boxes-product.min.js @@ -1 +1 @@ -jQuery(function(a){function b(){var b=a("select#product-type").val(),c=a("input#_virtual:checked").size(),d=a("input#_downloadable:checked").size(),e=".hide_if_downloadable, .hide_if_virtual",f=".show_if_downloadable, .show_if_virtual, .show_if_external";a.each(woocommerce_admin_meta_boxes.product_types,function(a,b){e=e+", .hide_if_"+b,f=f+", .show_if_"+b}),a(e).show(),a(f).hide(),d&&a(".show_if_downloadable").show(),c&&a(".show_if_virtual").show(),a(".show_if_"+b).show(),d&&a(".hide_if_downloadable").hide(),c&&a(".hide_if_virtual").hide(),a(".hide_if_"+b).hide(),a("input#_manage_stock").change()}function c(){a(".product_attributes .woocommerce_attribute").each(function(b,c){a(".attribute_position",c).val(parseInt(a(c).index(".product_attributes .woocommerce_attribute")))})}a(function(){a('[id$="-all"] > ul.categorychecklist').each(function(){var b=a(this),c=b.find(":checked").first();if(c.length){var d=b.find("input").position().top,e=c.position().top;b.closest(".tabs-panel").scrollTop(e-d+5)}})}),a("#upsell_product_data").bind("keypress",function(a){return 13==a.keyCode?!1:void 0}),a(".type_box").appendTo("#woocommerce-product-data h3.hndle span"),a(function(){a("#woocommerce-product-data h3.hndle").unbind("click.postboxes"),jQuery("#woocommerce-product-data").on("click","h3.hndle",function(b){a(b.target).filter("input, option, label, select").length||a("#woocommerce-product-data").toggleClass("closed")})}),a("#catalog-visibility .edit-catalog-visibility").click(function(){return a("#catalog-visibility-select").is(":hidden")&&(a("#catalog-visibility-select").slideDown("fast"),a(this).hide()),!1}),a("#catalog-visibility .save-post-visibility").click(function(){a("#catalog-visibility-select").slideUp("fast"),a("#catalog-visibility .edit-catalog-visibility").show();var b=(a("input[name=_visibility]:checked").val(),a("input[name=_visibility]:checked").attr("data-label"));return a("input[name=_featured]").is(":checked")&&(b=b+", "+woocommerce_admin_meta_boxes.featured_label,a("input[name=_featured]").attr("checked","checked")),a("#catalog-visibility-display").text(b),!1}),a("#catalog-visibility .cancel-post-visibility").click(function(){a("#catalog-visibility-select").slideUp("fast"),a("#catalog-visibility .edit-catalog-visibility").show();var b=a("#current_visibility").val(),c=a("#current_featured").val();a("input[name=_visibility]").removeAttr("checked"),a("input[name=_visibility][value="+b+"]").attr("checked","checked");var d=a("input[name=_visibility]:checked").attr("data-label");return"yes"==c?(d=d+", "+woocommerce_admin_meta_boxes.featured_label,a("input[name=_featured]").attr("checked","checked")):a("input[name=_featured]").removeAttr("checked"),a("#catalog-visibility-display").text(d),!1}),a("select#product-type").change(function(){var c=a(this).val();"variable"===c?(a("input#_manage_stock").change(),a("input#_downloadable").prop("checked",!1),a("input#_virtual").removeAttr("checked")):"grouped"===c?(a("input#_downloadable").prop("checked",!1),a("input#_virtual").removeAttr("checked")):"external"===c&&(a("input#_downloadable").prop("checked",!1),a("input#_virtual").removeAttr("checked")),b(),a("ul.wc-tabs li:visible").eq(0).find("a").click(),a("body").trigger("woocommerce-product-type-change",c,a(this))}).change(),a("body").on("woocommerce-product-type-change",function(b,c){"variable"!==c&&0d?-1:d>e?1:0}),a(e).each(function(b,c){a(".product_attributes").append(c)}),a(".product_attributes .woocommerce_attribute").each(function(b,c){"none"!=a(c).css("display")&&a(c).is(".taxonomy")&&a("select.attribute_taxonomy").find('option[value="'+a(c).data("taxonomy")+'"]').attr("disabled","disabled")}),a("button.add_attribute").on("click",function(){var b=a(".product_attributes .woocommerce_attribute").size(),d=a("select.attribute_taxonomy").val();if(d){var e=a(".product_attributes .woocommerce_attribute."+d);a(".product_attributes").append(a(e)),a(e).show().find(".woocommerce_attribute_data").show(),c(),a("select.attribute_taxonomy").find('option[value="'+d+'"]').attr("disabled","disabled")}else{var f=a("select#product-type").val();enable_variation="variable"!=f?'style="display:none;"':"",a(".product_attributes").append('

    ")}a("select.attribute_taxonomy").val("")}),a(".product_attributes").on("blur","input.attribute_name",function(){a(this).closest(".woocommerce_attribute").find("strong.attribute_name").text(a(this).val())}),a(".product_attributes").on("click","button.select_all_attributes",function(){return a(this).closest("td").find("select option").attr("selected","selected"),a(this).closest("td").find("select").trigger("chosen:updated"),!1}),a(".product_attributes").on("click","button.select_no_attributes",function(){return a(this).closest("td").find("select option").removeAttr("selected"),a(this).closest("td").find("select").trigger("chosen:updated"),!1}),a(".product_attributes").on("click","button.remove_row",function(){var b=confirm(woocommerce_admin_meta_boxes.remove_attribute);if(b){var d=a(this).parent().parent();d.is(".taxonomy")?(d.find("select, input[type=text]").val(""),d.hide(),a("select.attribute_taxonomy").find('option[value="'+d.data("taxonomy")+'"]').removeAttr("disabled")):(d.find("select, input[type=text]").val(""),d.hide(),c())}return!1}),a(".product_attributes").sortable({items:".woocommerce_attribute",cursor:"move",axis:"y",handle:"h3",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"wc-metabox-sortable-placeholder",start:function(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,b){b.item.removeAttr("style"),c()}}),a(".product_attributes").on("click","button.add_new_attribute",function(){a(".product_attributes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b=a(this).attr("data-attribute"),c=a(this).closest(".woocommerce_attribute_data"),d=prompt(woocommerce_admin_meta_boxes.new_attribute_prompt);if(d){var e={action:"woocommerce_add_new_attribute",taxonomy:b,term:d,security:woocommerce_admin_meta_boxes.add_attribute_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,e,function(b){b.error?alert(b.error):b.slug&&(c.find("select.attribute_values").append('"),c.find("select.attribute_values").trigger("chosen:updated")),a(".product_attributes").unblock()})}else a(".product_attributes").unblock();return!1}),a(".save_attributes").on("click",function(){a(".product_attributes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b={post_id:woocommerce_admin_meta_boxes.post_id,data:a(".product_attributes").find("input, select, textarea").serialize(),action:"woocommerce_save_attributes",security:woocommerce_admin_meta_boxes.save_attributes_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,b,function(){var b=window.location.toString();b=b.replace("post-new.php?","post.php?post="+woocommerce_admin_meta_boxes.post_id+"&action=edit&"),a("#variable_product_options").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a("#variable_product_options").load(b+" #variable_product_options_inner",function(){a("#variable_product_options").unblock()}),a(".product_attributes").unblock()})});var f,g;jQuery(document).on("click",".upload_file_button",function(b){var c=a(this);if(g=c.closest("tr").find("td.file_url input"),b.preventDefault(),f)return void f.open();var d=[new wp.media.controller.Library({library:wp.media.query(),multiple:!0,title:c.data("choose"),priority:20,filterable:"uploaded"})];f=wp.media.frames.downloadable_file=wp.media({title:c.data("choose"),library:{type:""},button:{text:c.data("update")},multiple:!0,states:d}),f.on("select",function(){var a="",b=f.state().get("selection");b.map(function(b){b=b.toJSON(),b.url&&(a=b.url)}),g.val(a)}),f.on("ready",function(){f.uploader.options.uploader.params={type:"downloadable_product"}}),f.open()}),jQuery(".downloadable_files tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:"td.sort",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65});var h,i=a("#product_image_gallery"),j=a("#product_images_container ul.product_images");jQuery(".add_product_images").on("click","a",function(b){var c=a(this),d=i.val();return b.preventDefault(),h?void h.open():(h=wp.media.frames.product_gallery=wp.media({title:c.data("choose"),button:{text:c.data("update")},states:[new wp.media.controller.Library({title:c.data("choose"),filterable:"all",multiple:!0})]}),h.on("select",function(){var a=h.state().get("selection");a.map(function(a){a=a.toJSON(),a.id&&(d=d?d+","+a.id:a.id,j.append('
  • "))}),i.val(d)}),void h.open())}),j.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,placeholder:"wc-metabox-sortable-placeholder",start:function(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,b){b.item.removeAttr("style")},update:function(){var b="";a("#product_images_container ul li.image").css("cursor","default").each(function(){var a=jQuery(this).attr("data-attachment_id");b=b+a+","}),i.val(b)}}),a("#product_images_container").on("click","a.delete",function(){a(this).closest("li.image").remove();var b="";return a("#product_images_container ul li.image").css("cursor","default").each(function(){var a=jQuery(this).attr("data-attachment_id");b=b+a+","}),i.val(b),runTipTip(),!1})}); \ No newline at end of file +jQuery(function(a){function b(){var b=a("select#product-type").val(),c=a("input#_virtual:checked").size(),d=a("input#_downloadable:checked").size(),e=".hide_if_downloadable, .hide_if_virtual",f=".show_if_downloadable, .show_if_virtual, .show_if_external";a.each(woocommerce_admin_meta_boxes.product_types,function(a,b){e=e+", .hide_if_"+b,f=f+", .show_if_"+b}),a(e).show(),a(f).hide(),d&&a(".show_if_downloadable").show(),c&&a(".show_if_virtual").show(),a(".show_if_"+b).show(),d&&a(".hide_if_downloadable").hide(),c&&a(".hide_if_virtual").hide(),a(".hide_if_"+b).hide(),a("input#_manage_stock").change()}function c(){a(".product_attributes .woocommerce_attribute").each(function(b,c){a(".attribute_position",c).val(parseInt(a(c).index(".product_attributes .woocommerce_attribute")))})}a(function(){a('[id$="-all"] > ul.categorychecklist').each(function(){var b=a(this),c=b.find(":checked").first();if(c.length){var d=b.find("input").position().top,e=c.position().top;b.closest(".tabs-panel").scrollTop(e-d+5)}})}),a("#upsell_product_data").bind("keypress",function(a){return 13==a.keyCode?!1:void 0}),a(".type_box").appendTo("#woocommerce-product-data h3.hndle span"),a(function(){a("#woocommerce-product-data h3.hndle").unbind("click.postboxes"),jQuery("#woocommerce-product-data").on("click","h3.hndle",function(b){a(b.target).filter("input, option, label, select").length||a("#woocommerce-product-data").toggleClass("closed")})}),a("#catalog-visibility .edit-catalog-visibility").click(function(){return a("#catalog-visibility-select").is(":hidden")&&(a("#catalog-visibility-select").slideDown("fast"),a(this).hide()),!1}),a("#catalog-visibility .save-post-visibility").click(function(){a("#catalog-visibility-select").slideUp("fast"),a("#catalog-visibility .edit-catalog-visibility").show();var b=(a("input[name=_visibility]:checked").val(),a("input[name=_visibility]:checked").attr("data-label"));return a("input[name=_featured]").is(":checked")&&(b=b+", "+woocommerce_admin_meta_boxes.featured_label,a("input[name=_featured]").attr("checked","checked")),a("#catalog-visibility-display").text(b),!1}),a("#catalog-visibility .cancel-post-visibility").click(function(){a("#catalog-visibility-select").slideUp("fast"),a("#catalog-visibility .edit-catalog-visibility").show();var b=a("#current_visibility").val(),c=a("#current_featured").val();a("input[name=_visibility]").removeAttr("checked"),a("input[name=_visibility][value="+b+"]").attr("checked","checked");var d=a("input[name=_visibility]:checked").attr("data-label");return"yes"==c?(d=d+", "+woocommerce_admin_meta_boxes.featured_label,a("input[name=_featured]").attr("checked","checked")):a("input[name=_featured]").removeAttr("checked"),a("#catalog-visibility-display").text(d),!1}),a("select#product-type").change(function(){var c=a(this).val();"variable"===c?(a("input#_manage_stock").change(),a("input#_downloadable").prop("checked",!1),a("input#_virtual").removeAttr("checked")):"grouped"===c?(a("input#_downloadable").prop("checked",!1),a("input#_virtual").removeAttr("checked")):"external"===c&&(a("input#_downloadable").prop("checked",!1),a("input#_virtual").removeAttr("checked")),b(),a("ul.wc-tabs li:visible").eq(0).find("a").click(),a("body").trigger("woocommerce-product-type-change",c,a(this))}).change(),a("body").on("woocommerce-product-type-change",function(b,c){"variable"!==c&&0d?-1:d>e?1:0}),a(e).each(function(b,c){a(".product_attributes").append(c)}),a(".product_attributes .woocommerce_attribute").each(function(b,c){"none"!=a(c).css("display")&&a(c).is(".taxonomy")&&a("select.attribute_taxonomy").find('option[value="'+a(c).data("taxonomy")+'"]').attr("disabled","disabled")}),a("button.add_attribute").on("click",function(){var b=a(".product_attributes .woocommerce_attribute").size(),d=a("select.attribute_taxonomy").val(),e=a(this).closest("#product_attributes").find(".product_attributes"),f=a("select#product-type").val(),g={action:"woocommerce_add_attribute",taxonomy:d,i:b,security:woocommerce_admin_meta_boxes.add_attribute_nonce};return e.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a.post(woocommerce_admin_meta_boxes.ajax_url,g,function(a){e.append(a),"variable"!==f&&e.find(".enable_variation").hide(),e.find("select.multiselect").chosen(),c(),e.unblock()}),d&&(a("select.attribute_taxonomy").find('option[value="'+d+'"]').attr("disabled","disabled"),a("select.attribute_taxonomy").val("")),!1}),a(".product_attributes").on("blur","input.attribute_name",function(){a(this).closest(".woocommerce_attribute").find("strong.attribute_name").text(a(this).val())}),a(".product_attributes").on("click","button.select_all_attributes",function(){return a(this).closest("td").find("select option").attr("selected","selected"),a(this).closest("td").find("select").trigger("chosen:updated"),!1}),a(".product_attributes").on("click","button.select_no_attributes",function(){return a(this).closest("td").find("select option").removeAttr("selected"),a(this).closest("td").find("select").trigger("chosen:updated"),!1}),a(".product_attributes").on("click","button.remove_row",function(){var b=confirm(woocommerce_admin_meta_boxes.remove_attribute);if(b){var d=a(this).parent().parent();d.is(".taxonomy")?(d.find("select, input[type=text]").val(""),d.hide(),a("select.attribute_taxonomy").find('option[value="'+d.data("taxonomy")+'"]').removeAttr("disabled")):(d.find("select, input[type=text]").val(""),d.hide(),c())}return!1}),a(".product_attributes").sortable({items:".woocommerce_attribute",cursor:"move",axis:"y",handle:"h3",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"wc-metabox-sortable-placeholder",start:function(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,b){b.item.removeAttr("style"),c()}}),a(".product_attributes").on("click","button.add_new_attribute",function(){a(".product_attributes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b=a(this).closest(".woocommerce_attribute"),c=b.data("taxonomy"),d=prompt(woocommerce_admin_meta_boxes.new_attribute_prompt);if(d){var e={action:"woocommerce_add_new_attribute",taxonomy:c,term:d,security:woocommerce_admin_meta_boxes.add_attribute_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,e,function(c){c.error?alert(c.error):c.slug&&(b.find("select.attribute_values").append('"),b.find("select.attribute_values").trigger("chosen:updated")),a(".product_attributes").unblock()})}else a(".product_attributes").unblock();return!1}),a(".save_attributes").on("click",function(){a(".product_attributes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var b={post_id:woocommerce_admin_meta_boxes.post_id,data:a(".product_attributes").find("input, select, textarea").serialize(),action:"woocommerce_save_attributes",security:woocommerce_admin_meta_boxes.save_attributes_nonce};a.post(woocommerce_admin_meta_boxes.ajax_url,b,function(){var b=window.location.toString();b=b.replace("post-new.php?","post.php?post="+woocommerce_admin_meta_boxes.post_id+"&action=edit&"),a("#variable_product_options").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),a("#variable_product_options").load(b+" #variable_product_options_inner",function(){a("#variable_product_options").unblock()}),a(".product_attributes").unblock()})});var f,g;jQuery(document).on("click",".upload_file_button",function(b){var c=a(this);if(g=c.closest("tr").find("td.file_url input"),b.preventDefault(),f)return void f.open();var d=[new wp.media.controller.Library({library:wp.media.query(),multiple:!0,title:c.data("choose"),priority:20,filterable:"uploaded"})];f=wp.media.frames.downloadable_file=wp.media({title:c.data("choose"),library:{type:""},button:{text:c.data("update")},multiple:!0,states:d}),f.on("select",function(){var a="",b=f.state().get("selection");b.map(function(b){b=b.toJSON(),b.url&&(a=b.url)}),g.val(a)}),f.on("ready",function(){f.uploader.options.uploader.params={type:"downloadable_product"}}),f.open()}),jQuery(".downloadable_files tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:"td.sort",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65});var h,i=a("#product_image_gallery"),j=a("#product_images_container ul.product_images");jQuery(".add_product_images").on("click","a",function(b){var c=a(this),d=i.val();return b.preventDefault(),h?void h.open():(h=wp.media.frames.product_gallery=wp.media({title:c.data("choose"),button:{text:c.data("update")},states:[new wp.media.controller.Library({title:c.data("choose"),filterable:"all",multiple:!0})]}),h.on("select",function(){var a=h.state().get("selection");a.map(function(a){a=a.toJSON(),a.id&&(d=d?d+","+a.id:a.id,j.append('
  • "))}),i.val(d)}),void h.open())}),j.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,placeholder:"wc-metabox-sortable-placeholder",start:function(a,b){b.item.css("background-color","#f6f6f6")},stop:function(a,b){b.item.removeAttr("style")},update:function(){var b="";a("#product_images_container ul li.image").css("cursor","default").each(function(){var a=jQuery(this).attr("data-attachment_id");b=b+a+","}),i.val(b)}}),a("#product_images_container").on("click","a.delete",function(){a(this).closest("li.image").remove();var b="";return a("#product_images_container ul li.image").css("cursor","default").each(function(){var a=jQuery(this).attr("data-attachment_id");b=b+a+","}),i.val(b),runTipTip(),!1})}); \ No newline at end of file diff --git a/includes/admin/meta-boxes/class-wc-meta-box-product-data.php b/includes/admin/meta-boxes/class-wc-meta-box-product-data.php index 2ac89676b32..43bd60c8502 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-product-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-product-data.php @@ -411,181 +411,40 @@ class WC_Meta_Box_Product_Data {
    attribute_name ); - - // Ensure it exists - if ( ! taxonomy_exists( $attribute_taxonomy_name ) ) { - continue; - } - - $i++; - - // Get product data values for current taxonomy - this contains ordering and visibility data - if ( isset( $attributes[ sanitize_title( $attribute_taxonomy_name ) ] ) ) { - $attribute = $attributes[ sanitize_title( $attribute_taxonomy_name ) ]; - } - - $position = empty( $attribute['position'] ) ? 0 : absint( $attribute['position'] ); - - // Get terms of this taxonomy associated with current product - $post_terms = wp_get_post_terms( $thepostid, $attribute_taxonomy_name ); - - // Any set? - $has_terms = ( is_wp_error( $post_terms ) || ! $post_terms || sizeof( $post_terms ) == 0 ) ? 0 : 1; - ?> -
    > -

    - -
    - attribute_label ? $tax->attribute_label : $tax->attribute_name, $tax->attribute_name ); ?> -

    -
    - - - - - - - - - - - - - -
    - - attribute_label ? $tax->attribute_label : $tax->attribute_name; ?> - - - - - - - attribute_type ) : ?> - - - - - - - attribute_type ) : ?> - - - -
    - -
    -
    - -
    -
    -
    -
    - -
    -

    - -
    - -

    -
    - - - - - - - - - - - - - -
    - - - - - - - -
    - -
    -
    - -
    -
    -
    -
    - @@ -597,7 +456,6 @@ class WC_Meta_Box_Product_Data { attribute_name ); $label = $tax->attribute_label ? $tax->attribute_label : $tax->attribute_name; diff --git a/includes/admin/meta-boxes/views/html-product-attribute.php b/includes/admin/meta-boxes/views/html-product-attribute.php new file mode 100644 index 00000000000..d90950927e1 --- /dev/null +++ b/includes/admin/meta-boxes/views/html-product-attribute.php @@ -0,0 +1,79 @@ +
    +

    + +
    + +

    +
    + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + attribute_type ) : ?> + + + + + + + attribute_type ) : ?> + + " /> + + + + + + + + + + +
    + +
    +
    + +
    +
    +
    +
    \ No newline at end of file diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 263eb3a6d6c..f9b9386bd53 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -33,6 +33,7 @@ class WC_AJAX { 'checkout' => true, 'feature_product' => false, 'mark_order_status' => false, + 'add_attribute' => false, 'add_new_attribute' => false, 'remove_variation' => false, 'remove_variations' => false, @@ -404,6 +405,41 @@ class WC_AJAX { die(); } + /** + * Add an attribute row + */ + public static function add_attribute() { + ob_start(); + + check_ajax_referer( 'add-attribute', 'security' ); + + global $wc_product_attributes; + + $taxonomy = sanitize_text_field( $_POST['taxonomy'] ); + $i = absint( $_POST['i'] ); + $position = 0; + $attribute = array( + 'name' => $taxonomy, + 'value' => '', + 'is_visible' => 1, + 'is_variation' => 0, + 'is_taxonomy' => $taxonomy ? 1 : 0 + ); + + if ( $taxonomy ) { + $attribute_taxonomy = $wc_product_attributes[ $taxonomy ]; + $metabox_class = array(); + $metabox_class[] = 'taxonomy'; + $metabox_class[] = $taxonomy; + $attribute_label = wc_attribute_label( $taxonomy ); + } else { + $attribute_label = ''; + } + + include( 'admin/meta-boxes/views/html-product-attribute.php' ); + die(); + } + /** * Add a new attribute via ajax function */ From 55258fc426dc69b8b512efeec15417405b0eeab3 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Mon, 22 Dec 2014 13:29:13 -0200 Subject: [PATCH 476/743] Fixed variable fields on frontend, closes #6868 --- templates/single-product/add-to-cart/variable.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/single-product/add-to-cart/variable.php b/templates/single-product/add-to-cart/variable.php index 53ce903b71c..0936ef3c665 100644 --- a/templates/single-product/add-to-cart/variable.php +++ b/templates/single-product/add-to-cart/variable.php @@ -2,9 +2,9 @@ /** * Variable product add to cart * - * @author WooThemes - * @package WooCommerce/Templates - * @version 2.3.0 + * @author WooThemes + * @package WooCommerce/Templates + * @version 2.3.0 */ if ( ! defined( 'ABSPATH' ) ) { @@ -22,7 +22,7 @@ global $product, $post; $options ) : $loop++; ?> - + @@ -88,18 +89,19 @@ if ( ! defined( 'ABSPATH' ) ) {

    - - +

    From 5b317450612cb2378941b87a4ed4cb02b9c5e23c Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 23 Dec 2014 17:33:10 +0000 Subject: [PATCH 490/743] Add geolocation option for default address --- includes/admin/settings/settings-tax.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/admin/settings/settings-tax.php b/includes/admin/settings/settings-tax.php index f74e7d4826d..270ff8e93a4 100644 --- a/includes/admin/settings/settings-tax.php +++ b/includes/admin/settings/settings-tax.php @@ -44,12 +44,13 @@ return apply_filters( 'woocommerce_tax_settings', array( array( 'title' => __( 'Default Customer Address:', 'woocommerce' ), 'id' => 'woocommerce_default_customer_address', - 'desc_tip' => __( 'This option determines the customers default address (before they input their own).', 'woocommerce' ), - 'default' => 'base', + 'desc_tip' => __( 'This option determines the customers default address (before they input their details).', 'woocommerce' ), + 'default' => 'geolocation', 'type' => 'select', 'options' => array( - '' => __( 'No address', 'woocommerce' ), - 'base' => __( 'Shop base address', 'woocommerce' ), + '' => __( 'No address', 'woocommerce' ), + 'base' => __( 'Shop base address', 'woocommerce' ), + 'geolocation' => __( 'Geolocate address', 'woocommerce' ), ), ), From d908093eac4f833c2e94dc578e504266b896d331 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 23 Dec 2014 17:33:33 +0000 Subject: [PATCH 491/743] Made function names make more sense (customer location vs base locations) --- includes/class-wc-customer.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/includes/class-wc-customer.php b/includes/class-wc-customer.php index 8a2dbb328a7..1437d121a3a 100644 --- a/includes/class-wc-customer.php +++ b/includes/class-wc-customer.php @@ -32,7 +32,7 @@ class WC_Customer { * * @var array */ - protected $_data; + protected $_data = array(); /** * Stores bool when data is changed @@ -49,15 +49,16 @@ class WC_Customer { $this->_data = WC()->session->get( 'customer' ); if ( empty( $this->_data ) ) { + // Defaults $this->_data = array( - 'country' => esc_html( $this->get_default_country() ), - 'state' => '', + 'country' => $this->get_default_country(), + 'state' => $this->get_default_state(), 'postcode' => '', 'city' => '', 'address' => '', 'address_2' => '', - 'shipping_country' => esc_html( $this->get_default_country() ), - 'shipping_state' => '', + 'shipping_country' => $this->get_default_country(), + 'shipping_state' => $this->get_default_state(), 'shipping_postcode' => '', 'shipping_city' => '', 'shipping_address' => '', @@ -116,8 +117,7 @@ class WC_Customer { * @return string */ public function get_default_country() { - $default = wc_get_default_location(); - + $default = wc_get_customer_default_location(); return $default['country']; } @@ -126,8 +126,7 @@ class WC_Customer { * @return string */ public function get_default_state() { - $default = wc_get_default_location(); - + $default = wc_get_customer_default_location(); return $default['state']; } @@ -170,7 +169,7 @@ class WC_Customer { if ( $country ) { - $default = wc_get_default_location(); + $default = wc_get_base_location(); if ( $default['country'] !== $country ) { return true; @@ -329,8 +328,7 @@ class WC_Customer { if ( $tax_based_on == 'base' ) { - $default = wc_get_default_location(); - + $default = wc_get_base_location(); $country = $default['country']; $state = $default['state']; $postcode = ''; From 34413a1dd76b99d569ad9ad4159855b95282b042 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 23 Dec 2014 17:33:51 +0000 Subject: [PATCH 492/743] Core methods for getting locations --- includes/wc-core-functions.php | 52 ++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/includes/wc-core-functions.php b/includes/wc-core-functions.php index 74197af5a82..3caef064950 100644 --- a/includes/wc-core-functions.php +++ b/includes/wc-core-functions.php @@ -681,23 +681,57 @@ function wc_deliver_webhook_async( $webhook_id, $arg ) { add_action( 'woocommerce_deliver_webhook_async', 'wc_deliver_webhook_async', 10, 2 ); /** - * Get the default location - * + * Formats a string in the format COUNTRY:STATE into an array. * @since 2.3.0 + * @param string $country_string * @return array */ -function wc_get_default_location() { - $default = apply_filters( 'woocommerce_customer_default_location', get_option( 'woocommerce_default_country' ) ); - - if ( strstr( $default, ':' ) ) { - list( $country, $state ) = explode( ':', $default ); +function wc_format_country_state_string( $country_string ) { + if ( strstr( $country_string, ':' ) ) { + list( $country, $state ) = explode( ':', $country_string ); } else { - $country = $default; + $country = $country_string; $state = ''; } - return array( 'country' => $country, 'state' => $state ); } + +/** + * Get the store's base location. + * @todo should the woocommerce_default_country option be renamed to contain 'base'? + * @since 2.3.0 + * @return array + */ +function wc_get_base_location() { + $default = apply_filters( 'woocommerce_get_base_location', get_option( 'woocommerce_default_country' ) ); + + return wc_format_country_state_string( $default ); +} + +/** + * Get the customer's default location. Filtered, and set to base location or left blank. + * @todo should the woocommerce_default_country option be renamed to contain 'base'? + * @since 2.3.0 + * @return array + */ +function wc_get_customer_default_location() { + switch ( get_option( 'woocommerce_default_customer_address' ) ) { + case 'geolocation' : + $location = array( + 'country' => 'DK', + 'state' => '' + ); + break; + case 'base' : + $location = wc_format_country_state_string( apply_filters( 'woocommerce_customer_default_location', get_option( 'woocommerce_default_country' ) ) ); + break; + default : + $location = wc_format_country_state_string( apply_filters( 'woocommerce_customer_default_location', '' ) ); + break; + } + + return $location; +} From 6800ee0ec3eee97192e7cbd102eef885996c760e Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 23 Dec 2014 17:34:05 +0000 Subject: [PATCH 493/743] Base vs default --- includes/abstracts/abstract-wc-order.php | 2 +- includes/class-wc-countries.php | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/includes/abstracts/abstract-wc-order.php b/includes/abstracts/abstract-wc-order.php index f934a19240e..4bd83f4f987 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -525,7 +525,7 @@ abstract class WC_Abstract_Order { if ( 'base' === $tax_based_on ) { - $default = wc_get_default_location(); + $default = wc_get_base_location(); $country = $default['country']; $state = $default['state']; $postcode = ''; diff --git a/includes/class-wc-countries.php b/includes/class-wc-countries.php index 7a51bf04033..db7ac7f1c4f 100644 --- a/includes/class-wc-countries.php +++ b/includes/class-wc-countries.php @@ -118,10 +118,8 @@ class WC_Countries { * @return string */ public function get_base_country() { - $default = esc_attr( get_option('woocommerce_default_country') ); - $country = ( ( $pos = strrpos( $default, ':' ) ) === false ) ? $default : substr( $default, 0, $pos ); - - return apply_filters( 'woocommerce_countries_base_country', $country ); + $default = wc_get_base_location(); + return apply_filters( 'woocommerce_countries_base_country', $default['country'] ); } /** @@ -131,10 +129,8 @@ class WC_Countries { * @return string */ public function get_base_state() { - $default = wc_clean( get_option( 'woocommerce_default_country' ) ); - $state = ( ( $pos = strrpos( $default, ':' ) ) === false ) ? '' : substr( $default, $pos + 1 ); - - return apply_filters( 'woocommerce_countries_base_state', $state ); + $default = wc_get_base_location(); + return apply_filters( 'woocommerce_countries_base_state', $default['state'] ); } /** From f561aa4224dd0b7c4d1886faa86853b42a49859d Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 23 Dec 2014 18:49:37 +0000 Subject: [PATCH 494/743] Geolocation class --- includes/class-wc-geolocation.php | 130 ++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 includes/class-wc-geolocation.php diff --git a/includes/class-wc-geolocation.php b/includes/class-wc-geolocation.php new file mode 100644 index 00000000000..bbfb28695a8 --- /dev/null +++ b/includes/class-wc-geolocation.php @@ -0,0 +1,130 @@ +add( 'geolocation', 'Unable to open database file' ); + } + + @unlink( $tmp_database ); + } else { + $logger->add( 'geolocation', 'Unable to download GeoIP Database: ' . $tmp_database->get_message() ); + } + } + + /** + * Geolocation an IP address + * @param string $ip_address + * @return array + */ + public static function geolocate_ip( $ip_address ) { + $country_code = self::geolite_geolocation( $ip_address ); + + // Fallback to API + if ( empty( $country_code ) ) { + $country_code = self::freegeoip_geolocation( $ip_address ); + } + + return array( + 'country' => $country_code, + 'state' => '' + ); + } + + /** + * Use MAXMIND GeoLite database to geolocation the user. + * @param string $ip_address + * @return string + */ + private static function geolite_geolocation( $ip_address ) { + $country_code = ''; + $upload_dir = wp_upload_dir(); + $database = $upload_dir['basedir'] . '/GeoIP.dat'; + + if ( file_exists( $database ) ) { + if ( ! class_exists( 'GeoIP' ) ) { + include_once( 'libraries/geoip.php' ); + } + $gi = geoip_open( $database, GEOIP_STANDARD ); + $country_code = geoip_country_code_by_addr( $gi, $ip_address ); + geoip_close( $gi ); + } + + return $country_code; + } + + /** + * Use freegeoip.net + * @param string $ip_address + * @return string + */ + private static function freegeoip_geolocation( $ip_address ) { + $country_code = get_transient( 'geoip_' . $ip_address ); + + if ( false === $country_code ) { + $json_geo_ip = wp_remote_get( 'https://freegeoip.net/json/' . $ip_address ); + + if ( ! is_wp_error( $json_geo_ip ) ) { + $data = json_decode( $json_geo_ip['body'] ); + $country_code = sanitize_text_field( $data->country_code ); + set_transient( 'geoip_' . $ip_address, $country_code, WEEK_IN_SECONDS ); + } else { + $country_code = ''; + } + } + + return $country_code; + } +} + +WC_Geolocation::init(); From ef3ad7d99f0a99ed216e4c77f105c5757f6bf634 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 23 Dec 2014 18:49:43 +0000 Subject: [PATCH 495/743] Setup cron jobs --- includes/class-wc-install.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/class-wc-install.php b/includes/class-wc-install.php index 932ab857c9c..a38fc23d4fc 100644 --- a/includes/class-wc-install.php +++ b/includes/class-wc-install.php @@ -160,6 +160,7 @@ class WC_Install { wp_clear_scheduled_hook( 'woocommerce_cancel_unpaid_orders' ); wp_clear_scheduled_hook( 'woocommerce_cleanup_sessions' ); wp_clear_scheduled_hook( 'woocommerce_language_pack_updater_check' ); + wp_clear_scheduled_hook( 'woocommerce_geoip_updater' ); $ve = get_option( 'gmt_offset' ) > 0 ? '+' : '-'; @@ -173,6 +174,8 @@ class WC_Install { wp_schedule_event( time(), 'twicedaily', 'woocommerce_cleanup_sessions' ); wp_schedule_single_event( time(), 'woocommerce_language_pack_updater_check' ); + wp_schedule_single_event( time(), 'woocommerce_geoip_updater' ); + wp_schedule_event( strtotime( 'first tuesday of next month' ), 'monthly', 'woocommerce_geoip_updater' ); } /** From bba6ca2007db00576ae1dbbe6f6d27ddbb805ed3 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 23 Dec 2014 18:49:55 +0000 Subject: [PATCH 496/743] Maxmind Geolocation library --- includes/libraries/geoip.php | 1881 ++++++++++++++++++++++++++++++++++ 1 file changed, 1881 insertions(+) create mode 100755 includes/libraries/geoip.php diff --git a/includes/libraries/geoip.php b/includes/libraries/geoip.php new file mode 100755 index 00000000000..62a4e78f91d --- /dev/null +++ b/includes/libraries/geoip.php @@ -0,0 +1,1881 @@ + 0, + "AP" => 1, + "EU" => 2, + "AD" => 3, + "AE" => 4, + "AF" => 5, + "AG" => 6, + "AI" => 7, + "AL" => 8, + "AM" => 9, + "CW" => 10, + "AO" => 11, + "AQ" => 12, + "AR" => 13, + "AS" => 14, + "AT" => 15, + "AU" => 16, + "AW" => 17, + "AZ" => 18, + "BA" => 19, + "BB" => 20, + "BD" => 21, + "BE" => 22, + "BF" => 23, + "BG" => 24, + "BH" => 25, + "BI" => 26, + "BJ" => 27, + "BM" => 28, + "BN" => 29, + "BO" => 30, + "BR" => 31, + "BS" => 32, + "BT" => 33, + "BV" => 34, + "BW" => 35, + "BY" => 36, + "BZ" => 37, + "CA" => 38, + "CC" => 39, + "CD" => 40, + "CF" => 41, + "CG" => 42, + "CH" => 43, + "CI" => 44, + "CK" => 45, + "CL" => 46, + "CM" => 47, + "CN" => 48, + "CO" => 49, + "CR" => 50, + "CU" => 51, + "CV" => 52, + "CX" => 53, + "CY" => 54, + "CZ" => 55, + "DE" => 56, + "DJ" => 57, + "DK" => 58, + "DM" => 59, + "DO" => 60, + "DZ" => 61, + "EC" => 62, + "EE" => 63, + "EG" => 64, + "EH" => 65, + "ER" => 66, + "ES" => 67, + "ET" => 68, + "FI" => 69, + "FJ" => 70, + "FK" => 71, + "FM" => 72, + "FO" => 73, + "FR" => 74, + "SX" => 75, + "GA" => 76, + "GB" => 77, + "GD" => 78, + "GE" => 79, + "GF" => 80, + "GH" => 81, + "GI" => 82, + "GL" => 83, + "GM" => 84, + "GN" => 85, + "GP" => 86, + "GQ" => 87, + "GR" => 88, + "GS" => 89, + "GT" => 90, + "GU" => 91, + "GW" => 92, + "GY" => 93, + "HK" => 94, + "HM" => 95, + "HN" => 96, + "HR" => 97, + "HT" => 98, + "HU" => 99, + "ID" => 100, + "IE" => 101, + "IL" => 102, + "IN" => 103, + "IO" => 104, + "IQ" => 105, + "IR" => 106, + "IS" => 107, + "IT" => 108, + "JM" => 109, + "JO" => 110, + "JP" => 111, + "KE" => 112, + "KG" => 113, + "KH" => 114, + "KI" => 115, + "KM" => 116, + "KN" => 117, + "KP" => 118, + "KR" => 119, + "KW" => 120, + "KY" => 121, + "KZ" => 122, + "LA" => 123, + "LB" => 124, + "LC" => 125, + "LI" => 126, + "LK" => 127, + "LR" => 128, + "LS" => 129, + "LT" => 130, + "LU" => 131, + "LV" => 132, + "LY" => 133, + "MA" => 134, + "MC" => 135, + "MD" => 136, + "MG" => 137, + "MH" => 138, + "MK" => 139, + "ML" => 140, + "MM" => 141, + "MN" => 142, + "MO" => 143, + "MP" => 144, + "MQ" => 145, + "MR" => 146, + "MS" => 147, + "MT" => 148, + "MU" => 149, + "MV" => 150, + "MW" => 151, + "MX" => 152, + "MY" => 153, + "MZ" => 154, + "NA" => 155, + "NC" => 156, + "NE" => 157, + "NF" => 158, + "NG" => 159, + "NI" => 160, + "NL" => 161, + "NO" => 162, + "NP" => 163, + "NR" => 164, + "NU" => 165, + "NZ" => 166, + "OM" => 167, + "PA" => 168, + "PE" => 169, + "PF" => 170, + "PG" => 171, + "PH" => 172, + "PK" => 173, + "PL" => 174, + "PM" => 175, + "PN" => 176, + "PR" => 177, + "PS" => 178, + "PT" => 179, + "PW" => 180, + "PY" => 181, + "QA" => 182, + "RE" => 183, + "RO" => 184, + "RU" => 185, + "RW" => 186, + "SA" => 187, + "SB" => 188, + "SC" => 189, + "SD" => 190, + "SE" => 191, + "SG" => 192, + "SH" => 193, + "SI" => 194, + "SJ" => 195, + "SK" => 196, + "SL" => 197, + "SM" => 198, + "SN" => 199, + "SO" => 200, + "SR" => 201, + "ST" => 202, + "SV" => 203, + "SY" => 204, + "SZ" => 205, + "TC" => 206, + "TD" => 207, + "TF" => 208, + "TG" => 209, + "TH" => 210, + "TJ" => 211, + "TK" => 212, + "TM" => 213, + "TN" => 214, + "TO" => 215, + "TL" => 216, + "TR" => 217, + "TT" => 218, + "TV" => 219, + "TW" => 220, + "TZ" => 221, + "UA" => 222, + "UG" => 223, + "UM" => 224, + "US" => 225, + "UY" => 226, + "UZ" => 227, + "VA" => 228, + "VC" => 229, + "VE" => 230, + "VG" => 231, + "VI" => 232, + "VN" => 233, + "VU" => 234, + "WF" => 235, + "WS" => 236, + "YE" => 237, + "YT" => 238, + "RS" => 239, + "ZA" => 240, + "ZM" => 241, + "ME" => 242, + "ZW" => 243, + "A1" => 244, + "A2" => 245, + "O1" => 246, + "AX" => 247, + "GG" => 248, + "IM" => 249, + "JE" => 250, + "BL" => 251, + "MF" => 252, + "BQ" => 253, + "SS" => 254 + ); + + public $GEOIP_COUNTRY_CODES = array( + "", + "AP", + "EU", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "CW", + "AO", + "AQ", + "AR", + "AS", + "AT", + "AU", + "AW", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BM", + "BN", + "BO", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CC", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CU", + "CV", + "CX", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FM", + "FO", + "FR", + "SX", + "GA", + "GB", + "GD", + "GE", + "GF", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HM", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IN", + "IO", + "IQ", + "IR", + "IS", + "IT", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KP", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "MG", + "MH", + "MK", + "ML", + "MM", + "MN", + "MO", + "MP", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NF", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PW", + "PY", + "QA", + "RE", + "RO", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "ST", + "SV", + "SY", + "SZ", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TM", + "TN", + "TO", + "TL", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "UM", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VI", + "VN", + "VU", + "WF", + "WS", + "YE", + "YT", + "RS", + "ZA", + "ZM", + "ME", + "ZW", + "A1", + "A2", + "O1", + "AX", + "GG", + "IM", + "JE", + "BL", + "MF", + "BQ", + "SS", + "O1" + ); + + public $GEOIP_COUNTRY_CODES3 = array( + "", + "AP", + "EU", + "AND", + "ARE", + "AFG", + "ATG", + "AIA", + "ALB", + "ARM", + "CUW", + "AGO", + "ATA", + "ARG", + "ASM", + "AUT", + "AUS", + "ABW", + "AZE", + "BIH", + "BRB", + "BGD", + "BEL", + "BFA", + "BGR", + "BHR", + "BDI", + "BEN", + "BMU", + "BRN", + "BOL", + "BRA", + "BHS", + "BTN", + "BVT", + "BWA", + "BLR", + "BLZ", + "CAN", + "CCK", + "COD", + "CAF", + "COG", + "CHE", + "CIV", + "COK", + "CHL", + "CMR", + "CHN", + "COL", + "CRI", + "CUB", + "CPV", + "CXR", + "CYP", + "CZE", + "DEU", + "DJI", + "DNK", + "DMA", + "DOM", + "DZA", + "ECU", + "EST", + "EGY", + "ESH", + "ERI", + "ESP", + "ETH", + "FIN", + "FJI", + "FLK", + "FSM", + "FRO", + "FRA", + "SXM", + "GAB", + "GBR", + "GRD", + "GEO", + "GUF", + "GHA", + "GIB", + "GRL", + "GMB", + "GIN", + "GLP", + "GNQ", + "GRC", + "SGS", + "GTM", + "GUM", + "GNB", + "GUY", + "HKG", + "HMD", + "HND", + "HRV", + "HTI", + "HUN", + "IDN", + "IRL", + "ISR", + "IND", + "IOT", + "IRQ", + "IRN", + "ISL", + "ITA", + "JAM", + "JOR", + "JPN", + "KEN", + "KGZ", + "KHM", + "KIR", + "COM", + "KNA", + "PRK", + "KOR", + "KWT", + "CYM", + "KAZ", + "LAO", + "LBN", + "LCA", + "LIE", + "LKA", + "LBR", + "LSO", + "LTU", + "LUX", + "LVA", + "LBY", + "MAR", + "MCO", + "MDA", + "MDG", + "MHL", + "MKD", + "MLI", + "MMR", + "MNG", + "MAC", + "MNP", + "MTQ", + "MRT", + "MSR", + "MLT", + "MUS", + "MDV", + "MWI", + "MEX", + "MYS", + "MOZ", + "NAM", + "NCL", + "NER", + "NFK", + "NGA", + "NIC", + "NLD", + "NOR", + "NPL", + "NRU", + "NIU", + "NZL", + "OMN", + "PAN", + "PER", + "PYF", + "PNG", + "PHL", + "PAK", + "POL", + "SPM", + "PCN", + "PRI", + "PSE", + "PRT", + "PLW", + "PRY", + "QAT", + "REU", + "ROU", + "RUS", + "RWA", + "SAU", + "SLB", + "SYC", + "SDN", + "SWE", + "SGP", + "SHN", + "SVN", + "SJM", + "SVK", + "SLE", + "SMR", + "SEN", + "SOM", + "SUR", + "STP", + "SLV", + "SYR", + "SWZ", + "TCA", + "TCD", + "ATF", + "TGO", + "THA", + "TJK", + "TKL", + "TKM", + "TUN", + "TON", + "TLS", + "TUR", + "TTO", + "TUV", + "TWN", + "TZA", + "UKR", + "UGA", + "UMI", + "USA", + "URY", + "UZB", + "VAT", + "VCT", + "VEN", + "VGB", + "VIR", + "VNM", + "VUT", + "WLF", + "WSM", + "YEM", + "MYT", + "SRB", + "ZAF", + "ZMB", + "MNE", + "ZWE", + "A1", + "A2", + "O1", + "ALA", + "GGY", + "IMN", + "JEY", + "BLM", + "MAF", + "BES", + "SSD", + "O1" + ); + + public $GEOIP_COUNTRY_NAMES = array( + "", + "Asia/Pacific Region", + "Europe", + "Andorra", + "United Arab Emirates", + "Afghanistan", + "Antigua and Barbuda", + "Anguilla", + "Albania", + "Armenia", + "Curacao", + "Angola", + "Antarctica", + "Argentina", + "American Samoa", + "Austria", + "Australia", + "Aruba", + "Azerbaijan", + "Bosnia and Herzegovina", + "Barbados", + "Bangladesh", + "Belgium", + "Burkina Faso", + "Bulgaria", + "Bahrain", + "Burundi", + "Benin", + "Bermuda", + "Brunei Darussalam", + "Bolivia", + "Brazil", + "Bahamas", + "Bhutan", + "Bouvet Island", + "Botswana", + "Belarus", + "Belize", + "Canada", + "Cocos (Keeling) Islands", + "Congo, The Democratic Republic of the", + "Central African Republic", + "Congo", + "Switzerland", + "Cote D'Ivoire", + "Cook Islands", + "Chile", + "Cameroon", + "China", + "Colombia", + "Costa Rica", + "Cuba", + "Cape Verde", + "Christmas Island", + "Cyprus", + "Czech Republic", + "Germany", + "Djibouti", + "Denmark", + "Dominica", + "Dominican Republic", + "Algeria", + "Ecuador", + "Estonia", + "Egypt", + "Western Sahara", + "Eritrea", + "Spain", + "Ethiopia", + "Finland", + "Fiji", + "Falkland Islands (Malvinas)", + "Micronesia, Federated States of", + "Faroe Islands", + "France", + "Sint Maarten (Dutch part)", + "Gabon", + "United Kingdom", + "Grenada", + "Georgia", + "French Guiana", + "Ghana", + "Gibraltar", + "Greenland", + "Gambia", + "Guinea", + "Guadeloupe", + "Equatorial Guinea", + "Greece", + "South Georgia and the South Sandwich Islands", + "Guatemala", + "Guam", + "Guinea-Bissau", + "Guyana", + "Hong Kong", + "Heard Island and McDonald Islands", + "Honduras", + "Croatia", + "Haiti", + "Hungary", + "Indonesia", + "Ireland", + "Israel", + "India", + "British Indian Ocean Territory", + "Iraq", + "Iran, Islamic Republic of", + "Iceland", + "Italy", + "Jamaica", + "Jordan", + "Japan", + "Kenya", + "Kyrgyzstan", + "Cambodia", + "Kiribati", + "Comoros", + "Saint Kitts and Nevis", + "Korea, Democratic People's Republic of", + "Korea, Republic of", + "Kuwait", + "Cayman Islands", + "Kazakhstan", + "Lao People's Democratic Republic", + "Lebanon", + "Saint Lucia", + "Liechtenstein", + "Sri Lanka", + "Liberia", + "Lesotho", + "Lithuania", + "Luxembourg", + "Latvia", + "Libya", + "Morocco", + "Monaco", + "Moldova, Republic of", + "Madagascar", + "Marshall Islands", + "Macedonia", + "Mali", + "Myanmar", + "Mongolia", + "Macau", + "Northern Mariana Islands", + "Martinique", + "Mauritania", + "Montserrat", + "Malta", + "Mauritius", + "Maldives", + "Malawi", + "Mexico", + "Malaysia", + "Mozambique", + "Namibia", + "New Caledonia", + "Niger", + "Norfolk Island", + "Nigeria", + "Nicaragua", + "Netherlands", + "Norway", + "Nepal", + "Nauru", + "Niue", + "New Zealand", + "Oman", + "Panama", + "Peru", + "French Polynesia", + "Papua New Guinea", + "Philippines", + "Pakistan", + "Poland", + "Saint Pierre and Miquelon", + "Pitcairn Islands", + "Puerto Rico", + "Palestinian Territory", + "Portugal", + "Palau", + "Paraguay", + "Qatar", + "Reunion", + "Romania", + "Russian Federation", + "Rwanda", + "Saudi Arabia", + "Solomon Islands", + "Seychelles", + "Sudan", + "Sweden", + "Singapore", + "Saint Helena", + "Slovenia", + "Svalbard and Jan Mayen", + "Slovakia", + "Sierra Leone", + "San Marino", + "Senegal", + "Somalia", + "Suriname", + "Sao Tome and Principe", + "El Salvador", + "Syrian Arab Republic", + "Swaziland", + "Turks and Caicos Islands", + "Chad", + "French Southern Territories", + "Togo", + "Thailand", + "Tajikistan", + "Tokelau", + "Turkmenistan", + "Tunisia", + "Tonga", + "Timor-Leste", + "Turkey", + "Trinidad and Tobago", + "Tuvalu", + "Taiwan", + "Tanzania, United Republic of", + "Ukraine", + "Uganda", + "United States Minor Outlying Islands", + "United States", + "Uruguay", + "Uzbekistan", + "Holy See (Vatican City State)", + "Saint Vincent and the Grenadines", + "Venezuela", + "Virgin Islands, British", + "Virgin Islands, U.S.", + "Vietnam", + "Vanuatu", + "Wallis and Futuna", + "Samoa", + "Yemen", + "Mayotte", + "Serbia", + "South Africa", + "Zambia", + "Montenegro", + "Zimbabwe", + "Anonymous Proxy", + "Satellite Provider", + "Other", + "Aland Islands", + "Guernsey", + "Isle of Man", + "Jersey", + "Saint Barthelemy", + "Saint Martin", + "Bonaire, Saint Eustatius and Saba", + "South Sudan", + "Other" + ); + + public $GEOIP_CONTINENT_CODES = array( + "--", + "AS", + "EU", + "EU", + "AS", + "AS", + "NA", + "NA", + "EU", + "AS", + "NA", + "AF", + "AN", + "SA", + "OC", + "EU", + "OC", + "NA", + "AS", + "EU", + "NA", + "AS", + "EU", + "AF", + "EU", + "AS", + "AF", + "AF", + "NA", + "AS", + "SA", + "SA", + "NA", + "AS", + "AN", + "AF", + "EU", + "NA", + "NA", + "AS", + "AF", + "AF", + "AF", + "EU", + "AF", + "OC", + "SA", + "AF", + "AS", + "SA", + "NA", + "NA", + "AF", + "AS", + "AS", + "EU", + "EU", + "AF", + "EU", + "NA", + "NA", + "AF", + "SA", + "EU", + "AF", + "AF", + "AF", + "EU", + "AF", + "EU", + "OC", + "SA", + "OC", + "EU", + "EU", + "NA", + "AF", + "EU", + "NA", + "AS", + "SA", + "AF", + "EU", + "NA", + "AF", + "AF", + "NA", + "AF", + "EU", + "AN", + "NA", + "OC", + "AF", + "SA", + "AS", + "AN", + "NA", + "EU", + "NA", + "EU", + "AS", + "EU", + "AS", + "AS", + "AS", + "AS", + "AS", + "EU", + "EU", + "NA", + "AS", + "AS", + "AF", + "AS", + "AS", + "OC", + "AF", + "NA", + "AS", + "AS", + "AS", + "NA", + "AS", + "AS", + "AS", + "NA", + "EU", + "AS", + "AF", + "AF", + "EU", + "EU", + "EU", + "AF", + "AF", + "EU", + "EU", + "AF", + "OC", + "EU", + "AF", + "AS", + "AS", + "AS", + "OC", + "NA", + "AF", + "NA", + "EU", + "AF", + "AS", + "AF", + "NA", + "AS", + "AF", + "AF", + "OC", + "AF", + "OC", + "AF", + "NA", + "EU", + "EU", + "AS", + "OC", + "OC", + "OC", + "AS", + "NA", + "SA", + "OC", + "OC", + "AS", + "AS", + "EU", + "NA", + "OC", + "NA", + "AS", + "EU", + "OC", + "SA", + "AS", + "AF", + "EU", + "EU", + "AF", + "AS", + "OC", + "AF", + "AF", + "EU", + "AS", + "AF", + "EU", + "EU", + "EU", + "AF", + "EU", + "AF", + "AF", + "SA", + "AF", + "NA", + "AS", + "AF", + "NA", + "AF", + "AN", + "AF", + "AS", + "AS", + "OC", + "AS", + "AF", + "OC", + "AS", + "EU", + "NA", + "OC", + "AS", + "AF", + "EU", + "AF", + "OC", + "NA", + "SA", + "AS", + "EU", + "NA", + "SA", + "NA", + "NA", + "AS", + "OC", + "OC", + "OC", + "AS", + "AF", + "EU", + "AF", + "AF", + "EU", + "AF", + "--", + "--", + "--", + "EU", + "EU", + "EU", + "EU", + "NA", + "NA", + "NA", + "AF", + "--" + ); +} + +function geoip_load_shared_mem($file) +{ + $fp = fopen($file, "rb"); + if (!$fp) { + print "error opening $file: $php_errormsg\n"; + exit; + } + $s_array = fstat($fp); + $size = $s_array['size']; + if (($shmid = @shmop_open(GEOIP_SHM_KEY, "w", 0, 0))) { + shmop_delete($shmid); + shmop_close($shmid); + } + $shmid = shmop_open(GEOIP_SHM_KEY, "c", 0644, $size); + shmop_write($shmid, fread($fp, $size), 0); + shmop_close($shmid); +} + +function _setup_segments($gi) +{ + $gi->databaseType = GEOIP_COUNTRY_EDITION; + $gi->record_length = STANDARD_RECORD_LENGTH; + if ($gi->flags & GEOIP_SHARED_MEMORY) { + $offset = @shmop_size($gi->shmid) - 3; + for ($i = 0; $i < STRUCTURE_INFO_MAX_SIZE; $i++) { + $delim = @shmop_read($gi->shmid, $offset, 3); + $offset += 3; + if ($delim == (chr(255) . chr(255) . chr(255))) { + $gi->databaseType = ord(@shmop_read($gi->shmid, $offset, 1)); + if ($gi->databaseType >= 106) { + $gi->databaseType -= 105; + } + $offset++; + + if ($gi->databaseType == GEOIP_REGION_EDITION_REV0) { + $gi->databaseSegments = GEOIP_STATE_BEGIN_REV0; + } elseif ($gi->databaseType == GEOIP_REGION_EDITION_REV1) { + $gi->databaseSegments = GEOIP_STATE_BEGIN_REV1; + } elseif (($gi->databaseType == GEOIP_CITY_EDITION_REV0) + || ($gi->databaseType == GEOIP_CITY_EDITION_REV1) + || ($gi->databaseType == GEOIP_ORG_EDITION) + || ($gi->databaseType == GEOIP_ORG_EDITION_V6) + || ($gi->databaseType == GEOIP_DOMAIN_EDITION) + || ($gi->databaseType == GEOIP_DOMAIN_EDITION_V6) + || ($gi->databaseType == GEOIP_ISP_EDITION) + || ($gi->databaseType == GEOIP_ISP_EDITION_V6) + || ($gi->databaseType == GEOIP_USERTYPE_EDITION) + || ($gi->databaseType == GEOIP_USERTYPE_EDITION_V6) + || ($gi->databaseType == GEOIP_LOCATIONA_EDITION) + || ($gi->databaseType == GEOIP_ACCURACYRADIUS_EDITION) + || ($gi->databaseType == GEOIP_CITY_EDITION_REV0_V6) + || ($gi->databaseType == GEOIP_CITY_EDITION_REV1_V6) + || ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1) + || ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1_V6) + || ($gi->databaseType == GEOIP_ASNUM_EDITION) + || ($gi->databaseType == GEOIP_ASNUM_EDITION_V6) + ) { + $gi->databaseSegments = 0; + $buf = @shmop_read($gi->shmid, $offset, SEGMENT_RECORD_LENGTH); + for ($j = 0; $j < SEGMENT_RECORD_LENGTH; $j++) { + $gi->databaseSegments += (ord($buf[$j]) << ($j * 8)); + } + if (($gi->databaseType == GEOIP_ORG_EDITION) + || ($gi->databaseType == GEOIP_ORG_EDITION_V6) + || ($gi->databaseType == GEOIP_DOMAIN_EDITION) + || ($gi->databaseType == GEOIP_DOMAIN_EDITION_V6) + || ($gi->databaseType == GEOIP_ISP_EDITION) + || ($gi->databaseType == GEOIP_ISP_EDITION_V6) + ) { + $gi->record_length = ORG_RECORD_LENGTH; + } + } + break; + } else { + $offset -= 4; + } + } + if (($gi->databaseType == GEOIP_COUNTRY_EDITION) || + ($gi->databaseType == GEOIP_COUNTRY_EDITION_V6) || + ($gi->databaseType == GEOIP_PROXY_EDITION) || + ($gi->databaseType == GEOIP_NETSPEED_EDITION) + ) { + $gi->databaseSegments = GEOIP_COUNTRY_BEGIN; + } + } else { + $filepos = ftell($gi->filehandle); + fseek($gi->filehandle, -3, SEEK_END); + for ($i = 0; $i < STRUCTURE_INFO_MAX_SIZE; $i++) { + $delim = fread($gi->filehandle, 3); + if ($delim == (chr(255) . chr(255) . chr(255))) { + $gi->databaseType = ord(fread($gi->filehandle, 1)); + if ($gi->databaseType >= 106) { + $gi->databaseType -= 105; + } + if ($gi->databaseType == GEOIP_REGION_EDITION_REV0) { + $gi->databaseSegments = GEOIP_STATE_BEGIN_REV0; + } elseif ($gi->databaseType == GEOIP_REGION_EDITION_REV1) { + $gi->databaseSegments = GEOIP_STATE_BEGIN_REV1; + } elseif (($gi->databaseType == GEOIP_CITY_EDITION_REV0) + || ($gi->databaseType == GEOIP_CITY_EDITION_REV1) + || ($gi->databaseType == GEOIP_CITY_EDITION_REV0_V6) + || ($gi->databaseType == GEOIP_CITY_EDITION_REV1_V6) + || ($gi->databaseType == GEOIP_ORG_EDITION) + || ($gi->databaseType == GEOIP_DOMAIN_EDITION) + || ($gi->databaseType == GEOIP_ISP_EDITION) + || ($gi->databaseType == GEOIP_ORG_EDITION_V6) + || ($gi->databaseType == GEOIP_DOMAIN_EDITION_V6) + || ($gi->databaseType == GEOIP_ISP_EDITION_V6) + || ($gi->databaseType == GEOIP_LOCATIONA_EDITION) + || ($gi->databaseType == GEOIP_ACCURACYRADIUS_EDITION) + || ($gi->databaseType == GEOIP_CITY_EDITION_REV0_V6) + || ($gi->databaseType == GEOIP_CITY_EDITION_REV1_V6) + || ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1) + || ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1_V6) + || ($gi->databaseType == GEOIP_USERTYPE_EDITION) + || ($gi->databaseType == GEOIP_USERTYPE_EDITION_V6) + || ($gi->databaseType == GEOIP_ASNUM_EDITION) + || ($gi->databaseType == GEOIP_ASNUM_EDITION_V6) + ) { + $gi->databaseSegments = 0; + $buf = fread($gi->filehandle, SEGMENT_RECORD_LENGTH); + for ($j = 0; $j < SEGMENT_RECORD_LENGTH; $j++) { + $gi->databaseSegments += (ord($buf[$j]) << ($j * 8)); + } + if (($gi->databaseType == GEOIP_ORG_EDITION) + || ($gi->databaseType == GEOIP_DOMAIN_EDITION) + || ($gi->databaseType == GEOIP_ISP_EDITION) + || ($gi->databaseType == GEOIP_ORG_EDITION_V6) + || ($gi->databaseType == GEOIP_DOMAIN_EDITION_V6) + || ($gi->databaseType == GEOIP_ISP_EDITION_V6) + ) { + $gi->record_length = ORG_RECORD_LENGTH; + } + } + break; + } else { + fseek($gi->filehandle, -4, SEEK_CUR); + } + } + if (($gi->databaseType == GEOIP_COUNTRY_EDITION) || + ($gi->databaseType == GEOIP_COUNTRY_EDITION_V6) || + ($gi->databaseType == GEOIP_PROXY_EDITION) || + ($gi->databaseType == GEOIP_NETSPEED_EDITION) + ) { + $gi->databaseSegments = GEOIP_COUNTRY_BEGIN; + } + fseek($gi->filehandle, $filepos, SEEK_SET); + } + return $gi; +} + +function geoip_open($filename, $flags) +{ + $gi = new GeoIP; + $gi->flags = $flags; + if ($gi->flags & GEOIP_SHARED_MEMORY) { + $gi->shmid = @shmop_open(GEOIP_SHM_KEY, "a", 0, 0); + } else { + $gi->filehandle = fopen($filename, "rb") or trigger_error("GeoIP API: Can not open $filename\n", E_USER_ERROR); + if ($gi->flags & GEOIP_MEMORY_CACHE) { + $s_array = fstat($gi->filehandle); + $gi->memory_buffer = fread($gi->filehandle, $s_array['size']); + } + } + + $gi = _setup_segments($gi); + return $gi; +} + +function geoip_close($gi) +{ + if ($gi->flags & GEOIP_SHARED_MEMORY) { + return true; + } + + return fclose($gi->filehandle); +} + +function geoip_country_id_by_name_v6($gi, $name) +{ + $rec = dns_get_record($name, DNS_AAAA); + if (!$rec) { + return false; + } + $addr = $rec[0]["ipv6"]; + if (!$addr || $addr == $name) { + return false; + } + return geoip_country_id_by_addr_v6($gi, $addr); +} + +function geoip_country_id_by_name($gi, $name) +{ + $addr = gethostbyname($name); + if (!$addr || $addr == $name) { + return false; + } + return geoip_country_id_by_addr($gi, $addr); +} + +function geoip_country_code_by_name_v6($gi, $name) +{ + $country_id = geoip_country_id_by_name_v6($gi, $name); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_CODES[$country_id]; + } + return false; +} + +function geoip_country_code_by_name($gi, $name) +{ + $country_id = geoip_country_id_by_name($gi, $name); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_CODES[$country_id]; + } + return false; +} + +function geoip_country_name_by_name_v6($gi, $name) +{ + $country_id = geoip_country_id_by_name_v6($gi, $name); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_NAMES[$country_id]; + } + return false; +} + +function geoip_country_name_by_name($gi, $name) +{ + $country_id = geoip_country_id_by_name($gi, $name); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_NAMES[$country_id]; + } + return false; +} + +function geoip_country_id_by_addr_v6($gi, $addr) +{ + $ipnum = inet_pton($addr); + return _geoip_seek_country_v6($gi, $ipnum) - GEOIP_COUNTRY_BEGIN; +} + +function geoip_country_id_by_addr($gi, $addr) +{ + $ipnum = ip2long($addr); + return _geoip_seek_country($gi, $ipnum) - GEOIP_COUNTRY_BEGIN; +} + +function geoip_country_code_by_addr_v6($gi, $addr) +{ + $country_id = geoip_country_id_by_addr_v6($gi, $addr); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_CODES[$country_id]; + } + return false; +} + +function geoip_country_code_by_addr($gi, $addr) +{ + if ($gi->databaseType == GEOIP_CITY_EDITION_REV1) { + $record = geoip_record_by_addr($gi, $addr); + if ($record !== false) { + return $record->country_code; + } + } else { + $country_id = geoip_country_id_by_addr($gi, $addr); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_CODES[$country_id]; + } + } + return false; +} + +function geoip_country_name_by_addr_v6($gi, $addr) +{ + $country_id = geoip_country_id_by_addr_v6($gi, $addr); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_NAMES[$country_id]; + } + return false; +} + +function geoip_country_name_by_addr($gi, $addr) +{ + if ($gi->databaseType == GEOIP_CITY_EDITION_REV1) { + $record = geoip_record_by_addr($gi, $addr); + return $record->country_name; + } else { + $country_id = geoip_country_id_by_addr($gi, $addr); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_NAMES[$country_id]; + } + } + return false; +} + +function _geoip_seek_country_v6($gi, $ipnum) +{ + # arrays from unpack start with offset 1 + # yet another php mystery. array_merge work around + # this broken behaviour + $v6vec = array_merge(unpack("C16", $ipnum)); + + $offset = 0; + for ($depth = 127; $depth >= 0; --$depth) { + if ($gi->flags & GEOIP_MEMORY_CACHE) { + $buf = _safe_substr( + $gi->memory_buffer, + 2 * $gi->record_length * $offset, + 2 * $gi->record_length + ); + } elseif ($gi->flags & GEOIP_SHARED_MEMORY) { + $buf = @shmop_read( + $gi->shmid, + 2 * $gi->record_length * $offset, + 2 * $gi->record_length + ); + } else { + fseek($gi->filehandle, 2 * $gi->record_length * $offset, SEEK_SET) == 0 + or trigger_error("GeoIP API: fseek failed", E_USER_ERROR); + $buf = fread($gi->filehandle, 2 * $gi->record_length); + } + $x = array(0, 0); + for ($i = 0; $i < 2; ++$i) { + for ($j = 0; $j < $gi->record_length; ++$j) { + $x[$i] += ord($buf[$gi->record_length * $i + $j]) << ($j * 8); + } + } + + $bnum = 127 - $depth; + $idx = $bnum >> 3; + $b_mask = 1 << ($bnum & 7 ^ 7); + if (($v6vec[$idx] & $b_mask) > 0) { + if ($x[1] >= $gi->databaseSegments) { + return $x[1]; + } + $offset = $x[1]; + } else { + if ($x[0] >= $gi->databaseSegments) { + return $x[0]; + } + $offset = $x[0]; + } + } + trigger_error("GeoIP API: Error traversing database - perhaps it is corrupt?", E_USER_ERROR); + return false; +} + +function _geoip_seek_country($gi, $ipnum) +{ + $offset = 0; + for ($depth = 31; $depth >= 0; --$depth) { + if ($gi->flags & GEOIP_MEMORY_CACHE) { + $buf = _safe_substr( + $gi->memory_buffer, + 2 * $gi->record_length * $offset, + 2 * $gi->record_length + ); + } elseif ($gi->flags & GEOIP_SHARED_MEMORY) { + $buf = @shmop_read( + $gi->shmid, + 2 * $gi->record_length * $offset, + 2 * $gi->record_length + ); + } else { + fseek($gi->filehandle, 2 * $gi->record_length * $offset, SEEK_SET) == 0 + or trigger_error("GeoIP API: fseek failed", E_USER_ERROR); + $buf = fread($gi->filehandle, 2 * $gi->record_length); + } + $x = array(0, 0); + for ($i = 0; $i < 2; ++$i) { + for ($j = 0; $j < $gi->record_length; ++$j) { + $x[$i] += ord($buf[$gi->record_length * $i + $j]) << ($j * 8); + } + } + if ($ipnum & (1 << $depth)) { + if ($x[1] >= $gi->databaseSegments) { + return $x[1]; + } + $offset = $x[1]; + } else { + if ($x[0] >= $gi->databaseSegments) { + return $x[0]; + } + $offset = $x[0]; + } + } + trigger_error("GeoIP API: Error traversing database - perhaps it is corrupt?", E_USER_ERROR); + return false; +} + +function _common_get_org($gi, $seek_org) +{ + $record_pointer = $seek_org + (2 * $gi->record_length - 1) * $gi->databaseSegments; + if ($gi->flags & GEOIP_SHARED_MEMORY) { + $org_buf = @shmop_read($gi->shmid, $record_pointer, MAX_ORG_RECORD_LENGTH); + } else { + fseek($gi->filehandle, $record_pointer, SEEK_SET); + $org_buf = fread($gi->filehandle, MAX_ORG_RECORD_LENGTH); + } + $org_buf = _safe_substr($org_buf, 0, strpos($org_buf, "\0")); + return $org_buf; +} + +function _get_org_v6($gi, $ipnum) +{ + $seek_org = _geoip_seek_country_v6($gi, $ipnum); + if ($seek_org == $gi->databaseSegments) { + return null; + } + return _common_get_org($gi, $seek_org); +} + +function _get_org($gi, $ipnum) +{ + $seek_org = _geoip_seek_country($gi, $ipnum); + if ($seek_org == $gi->databaseSegments) { + return null; + } + return _common_get_org($gi, $seek_org); +} + + +function geoip_name_by_addr_v6($gi, $addr) +{ + if ($addr == null) { + return 0; + } + $ipnum = inet_pton($addr); + return _get_org_v6($gi, $ipnum); +} + +function geoip_name_by_addr($gi, $addr) +{ + if ($addr == null) { + return 0; + } + $ipnum = ip2long($addr); + return _get_org($gi, $ipnum); +} + +function geoip_org_by_addr($gi, $addr) +{ + return geoip_name_by_addr($gi, $addr); +} + +function _get_region($gi, $ipnum) +{ + if ($gi->databaseType == GEOIP_REGION_EDITION_REV0) { + $seek_region = _geoip_seek_country($gi, $ipnum) - GEOIP_STATE_BEGIN_REV0; + if ($seek_region >= 1000) { + $country_code = "US"; + $region = chr(($seek_region - 1000) / 26 + 65) . chr(($seek_region - 1000) % 26 + 65); + } else { + $country_code = $gi->GEOIP_COUNTRY_CODES[$seek_region]; + $region = ""; + } + return array($country_code, $region); + } elseif ($gi->databaseType == GEOIP_REGION_EDITION_REV1) { + $seek_region = _geoip_seek_country($gi, $ipnum) - GEOIP_STATE_BEGIN_REV1; + if ($seek_region < US_OFFSET) { + $country_code = ""; + $region = ""; + } elseif ($seek_region < CANADA_OFFSET) { + $country_code = "US"; + $region = chr(($seek_region - US_OFFSET) / 26 + 65) . chr(($seek_region - US_OFFSET) % 26 + 65); + } elseif ($seek_region < WORLD_OFFSET) { + $country_code = "CA"; + $region = chr(($seek_region - CANADA_OFFSET) / 26 + 65) . chr(($seek_region - CANADA_OFFSET) % 26 + 65); + } else { + $country_code = $gi->GEOIP_COUNTRY_CODES[($seek_region - WORLD_OFFSET) / FIPS_RANGE]; + $region = ""; + } + return array($country_code, $region); + } +} + +function geoip_region_by_addr($gi, $addr) +{ + if ($addr == null) { + return 0; + } + $ipnum = ip2long($addr); + return _get_region($gi, $ipnum); +} + +function _safe_substr($string, $start, $length) +{ + // workaround php's broken substr, strpos, etc handling with + // mbstring.func_overload and mbstring.internal_encoding + $mbExists = extension_loaded('mbstring'); + + if ($mbExists) { + $enc = mb_internal_encoding(); + mb_internal_encoding('ISO-8859-1'); + } + + $buf = substr($string, $start, $length); + + if ($mbExists) { + mb_internal_encoding($enc); + } + + return $buf; +} From f820905327f75f64fcf3e21d61760ce1b2baa487 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 23 Dec 2014 18:50:05 +0000 Subject: [PATCH 497/743] Handle geolocation option --- includes/wc-core-functions.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/wc-core-functions.php b/includes/wc-core-functions.php index 3caef064950..c112c95b0e1 100644 --- a/includes/wc-core-functions.php +++ b/includes/wc-core-functions.php @@ -720,10 +720,12 @@ function wc_get_base_location() { function wc_get_customer_default_location() { switch ( get_option( 'woocommerce_default_customer_address' ) ) { case 'geolocation' : - $location = array( - 'country' => 'DK', - 'state' => '' - ); + $location = WC_Geolocation::geolocate_ip( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'] ); + + // Base fallback + if ( empty( $location['country'] ) ) { + $location = wc_format_country_state_string( apply_filters( 'woocommerce_customer_default_location', get_option( 'woocommerce_default_country' ) ) ); + } break; case 'base' : $location = wc_format_country_state_string( apply_filters( 'woocommerce_customer_default_location', get_option( 'woocommerce_default_country' ) ) ); From 56c752ed2282f12306d113b78004e56f6238a199 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 23 Dec 2014 18:50:20 +0000 Subject: [PATCH 498/743] Include geolocation class --- woocommerce.php | 1 + 1 file changed, 1 insertion(+) diff --git a/woocommerce.php b/woocommerce.php index e2b6df10b0c..a41fdf4b1ca 100644 --- a/woocommerce.php +++ b/woocommerce.php @@ -202,6 +202,7 @@ final class WooCommerce { include_once( 'includes/wc-widget-functions.php' ); include_once( 'includes/wc-webhook-functions.php' ); include_once( 'includes/class-wc-install.php' ); + include_once( 'includes/class-wc-geolocation.php' ); include_once( 'includes/class-wc-download-handler.php' ); include_once( 'includes/class-wc-comments.php' ); include_once( 'includes/class-wc-post-data.php' ); From 4e8e90a8de45ca17c790ead9dec5e31a8fbee602 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 23 Dec 2014 22:03:10 +0000 Subject: [PATCH 499/743] Support dev environment --- includes/class-wc-geolocation.php | 120 +++++++++++++++++++++--------- includes/wc-core-functions.php | 2 +- 2 files changed, 87 insertions(+), 35 deletions(-) diff --git a/includes/class-wc-geolocation.php b/includes/class-wc-geolocation.php index bbfb28695a8..2a369d4675e 100644 --- a/includes/class-wc-geolocation.php +++ b/includes/class-wc-geolocation.php @@ -31,20 +31,97 @@ class WC_Geolocation { add_action( 'woocommerce_geoip_updater', array( __CLASS__, 'update_database' ) ); } + /** + * Get current user IP Address + * @return string + */ + public static function get_ip_address() { + return isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; + } + + /** + * Get user IP Address using a service + * @return string + */ + public static function get_external_ip_address() { + $transient_name = 'external_ip_address_' . self::get_ip_address(); + $external_ip_address = get_transient( $transient_name ); + + if ( false === $external_ip_address ) { + $external_ip_address = '0.0.0.0'; + $ip_lookup_services = array( + 'http://ipv4.icanhazip.com', + 'http://api.ipify.org/', + 'http://ipecho.net/plain', + 'http://v4.ident.me', + 'http://bot.whatismyipaddress.com', + 'http://ip.appspot.com', + ); + + shuffle( $ip_lookup_services ); + + foreach ( $ip_lookup_services as $service ) { + $response = wp_remote_get( $service, array( 'timeout' => 2 ) ); + + if ( ! is_wp_error( $response ) && $response['body'] ) { + $external_ip_address = $response['body']; + break; + } + } + + set_transient( $transient_name, $external_ip_address, WEEK_IN_SECONDS ); + } + + return $external_ip_address; + } + + /** + * Geolocate an IP address + * @param string $ip_address + * @return array + */ + public static function geolocate_ip( $ip_address = '' ) { + $ip_address = $ip_address ? $ip_address : self::get_ip_address(); + $database = self::get_local_database_path(); + + if ( file_exists( $database ) ) { + $country_code = self::geolite_geolocation( $ip_address ); + } else { + $country_code = self::freegeoip_geolocation( $ip_address ); + } + + if ( ! $country_code ) { + // May be a local environment - find external IP + return self::geolocate_ip( self::get_external_ip_address() ); + } + + return array( + 'country' => $country_code, + 'state' => '' + ); + } + + /** + * Path to our local db + * @return string + */ + private static function get_local_database_path() { + $upload_dir = wp_upload_dir(); + return $upload_dir['basedir'] . '/GeoIP.dat'; + } + /** * Update geoip database. Adapted from https://wordpress.org/plugins/geoip-detect/. */ public static function update_database() { require_once( ABSPATH . 'wp-admin/includes/file.php' ); - $upload_dir = wp_upload_dir(); - $database = $upload_dir['basedir'] . '/GeoIP.dat'; $tmp_database = download_url( self::GEOLITE_DB ); $logger = new WC_Logger(); if ( ! is_wp_error( $tmp_database ) ) { $gzhandle = @gzopen( $tmp_database, 'r' ); - $handle = @fopen( $database, 'w' ); + $handle = @fopen( self::get_local_database_path(), 'w' ); if ( $gzhandle && $handle ) { while ( ( $string = gzread( $gzhandle, 4096 ) ) != false ) { @@ -55,50 +132,25 @@ class WC_Geolocation { } else { $logger->add( 'geolocation', 'Unable to open database file' ); } - @unlink( $tmp_database ); } else { $logger->add( 'geolocation', 'Unable to download GeoIP Database: ' . $tmp_database->get_message() ); } } - /** - * Geolocation an IP address - * @param string $ip_address - * @return array - */ - public static function geolocate_ip( $ip_address ) { - $country_code = self::geolite_geolocation( $ip_address ); - - // Fallback to API - if ( empty( $country_code ) ) { - $country_code = self::freegeoip_geolocation( $ip_address ); - } - - return array( - 'country' => $country_code, - 'state' => '' - ); - } - /** * Use MAXMIND GeoLite database to geolocation the user. * @param string $ip_address * @return string */ private static function geolite_geolocation( $ip_address ) { - $country_code = ''; - $upload_dir = wp_upload_dir(); - $database = $upload_dir['basedir'] . '/GeoIP.dat'; - - if ( file_exists( $database ) ) { - if ( ! class_exists( 'GeoIP' ) ) { - include_once( 'libraries/geoip.php' ); - } - $gi = geoip_open( $database, GEOIP_STANDARD ); - $country_code = geoip_country_code_by_addr( $gi, $ip_address ); - geoip_close( $gi ); + if ( ! class_exists( 'GeoIP' ) ) { + include_once( 'libraries/geoip.php' ); } + $database = self::get_local_database_path(); + $gi = geoip_open( $database, GEOIP_STANDARD ); + $country_code = geoip_country_code_by_addr( $gi, $ip_address ); + geoip_close( $gi ); return $country_code; } diff --git a/includes/wc-core-functions.php b/includes/wc-core-functions.php index c112c95b0e1..124fd950ea7 100644 --- a/includes/wc-core-functions.php +++ b/includes/wc-core-functions.php @@ -720,7 +720,7 @@ function wc_get_base_location() { function wc_get_customer_default_location() { switch ( get_option( 'woocommerce_default_customer_address' ) ) { case 'geolocation' : - $location = WC_Geolocation::geolocate_ip( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'] ); + $location = WC_Geolocation::geolocate_ip(); // Base fallback if ( empty( $location['country'] ) ) { From 896ccb1b88215bef16256b973d2ecfa3d2c5600e Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 23 Dec 2014 22:07:27 +0000 Subject: [PATCH 500/743] Force taxes to display/calculate for customer location --- includes/class-wc-tax.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-wc-tax.php b/includes/class-wc-tax.php index 2411249002f..691f9c993f1 100644 --- a/includes/class-wc-tax.php +++ b/includes/class-wc-tax.php @@ -337,9 +337,9 @@ class WC_Tax { public static function get_tax_location( $tax_class = '' ) { $location = array(); - if ( defined( 'WOOCOMMERCE_CHECKOUT' ) || ( ! empty( WC()->customer ) && WC()->customer->has_calculated_shipping() ) ) { + if ( ! empty( WC()->customer ) ) { $location = WC()->customer->get_taxable_address(); - } elseif ( wc_prices_include_tax() || get_option( 'woocommerce_default_customer_address' ) == 'base' ) { + } elseif ( wc_prices_include_tax() || 'base' === get_option( 'woocommerce_default_customer_address' ) ) { $location = array( WC()->countries->get_base_country(), WC()->countries->get_base_state(), From 79ba6bc31e6de505aa7f9675e8dc667686658b36 Mon Sep 17 00:00:00 2001 From: Brandon Hubbard Date: Fri, 26 Dec 2014 09:44:38 -0800 Subject: [PATCH 501/743] Added support for several Jetpack Features * Added support for publicize and markdown editor for products * Added support for product results in Omniseaarch https://www.evernote.com/shard/s1/sh/f47adc63-2aa5-4f5e-9f0d-71a34dd145f 6/03b99171ff6e6fddabcea387f2db02f6 --- includes/class-wc-post-types.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/includes/class-wc-post-types.php b/includes/class-wc-post-types.php index 2ccae911f9b..0c24517000d 100644 --- a/includes/class-wc-post-types.php +++ b/includes/class-wc-post-types.php @@ -24,6 +24,7 @@ class WC_Post_types { add_action( 'init', array( __CLASS__, 'register_taxonomies' ), 5 ); add_action( 'init', array( __CLASS__, 'register_post_types' ), 5 ); add_action( 'init', array( __CLASS__, 'register_post_status' ), 10 ); + add_action( 'init', array( __CLASS__, 'support_jetpack_omnisearch' ) ); } /** @@ -250,7 +251,7 @@ class WC_Post_types { 'hierarchical' => false, // Hierarchical causes memory issues - WP loads all records! 'rewrite' => $product_permalink ? array( 'slug' => untrailingslashit( $product_permalink ), 'with_front' => false, 'feeds' => true ) : false, 'query_var' => true, - 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'comments', 'custom-fields', 'page-attributes' ), + 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'comments', 'custom-fields', 'page-attributes', 'publicize', 'wpcom-markdown' ), 'has_archive' => ( $shop_page_id = wc_get_page_id( 'shop' ) ) && get_post( $shop_page_id ) ? get_page_uri( $shop_page_id ) : 'shop', 'show_in_nav_menus' => true ) @@ -463,6 +464,15 @@ class WC_Post_types { 'label_count' => _n_noop( 'Failed (%s)', 'Failed (%s)', 'woocommerce' ) ) ); } + + /** + * Add Testimonial Support to Jetpack Omnisearch + */ + public static function support_jetpack_omnisearch() { + if ( class_exists( 'Jetpack_Omnisearch_Posts' ) ) { + new Jetpack_Omnisearch_Posts( 'product' ); + } + } } WC_Post_types::init(); From 018e56e957acfc87eb6e04a2f43446b4215483d8 Mon Sep 17 00:00:00 2001 From: Brandon Hubbard Date: Fri, 26 Dec 2014 11:43:12 -0800 Subject: [PATCH 502/743] Fixed Comment --- includes/class-wc-post-types.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-post-types.php b/includes/class-wc-post-types.php index 0c24517000d..1a58596743a 100644 --- a/includes/class-wc-post-types.php +++ b/includes/class-wc-post-types.php @@ -466,7 +466,7 @@ class WC_Post_types { } /** - * Add Testimonial Support to Jetpack Omnisearch + * Add Product Support to Jetpack Omnisearch */ public static function support_jetpack_omnisearch() { if ( class_exists( 'Jetpack_Omnisearch_Posts' ) ) { From 7670a08ff4274738b7b759e6b319f182ea4b4898 Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 29 Dec 2014 13:13:26 +0700 Subject: [PATCH 503/743] Add filter 'woocommerce_grouped_children_args' Allows people to filter the grouped product children, like changing the order that the children products are displayed in, etc. --- includes/class-wc-product-grouped.php | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/includes/class-wc-product-grouped.php b/includes/class-wc-product-grouped.php index bf1e7924fa0..e4d8d5c2277 100644 --- a/includes/class-wc-product-grouped.php +++ b/includes/class-wc-product-grouped.php @@ -10,7 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) { * Grouped products cannot be purchased - they are wrappers for other products. * * @class WC_Product_Grouped - * @version 2.0.0 + * @version 2.3.0 * @package WooCommerce/Classes/Products * @category Class * @author WooThemes @@ -62,7 +62,7 @@ class WC_Product_Grouped extends WC_Product { $this->total_stock = $this->stock; if ( sizeof( $this->get_children() ) > 0 ) { - foreach ($this->get_children() as $child_id) { + foreach ( $this->get_children() as $child_id ) { $stock = get_post_meta( $child_id, '_stock', true ); if ( $stock != '' ) { @@ -91,7 +91,17 @@ class WC_Product_Grouped extends WC_Product { if ( empty( $this->children ) ) { - $this->children = get_posts( 'post_parent=' . $this->id . '&post_type=product&orderby=menu_order&order=ASC&fields=ids&post_status=publish&numberposts=-1' ); + $args = apply_filters( 'woocommerce_grouped_children_args', array( + 'post_parent' => $this->id, + 'post_type' => 'product', + 'orderby' => 'menu_order', + 'order' => 'ASC', + 'fields' => 'ids', + 'post_status' => 'publish', + 'numberposts' => -1, + ) ); + + $this->children = get_posts( $args ); set_transient( $transient_name, $this->children, YEAR_IN_SECONDS ); } @@ -134,14 +144,16 @@ class WC_Product_Grouped extends WC_Product { foreach ( $this->get_children() as $child_id ) { $sale_price = get_post_meta( $child_id, '_sale_price', true ); - if ( $sale_price !== "" && $sale_price >= 0 ) + if ( $sale_price !== "" && $sale_price >= 0 ) { return true; + } } } else { - if ( $this->sale_price && $this->sale_price == $this->price ) + if ( $this->sale_price && $this->sale_price == $this->price ) { return true; + } } return false; From ebf3ab5cc6f95ea1caa0238fb663b19a15f01fc0 Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 29 Dec 2014 15:31:18 +0700 Subject: [PATCH 504/743] New `is_view_order_page` conditional function Returns true when on the `my-account/view-order/` page --- includes/wc-conditional-functions.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/includes/wc-conditional-functions.php b/includes/wc-conditional-functions.php index a540c71783e..12ed252b3aa 100644 --- a/includes/wc-conditional-functions.php +++ b/includes/wc-conditional-functions.php @@ -7,7 +7,7 @@ * @author WooThemes * @category Core * @package WooCommerce/Functions - * @version 2.1.0 + * @version 2.3.0 */ if ( ! defined( 'ABSPATH' ) ) { @@ -178,6 +178,21 @@ if ( ! function_exists( 'is_account_page' ) ) { } } +if ( ! function_exists( 'is_view_order_page' ) ) { + + /** + * is_view_order_page - Returns true when on the view order page. + * + * @access public + * @return bool + */ + function is_view_order_page() { + global $wp; + + return ( isset( $wp->query_vars['view-order'] ) ? true : false ); + } +} + if ( ! function_exists( 'is_order_received_page' ) ) { /** From ca5416217c7f1d2748fad69845aa082c8681b2e9 Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 29 Dec 2014 21:46:03 +0700 Subject: [PATCH 505/743] Add check for my account page too --- includes/wc-conditional-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/wc-conditional-functions.php b/includes/wc-conditional-functions.php index 12ed252b3aa..50f02934a05 100644 --- a/includes/wc-conditional-functions.php +++ b/includes/wc-conditional-functions.php @@ -189,7 +189,7 @@ if ( ! function_exists( 'is_view_order_page' ) ) { function is_view_order_page() { global $wp; - return ( isset( $wp->query_vars['view-order'] ) ? true : false ); + return ( is_page( wc_get_page_id( 'myaccount' ) ) && isset( $wp->query_vars['view-order'] ) ? true : false ); } } From d8c49cb988c62f24c4868e072e9242f47d276cbe Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 29 Dec 2014 21:48:26 +0700 Subject: [PATCH 506/743] Fix brackets --- includes/wc-conditional-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/wc-conditional-functions.php b/includes/wc-conditional-functions.php index 50f02934a05..866482e4b7c 100644 --- a/includes/wc-conditional-functions.php +++ b/includes/wc-conditional-functions.php @@ -189,7 +189,7 @@ if ( ! function_exists( 'is_view_order_page' ) ) { function is_view_order_page() { global $wp; - return ( is_page( wc_get_page_id( 'myaccount' ) ) && isset( $wp->query_vars['view-order'] ) ? true : false ); + return ( is_page( wc_get_page_id( 'myaccount' ) ) && isset( $wp->query_vars['view-order'] ) ) ? true : false; } } From caac9768a769389c5c7a7f80b1513e4bbe8a0e19 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 30 Dec 2014 11:11:17 +0000 Subject: [PATCH 507/743] Added more fallbacks for API geoIP --- includes/class-wc-customer.php | 7 +- includes/class-wc-geolocation.php | 104 +++++++++++++++++++++--------- includes/class-wc-install.php | 1 + 3 files changed, 77 insertions(+), 35 deletions(-) diff --git a/includes/class-wc-customer.php b/includes/class-wc-customer.php index 1437d121a3a..c45b9f9335e 100644 --- a/includes/class-wc-customer.php +++ b/includes/class-wc-customer.php @@ -51,14 +51,10 @@ class WC_Customer { if ( empty( $this->_data ) ) { // Defaults $this->_data = array( - 'country' => $this->get_default_country(), - 'state' => $this->get_default_state(), 'postcode' => '', 'city' => '', 'address' => '', 'address_2' => '', - 'shipping_country' => $this->get_default_country(), - 'shipping_state' => $this->get_default_state(), 'shipping_postcode' => '', 'shipping_city' => '', 'shipping_address' => '', @@ -66,6 +62,9 @@ class WC_Customer { 'is_vat_exempt' => false, 'calculated_shipping' => false ); + + $this->_data['country'] = $this->_data['shipping_country'] = $this->get_default_country(); + $this->_data['state'] = $this->_data['shipping_state'] = $this->get_default_state(); } // When leaving or ending page load, store data diff --git a/includes/class-wc-geolocation.php b/includes/class-wc-geolocation.php index 2a369d4675e..33cc998aaff 100644 --- a/includes/class-wc-geolocation.php +++ b/includes/class-wc-geolocation.php @@ -24,6 +24,24 @@ class WC_Geolocation { /** URL to the geolocation database we're using */ const GEOLITE_DB = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz'; + /** @var array API endpoints for looking up user IP address */ + private static $ip_lookup_apis = array( + 'icanhazip' => 'http://ipv4.icanhazip.com', + 'ipify' => 'http://api.ipify.org/', + 'ipecho' => 'http://ipecho.net/plain', + 'ident' => 'http://v4.ident.me', + 'whatismyipaddress' => 'http://bot.whatismyipaddress.com', + 'ip.appspot' => 'http://ip.appspot.com' + ); + + /** @var array API endpoints for geolocating an IP address */ + private static $geoip_apis = array( + 'freegeoip' => 'https://freegeoip.net/json/%s', + 'telize' => 'http://www.telize.com/geoip/%s', + 'ip-api' => 'http://ip-api.com/json/%s', + 'geoip-api.meteor' => 'http://geoip-api.meteor.com/lookup/%s' + ); + /** * Hook in tabs. */ @@ -48,23 +66,17 @@ class WC_Geolocation { $external_ip_address = get_transient( $transient_name ); if ( false === $external_ip_address ) { - $external_ip_address = '0.0.0.0'; - $ip_lookup_services = array( - 'http://ipv4.icanhazip.com', - 'http://api.ipify.org/', - 'http://ipecho.net/plain', - 'http://v4.ident.me', - 'http://bot.whatismyipaddress.com', - 'http://ip.appspot.com', - ); + $external_ip_address = '0.0.0.0'; + $ip_lookup_services = apply_filters( 'woocommerce_geolocation_ip_lookup_apis', self::$ip_lookup_apis ); + $ip_lookup_services_keys = array_keys( $ip_lookup_services ); + shuffle( $ip_lookup_services_keys ); - shuffle( $ip_lookup_services ); - - foreach ( $ip_lookup_services as $service ) { - $response = wp_remote_get( $service, array( 'timeout' => 2 ) ); + foreach ( $ip_lookup_services_keys as $service_name ) { + $service_endpoint = $ip_lookup_services[ $service_name ]; + $response = wp_remote_get( $service_endpoint, array( 'timeout' => 2 ) ); if ( ! is_wp_error( $response ) && $response['body'] ) { - $external_ip_address = $response['body']; + $external_ip_address = apply_filters( 'woocommerce_geolocation_ip_lookup_api_response', $response['body'], $service_name ); break; } } @@ -80,19 +92,19 @@ class WC_Geolocation { * @param string $ip_address * @return array */ - public static function geolocate_ip( $ip_address = '' ) { + public static function geolocate_ip( $ip_address = '', $fallback = true ) { $ip_address = $ip_address ? $ip_address : self::get_ip_address(); $database = self::get_local_database_path(); if ( file_exists( $database ) ) { - $country_code = self::geolite_geolocation( $ip_address ); + $country_code = self::geolocate_via_db( $ip_address ); } else { - $country_code = self::freegeoip_geolocation( $ip_address ); + $country_code = self::geolocate_via_api( $ip_address ); } - if ( ! $country_code ) { + if ( ! $country_code && $fallback ) { // May be a local environment - find external IP - return self::geolocate_ip( self::get_external_ip_address() ); + return self::geolocate_ip( self::get_external_ip_address(), false ); } return array( @@ -143,7 +155,7 @@ class WC_Geolocation { * @param string $ip_address * @return string */ - private static function geolite_geolocation( $ip_address ) { + private static function geolocate_via_db( $ip_address ) { if ( ! class_exists( 'GeoIP' ) ) { include_once( 'libraries/geoip.php' ); } @@ -152,27 +164,57 @@ class WC_Geolocation { $country_code = geoip_country_code_by_addr( $gi, $ip_address ); geoip_close( $gi ); - return $country_code; + return sanitize_text_field( strtoupper( $country_code ) ); } /** - * Use freegeoip.net + * Use APIs to Geolocate the user. * @param string $ip_address - * @return string + * @return string|bool */ - private static function freegeoip_geolocation( $ip_address ) { + private static function geolocate_via_api( $ip_address ) { $country_code = get_transient( 'geoip_' . $ip_address ); if ( false === $country_code ) { - $json_geo_ip = wp_remote_get( 'https://freegeoip.net/json/' . $ip_address ); + $geoip_services = apply_filters( 'woocommerce_geolocation_geoip_apis', self::$geoip_apis ); + $geoip_services_keys = array_keys( $geoip_services ); + shuffle( $geoip_services_keys ); - if ( ! is_wp_error( $json_geo_ip ) ) { - $data = json_decode( $json_geo_ip['body'] ); - $country_code = sanitize_text_field( $data->country_code ); - set_transient( 'geoip_' . $ip_address, $country_code, WEEK_IN_SECONDS ); - } else { - $country_code = ''; + foreach ( $geoip_services_keys as $service_name ) { + $service_endpoint = $geoip_services[ $service_name ]; + $response = wp_remote_get( sprintf( $service_endpoint, $ip_address ), array( 'timeout' => 2 ) ); + + if ( ! is_wp_error( $response ) && $response['body'] ) { + $country_code = ''; + + switch ( $service_name ) { + case 'ip-api' : + $data = json_decode( $response['body'] ); + $country_code = isset( $data->countryCode ) ? $data->countryCode : ''; + break; + case 'geoip-api.meteor' : + $data = json_decode( $response['body'] ); + $country_code = isset( $data->country ) ? $data->country : ''; + break; + case 'freegeoip' : + case 'telize' : + $data = json_decode( $response['body'] ); + $country_code = isset( $data->country_code ) ? $data->country_code : ''; + break; + default : + $country_code = apply_filters( 'woocommerce_geolocation_geoip_response_' . $service_name, '', $response['body'] ); + break; + } + + $country_code = sanitize_text_field( strtoupper( $country_code ) ); + + if ( $country_code ) { + break; + } + } } + + set_transient( 'geoip_' . $ip_address, $country_code, WEEK_IN_SECONDS ); } return $country_code; diff --git a/includes/class-wc-install.php b/includes/class-wc-install.php index a38fc23d4fc..04f0a0702f0 100644 --- a/includes/class-wc-install.php +++ b/includes/class-wc-install.php @@ -125,6 +125,7 @@ class WC_Install { // Flush rules after install flush_rewrite_rules(); + delete_transient( 'wc_attribute_taxonomies' ); // Redirect to welcome screen set_transient( '_wc_activation_redirect', 1, HOUR_IN_SECONDS ); From 3698eab0ae49a223e254d26d089960600b2bc192 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 30 Dec 2014 15:02:56 +0000 Subject: [PATCH 508/743] Made dashboard sales report match monthly sales report Closes #6871 --- includes/admin/class-wc-admin-dashboard.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/admin/class-wc-admin-dashboard.php b/includes/admin/class-wc-admin-dashboard.php index ca921f64600..908521c8942 100644 --- a/includes/admin/class-wc-admin-dashboard.php +++ b/includes/admin/class-wc-admin-dashboard.php @@ -54,8 +54,8 @@ class WC_Admin_Dashboard { $query = array(); $query['fields'] = "SELECT SUM( postmeta.meta_value ) FROM {$wpdb->posts} as posts"; $query['join'] = "INNER JOIN {$wpdb->postmeta} AS postmeta ON posts.ID = postmeta.post_id "; - $query['where'] = "WHERE posts.post_type IN ( '" . implode( "','", wc_get_order_types( 'reports' ) ) . "' ) "; - $query['where'] .= "AND posts.post_status IN ( 'wc-" . implode( "','wc-", apply_filters( 'woocommerce_reports_order_statuses', array( 'completed', 'processing', 'on-hold' ) ) ) . "' ) "; + $query['where'] = "WHERE posts.post_type IN ( '" . implode( "','", wc_get_order_types( 'sales-reports' ) ) . "' ) "; + $query['where'] .= "AND posts.post_status IN ( 'wc-" . implode( "','wc-", apply_filters( 'woocommerce_reports_order_statuses', array( 'completed', 'processing', 'on-hold', 'refunded' ) ) ) . "' ) "; $query['where'] .= "AND postmeta.meta_key = '_order_total' "; $query['where'] .= "AND posts.post_date >= '" . date( 'Y-m-01', current_time( 'timestamp' ) ) . "' "; $query['where'] .= "AND posts.post_date <= '" . date( 'Y-m-d H:i:s', current_time( 'timestamp' ) ) . "' "; From 4a57cd3f7df17429e5a6fb89ce810a520a05ba2e Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 30 Dec 2014 15:13:34 +0000 Subject: [PATCH 509/743] 'Free' for variable products without a range of prices. Closes #6929 --- includes/class-wc-product-variable.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/class-wc-product-variable.php b/includes/class-wc-product-variable.php index 62347b2132b..afb27a48f47 100644 --- a/includes/class-wc-product-variable.php +++ b/includes/class-wc-product-variable.php @@ -307,7 +307,7 @@ class WC_Product_Variable extends WC_Product { // Main price $prices = array( $this->get_variation_price( 'min', true ), $this->get_variation_price( 'max', true ) ); - $price = $prices[0] !== $prices[1] ? sprintf( _x( '%1$s–%2$s', 'Price range: from-to', 'woocommerce' ), wc_price( $prices[0] ), wc_price( $prices[1] ) ) : wc_price( $prices[0] ); + $price = $prices[0] !== $prices[1] ? sprintf( _x( '%1$s–%2$s', 'Price range: from-to', 'woocommerce' ), wc_price( $prices[0] ), wc_price( $prices[1] ) ) : wc_price( $prices[0] ); // Sale $prices = array( $this->get_variation_regular_price( 'min', true ), $this->get_variation_regular_price( 'max', true ) ); @@ -316,6 +316,9 @@ class WC_Product_Variable extends WC_Product { if ( $price !== $saleprice ) { $price = apply_filters( 'woocommerce_variable_sale_price_html', $this->get_price_html_from_to( $saleprice, $price ) . $this->get_price_suffix(), $this ); + } elseif ( $price == 0 ) { + $price = __( 'Free!', 'woocommerce' ); + $price = apply_filters( 'woocommerce_variable_free_price_html', $price, $this ); } else { $price = apply_filters( 'woocommerce_variable_price_html', $price . $this->get_price_suffix(), $this ); } From 7ef8f4d156c03e82b47e65c0b670053e65dcaa60 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 30 Dec 2014 15:27:08 +0000 Subject: [PATCH 510/743] Invalidate unknown product transients Closes #6815 --- includes/abstracts/abstract-wc-product.php | 15 ++++++++------- includes/class-wc-product-grouped.php | 4 ++-- includes/class-wc-product-variable.php | 4 ++-- includes/wc-product-functions.php | 3 +++ 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/includes/abstracts/abstract-wc-product.php b/includes/abstracts/abstract-wc-product.php index 94cad701115..1c0ff1d6c64 100644 --- a/includes/abstracts/abstract-wc-product.php +++ b/includes/abstracts/abstract-wc-product.php @@ -965,8 +965,9 @@ class WC_Product { * @return string */ public function get_average_rating() { + $transient_name = 'wc_average_rating_' . $this->id . WC_Cache_Helper::get_transient_version( 'product' ); - if ( false === ( $average_rating = get_transient( 'wc_average_rating_' . $this->id ) ) ) { + if ( false === ( $average_rating = get_transient( $transient_name ) ) ) { global $wpdb; @@ -987,7 +988,7 @@ class WC_Product { $average_rating = number_format( $ratings / $count, 2 ); } - set_transient( 'wc_average_rating_' . $this->id, $average_rating, YEAR_IN_SECONDS ); + set_transient( $transient_name, $average_rating, YEAR_IN_SECONDS ); } return $average_rating; @@ -1001,11 +1002,11 @@ class WC_Product { * @return int */ public function get_rating_count( $value = null ) { + $value = intval( $value ); + $value_suffix = $value ? '_' . $value : ''; + $transient_name = 'wc_rating_count_' . $this->id . $value_suffix . WC_Cache_Helper::get_transient_version( 'product' ); - $value = intval( $value ); - $value_suffix = $value ? '_' . $value : ''; - - if ( false === ( $count = get_transient( 'wc_rating_count_' . $this->id . $value_suffix ) ) ) { + if ( false === ( $count = get_transient( $transient_name ) ) ) { global $wpdb; @@ -1032,7 +1033,7 @@ class WC_Product { } - set_transient( 'wc_rating_count_' . $this->id . $value_suffix, $count, YEAR_IN_SECONDS ); + set_transient( $transient_name, $count, YEAR_IN_SECONDS ); } return $count; diff --git a/includes/class-wc-product-grouped.php b/includes/class-wc-product-grouped.php index e4d8d5c2277..4b1dc9168a4 100644 --- a/includes/class-wc-product-grouped.php +++ b/includes/class-wc-product-grouped.php @@ -56,7 +56,7 @@ class WC_Product_Grouped extends WC_Product { if ( empty( $this->total_stock ) ) { - $transient_name = 'wc_product_total_stock_' . $this->id; + $transient_name = 'wc_product_total_stock_' . $this->id . WC_Cache_Helper::get_transient_version( 'product' ); if ( false === ( $this->total_stock = get_transient( $transient_name ) ) ) { $this->total_stock = $this->stock; @@ -86,7 +86,7 @@ class WC_Product_Grouped extends WC_Product { */ public function get_children() { if ( ! is_array( $this->children ) || empty( $this->children ) ) { - $transient_name = 'wc_product_children_ids_' . $this->id; + $transient_name = 'wc_product_children_ids_' . $this->id . WC_Cache_Helper::get_transient_version( 'product' ); $this->children = get_transient( $transient_name ); if ( empty( $this->children ) ) { diff --git a/includes/class-wc-product-variable.php b/includes/class-wc-product-variable.php index afb27a48f47..c9df7fdd345 100644 --- a/includes/class-wc-product-variable.php +++ b/includes/class-wc-product-variable.php @@ -53,7 +53,7 @@ class WC_Product_Variable extends WC_Product { */ public function get_total_stock() { if ( empty( $this->total_stock ) ) { - $transient_name = 'wc_product_total_stock_' . $this->id; + $transient_name = 'wc_product_total_stock_' . $this->id . WC_Cache_Helper::get_transient_version( 'product' ); if ( false === ( $this->total_stock = get_transient( $transient_name ) ) ) { $this->total_stock = max( 0, wc_stock_amount( $this->stock ) ); @@ -131,7 +131,7 @@ class WC_Product_Variable extends WC_Product { */ public function get_children( $visible_only = false ) { if ( ! is_array( $this->children ) || empty( $this->children ) ) { - $transient_name = 'wc_product_children_ids_' . $this->id; + $transient_name = 'wc_product_children_ids_' . $this->id . WC_Cache_Helper::get_transient_version( 'product' ); $this->children = get_transient( $transient_name ); if ( empty( $this->children ) ) { diff --git a/includes/wc-product-functions.php b/includes/wc-product-functions.php index fabcbcc4681..653cb73317a 100644 --- a/includes/wc-product-functions.php +++ b/includes/wc-product-functions.php @@ -99,6 +99,9 @@ function wc_delete_product_transients( $post_id = 0 ) { delete_transient( $transient ); } + // Increments the transient version to invalidate cache + WC_Cache_Helper::get_transient_version( 'product', true ); + do_action( 'woocommerce_delete_product_transients', $post_id ); } From fe5954c7efad26318a61b79d43f046e77c71483d Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 1 Jan 2015 12:35:31 +0000 Subject: [PATCH 511/743] Update blockui --- Gruntfile.js | 3 ++- assets/js/jquery-blockui/jquery.blockUI.js | 10 +++++----- assets/js/jquery-blockui/jquery.blockUI.min.js | 5 +++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 58ee2259e0e..a86d2210feb 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -55,7 +55,8 @@ module.exports = function( grunt ) { '<%= dirs.js %>/admin/jquery.flot.resize.min.js': ['<%= dirs.js %>/admin/jquery.flot.resize.js'], '<%= dirs.js %>/admin/jquery.flot.stack.min.js': ['<%= dirs.js %>/admin/jquery.flot.stack.js'], '<%= dirs.js %>/admin/jquery.flot.time.min.js': ['<%= dirs.js %>/admin/jquery.flot.time.js'], - '<%= dirs.js %>/jquery-payment/jquery.payment.min.js': ['<%= dirs.js %>/jquery-payment/jquery.payment.js'] + '<%= dirs.js %>/jquery-payment/jquery.payment.min.js': ['<%= dirs.js %>/jquery-payment/jquery.payment.js'], + '<%= dirs.js %>/jquery-blockui/jquery.blockUI.min.js': ['<%= dirs.js %>/jquery-blockui/jquery.blockUI.js'] } }, frontend: { diff --git a/assets/js/jquery-blockui/jquery.blockUI.js b/assets/js/jquery-blockui/jquery.blockUI.js index 605c37b1d56..064ed34cda6 100644 --- a/assets/js/jquery-blockui/jquery.blockUI.js +++ b/assets/js/jquery-blockui/jquery.blockUI.js @@ -1,6 +1,6 @@ /*! * jQuery blockUI plugin - * Version 2.66.0-2013.10.09 + * Version 2.70.0-2014.11.23 * Requires jQuery v1.7 or later * * Examples at: http://malsup.com/jquery/block/ @@ -11,7 +11,6 @@ * * Thanks to Amir-Hossein Sobhi for some excellent contributions! */ - ;(function() { /*jshint eqeqeq:false curly:false latedef:false */ "use strict"; @@ -107,7 +106,7 @@ }); }; - $.blockUI.version = 2.66; // 2nd generation blocking at no extra cost! + $.blockUI.version = 2.70; // 2nd generation blocking at no extra cost! // override these in your code to change the default behavior and style $.blockUI.defaults = { @@ -426,7 +425,7 @@ if (msg) lyr3.show(); if (opts.onBlock) - opts.onBlock(); + opts.onBlock.bind(lyr3)(); } // bind key and mouse events @@ -515,6 +514,7 @@ if (data && data.el) { data.el.style.display = data.display; data.el.style.position = data.position; + data.el.style.cursor = 'default'; // #59 if (data.parent) data.parent.appendChild(data.el); $el.removeData('blockUI.history'); @@ -616,4 +616,4 @@ setup(jQuery); } -})(); +})(); \ No newline at end of file diff --git a/assets/js/jquery-blockui/jquery.blockUI.min.js b/assets/js/jquery-blockui/jquery.blockUI.min.js index e76280db8d8..47fb974409c 100644 --- a/assets/js/jquery-blockui/jquery.blockUI.min.js +++ b/assets/js/jquery-blockui/jquery.blockUI.min.js @@ -1,6 +1,6 @@ /*! * jQuery blockUI plugin - * Version 2.66.0-2013.10.09 + * Version 2.70.0-2014.11.23 * Requires jQuery v1.7 or later * * Examples at: http://malsup.com/jquery/block/ @@ -10,4 +10,5 @@ * http://www.gnu.org/licenses/gpl.html * * Thanks to Amir-Hossein Sobhi for some excellent contributions! - */(function(){"use strict";function e(e){function a(i,a){var l,h,m=i==window,g=a&&a.message!==undefined?a.message:undefined;a=e.extend({},e.blockUI.defaults,a||{});if(a.ignoreIfBlocked&&e(i).data("blockUI.isBlocked"))return;a.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,a.overlayCSS||{});l=e.extend({},e.blockUI.defaults.css,a.css||{});a.onOverlayClick&&(a.overlayCSS.cursor="pointer");h=e.extend({},e.blockUI.defaults.themedCSS,a.themedCSS||{});g=g===undefined?a.message:g;m&&o&&f(window,{fadeOut:0});if(g&&typeof g!="string"&&(g.parentNode||g.jquery)){var y=g.jquery?g[0]:g,b={};e(i).data("blockUI.history",b);b.el=y;b.parent=y.parentNode;b.display=y.style.display;b.position=y.style.position;b.parent&&b.parent.removeChild(y)}e(i).data("blockUI.onUnblock",a.onUnblock);var w=a.baseZ,E,S,x,T;n||a.forceIframe?E=e(''):E=e('

    ');a.theme?S=e(''):S=e('');if(a.theme&&m){T='"}else if(a.theme){T='"}else m?T='':T='';x=e(T);if(g)if(a.theme){x.css(h);x.addClass("ui-widget-content")}else x.css(l);a.theme||S.css(a.overlayCSS);S.css("position",m?"fixed":"absolute");(n||a.forceIframe)&&E.css("opacity",0);var N=[E,S,x],C=m?e("body"):e(i);e.each(N,function(){this.appendTo(C)});a.theme&&a.draggable&&e.fn.draggable&&x.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var k=s&&(!e.support.boxModel||e("object,embed",m?null:i).length>0);if(r||k){m&&a.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%");if((r||!e.support.boxModel)&&!m)var L=v(i,"borderTopWidth"),A=v(i,"borderLeftWidth"),O=L?"(0 - "+L+")":0,M=A?"(0 - "+A+")":0;e.each(N,function(e,t){var n=t[0].style;n.position="absolute";if(e<2){m?n.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+a.quirksmodeOffsetHack+') + "px"'):n.setExpression("height",'this.parentNode.offsetHeight + "px"');m?n.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):n.setExpression("width",'this.parentNode.offsetWidth + "px"');M&&n.setExpression("left",M);O&&n.setExpression("top",O)}else if(a.centerY){m&&n.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');n.marginTop=0}else if(!a.centerY&&m){var r=a.css&&a.css.top?parseInt(a.css.top,10):0,i="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+r+') + "px"';n.setExpression("top",i)}})}if(g){a.theme?x.find(".ui-widget-content").append(g):x.append(g);(g.jquery||g.nodeType)&&e(g).show()}(n||a.forceIframe)&&a.showOverlay&&E.show();if(a.fadeIn){var _=a.onBlock?a.onBlock:t,D=a.showOverlay&&!g?_:t,P=g?_:t;a.showOverlay&&S._fadeIn(a.fadeIn,D);g&&x._fadeIn(a.fadeIn,P)}else{a.showOverlay&&S.show();g&&x.show();a.onBlock&&a.onBlock()}c(1,i,a);if(m){o=x[0];u=e(a.focusableElements,o);a.focusInput&&setTimeout(p,20)}else d(x[0],a.centerX,a.centerY);if(a.timeout){var H=setTimeout(function(){m?e.unblockUI(a):e(i).unblock(a)},a.timeout);e(i).data("blockUI.timeout",H)}}function f(t,n){var r,i=t==window,s=e(t),a=s.data("blockUI.history"),f=s.data("blockUI.timeout");if(f){clearTimeout(f);s.removeData("blockUI.timeout")}n=e.extend({},e.blockUI.defaults,n||{});c(0,t,n);if(n.onUnblock===null){n.onUnblock=s.data("blockUI.onUnblock");s.removeData("blockUI.onUnblock")}var h;i?h=e("body").children().filter(".blockUI").add("body > .blockUI"):h=s.find(">.blockUI");if(n.cursorReset){h.length>1&&(h[1].style.cursor=n.cursorReset);h.length>2&&(h[2].style.cursor=n.cursorReset)}i&&(o=u=null);if(n.fadeOut){r=h.length;h.stop().fadeOut(n.fadeOut,function(){--r===0&&l(h,a,n,t)})}else l(h,a,n,t)}function l(t,n,r,i){var s=e(i);if(s.data("blockUI.isBlocked"))return;t.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)});if(n&&n.el){n.el.style.display=n.display;n.el.style.position=n.position;n.parent&&n.parent.appendChild(n.el);s.removeData("blockUI.history")}s.data("blockUI.static")&&s.css("position","static");typeof r.onUnblock=="function"&&r.onUnblock(i,r);var o=e(document.body),u=o.width(),a=o[0].style.width;o.width(u-1).width(u);o[0].style.width=a}function c(t,n,r){var i=n==window,s=e(n);if(!t&&(i&&!o||!i&&!s.data("blockUI.isBlocked")))return;s.data("blockUI.isBlocked",t);if(!i||!r.bindEvents||t&&!r.showOverlay)return;var u="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).bind(u,r,h):e(document).unbind(u,h)}function h(t){if(t.type==="keydown"&&t.keyCode&&t.keyCode==9&&o&&t.data.constrainTabKey){var n=u,r=!t.shiftKey&&t.target===n[n.length-1],i=t.shiftKey&&t.target===n[0];if(r||i){setTimeout(function(){p(i)},10);return!1}}var s=t.data,a=e(t.target);a.hasClass("blockOverlay")&&s.onOverlayClick&&s.onOverlayClick(t);return a.parents("div."+s.blockMsgClass).length>0?!0:a.parents().children().filter("div.blockUI").length===0}function p(e){if(!u)return;var t=u[e===!0?u.length-1:0];t&&t.focus()}function d(e,t,n){var r=e.parentNode,i=e.style,s=(r.offsetWidth-e.offsetWidth)/2-v(r,"borderLeftWidth"),o=(r.offsetHeight-e.offsetHeight)/2-v(r,"borderTopWidth");t&&(i.left=s>0?s+"px":"0");n&&(i.top=o>0?o+"px":"0")}function v(t,n){return parseInt(e.css(t,n),10)||0}e.fn._fadeIn=e.fn.fadeIn;var t=e.noop||function(){},n=/MSIE/.test(navigator.userAgent),r=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),i=document.documentMode||0,s=e.isFunction(document.createElement("div").style.setExpression);e.blockUI=function(e){a(window,e)};e.unblockUI=function(e){f(window,e)};e.growlUI=function(t,n,r,i){var s=e('
    ');t&&s.append("

    "+t+"

    ");n&&s.append("

    "+n+"

    ");r===undefined&&(r=3e3);var o=function(t){t=t||{};e.blockUI({message:s,fadeIn:typeof t.fadeIn!="undefined"?t.fadeIn:700,fadeOut:typeof t.fadeOut!="undefined"?t.fadeOut:1e3,timeout:typeof t.timeout!="undefined"?t.timeout:r,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};o();var u=s.css("opacity");s.mouseover(function(){o({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop();t.fadeTo(300,1)}).mouseout(function(){e(".blockMsg").fadeOut(1e3)})};e.fn.block=function(t){if(this[0]===window){e.blockUI(t);return this}var n=e.extend({},e.blockUI.defaults,t||{});this.each(function(){var t=e(this);if(n.ignoreIfBlocked&&t.data("blockUI.isBlocked"))return;t.unblock({fadeOut:0})});return this.each(function(){if(e.css(this,"position")=="static"){this.style.position="relative";e(this).data("blockUI.static",!0)}this.style.zoom=1;a(this,t)})};e.fn.unblock=function(t){if(this[0]===window){e.unblockUI(t);return this}return this.each(function(){f(this,t)})};e.blockUI.version=2.66;e.blockUI.defaults={message:"

    Please wait...

    ",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var o=null,u=[]}typeof define=="function"&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)})(); \ No newline at end of file + */ +!function(){"use strict";function a(a){function b(b,d){var f,p,q=b==window,r=d&&void 0!==d.message?d.message:void 0;if(d=a.extend({},a.blockUI.defaults,d||{}),!d.ignoreIfBlocked||!a(b).data("blockUI.isBlocked")){if(d.overlayCSS=a.extend({},a.blockUI.defaults.overlayCSS,d.overlayCSS||{}),f=a.extend({},a.blockUI.defaults.css,d.css||{}),d.onOverlayClick&&(d.overlayCSS.cursor="pointer"),p=a.extend({},a.blockUI.defaults.themedCSS,d.themedCSS||{}),r=void 0===r?d.message:r,q&&n&&c(window,{fadeOut:0}),r&&"string"!=typeof r&&(r.parentNode||r.jquery)){var s=r.jquery?r[0]:r,t={};a(b).data("blockUI.history",t),t.el=s,t.parent=s.parentNode,t.display=s.style.display,t.position=s.style.position,t.parent&&t.parent.removeChild(s)}a(b).data("blockUI.onUnblock",d.onUnblock);var u,v,w,x,y=d.baseZ;u=a(k||d.forceIframe?'':''),v=a(d.theme?'':''),d.theme&&q?(x='"):d.theme?(x='"):x=q?'':'',w=a(x),r&&(d.theme?(w.css(p),w.addClass("ui-widget-content")):w.css(f)),d.theme||v.css(d.overlayCSS),v.css("position",q?"fixed":"absolute"),(k||d.forceIframe)&&u.css("opacity",0);var z=[u,v,w],A=a(q?"body":b);a.each(z,function(){this.appendTo(A)}),d.theme&&d.draggable&&a.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var B=m&&(!a.support.boxModel||a("object,embed",q?null:b).length>0);if(l||B){if(q&&d.allowBodyStretch&&a.support.boxModel&&a("html,body").css("height","100%"),(l||!a.support.boxModel)&&!q)var C=i(b,"borderTopWidth"),D=i(b,"borderLeftWidth"),E=C?"(0 - "+C+")":0,F=D?"(0 - "+D+")":0;a.each(z,function(a,b){var c=b[0].style;if(c.position="absolute",2>a)q?c.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+d.quirksmodeOffsetHack+') + "px"'):c.setExpression("height",'this.parentNode.offsetHeight + "px"'),q?c.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):c.setExpression("width",'this.parentNode.offsetWidth + "px"'),F&&c.setExpression("left",F),E&&c.setExpression("top",E);else if(d.centerY)q&&c.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),c.marginTop=0;else if(!d.centerY&&q){var e=d.css&&d.css.top?parseInt(d.css.top,10):0,f="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+e+') + "px"';c.setExpression("top",f)}})}if(r&&(d.theme?w.find(".ui-widget-content").append(r):w.append(r),(r.jquery||r.nodeType)&&a(r).show()),(k||d.forceIframe)&&d.showOverlay&&u.show(),d.fadeIn){var G=d.onBlock?d.onBlock:j,H=d.showOverlay&&!r?G:j,I=r?G:j;d.showOverlay&&v._fadeIn(d.fadeIn,H),r&&w._fadeIn(d.fadeIn,I)}else d.showOverlay&&v.show(),r&&w.show(),d.onBlock&&d.onBlock.bind(w)();if(e(1,b,d),q?(n=w[0],o=a(d.focusableElements,n),d.focusInput&&setTimeout(g,20)):h(w[0],d.centerX,d.centerY),d.timeout){var J=setTimeout(function(){q?a.unblockUI(d):a(b).unblock(d)},d.timeout);a(b).data("blockUI.timeout",J)}}}function c(b,c){var f,g=b==window,h=a(b),i=h.data("blockUI.history"),j=h.data("blockUI.timeout");j&&(clearTimeout(j),h.removeData("blockUI.timeout")),c=a.extend({},a.blockUI.defaults,c||{}),e(0,b,c),null===c.onUnblock&&(c.onUnblock=h.data("blockUI.onUnblock"),h.removeData("blockUI.onUnblock"));var k;k=g?a("body").children().filter(".blockUI").add("body > .blockUI"):h.find(">.blockUI"),c.cursorReset&&(k.length>1&&(k[1].style.cursor=c.cursorReset),k.length>2&&(k[2].style.cursor=c.cursorReset)),g&&(n=o=null),c.fadeOut?(f=k.length,k.stop().fadeOut(c.fadeOut,function(){0===--f&&d(k,i,c,b)})):d(k,i,c,b)}function d(b,c,d,e){var f=a(e);if(!f.data("blockUI.isBlocked")){b.each(function(){this.parentNode&&this.parentNode.removeChild(this)}),c&&c.el&&(c.el.style.display=c.display,c.el.style.position=c.position,c.el.style.cursor="default",c.parent&&c.parent.appendChild(c.el),f.removeData("blockUI.history")),f.data("blockUI.static")&&f.css("position","static"),"function"==typeof d.onUnblock&&d.onUnblock(e,d);var g=a(document.body),h=g.width(),i=g[0].style.width;g.width(h-1).width(h),g[0].style.width=i}}function e(b,c,d){var e=c==window,g=a(c);if((b||(!e||n)&&(e||g.data("blockUI.isBlocked")))&&(g.data("blockUI.isBlocked",b),e&&d.bindEvents&&(!b||d.showOverlay))){var h="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";b?a(document).bind(h,d,f):a(document).unbind(h,f)}}function f(b){if("keydown"===b.type&&b.keyCode&&9==b.keyCode&&n&&b.data.constrainTabKey){var c=o,d=!b.shiftKey&&b.target===c[c.length-1],e=b.shiftKey&&b.target===c[0];if(d||e)return setTimeout(function(){g(e)},10),!1}var f=b.data,h=a(b.target);return h.hasClass("blockOverlay")&&f.onOverlayClick&&f.onOverlayClick(b),h.parents("div."+f.blockMsgClass).length>0?!0:0===h.parents().children().filter("div.blockUI").length}function g(a){if(o){var b=o[a===!0?o.length-1:0];b&&b.focus()}}function h(a,b,c){var d=a.parentNode,e=a.style,f=(d.offsetWidth-a.offsetWidth)/2-i(d,"borderLeftWidth"),g=(d.offsetHeight-a.offsetHeight)/2-i(d,"borderTopWidth");b&&(e.left=f>0?f+"px":"0"),c&&(e.top=g>0?g+"px":"0")}function i(b,c){return parseInt(a.css(b,c),10)||0}a.fn._fadeIn=a.fn.fadeIn;var j=a.noop||function(){},k=/MSIE/.test(navigator.userAgent),l=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),m=(document.documentMode||0,a.isFunction(document.createElement("div").style.setExpression));a.blockUI=function(a){b(window,a)},a.unblockUI=function(a){c(window,a)},a.growlUI=function(b,c,d,e){var f=a('
    ');b&&f.append("

    "+b+"

    "),c&&f.append("

    "+c+"

    "),void 0===d&&(d=3e3);var g=function(b){b=b||{},a.blockUI({message:f,fadeIn:"undefined"!=typeof b.fadeIn?b.fadeIn:700,fadeOut:"undefined"!=typeof b.fadeOut?b.fadeOut:1e3,timeout:"undefined"!=typeof b.timeout?b.timeout:d,centerY:!1,showOverlay:!1,onUnblock:e,css:a.blockUI.defaults.growlCSS})};g();f.css("opacity");f.mouseover(function(){g({fadeIn:0,timeout:3e4});var b=a(".blockMsg");b.stop(),b.fadeTo(300,1)}).mouseout(function(){a(".blockMsg").fadeOut(1e3)})},a.fn.block=function(c){if(this[0]===window)return a.blockUI(c),this;var d=a.extend({},a.blockUI.defaults,c||{});return this.each(function(){var b=a(this);d.ignoreIfBlocked&&b.data("blockUI.isBlocked")||b.unblock({fadeOut:0})}),this.each(function(){"static"==a.css(this,"position")&&(this.style.position="relative",a(this).data("blockUI.static",!0)),this.style.zoom=1,b(this,c)})},a.fn.unblock=function(b){return this[0]===window?(a.unblockUI(b),this):this.each(function(){c(this,b)})},a.blockUI.version=2.7,a.blockUI.defaults={message:"

    Please wait...

    ",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var n=null,o=[]}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],a):a(jQuery)}(); \ No newline at end of file From 932263cf0a0d58355cb71406bcab9583fe76db9e Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 1 Jan 2015 12:41:04 +0000 Subject: [PATCH 512/743] Check for geoiprecord class --- includes/class-wc-geolocation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-geolocation.php b/includes/class-wc-geolocation.php index 33cc998aaff..5986df5d8df 100644 --- a/includes/class-wc-geolocation.php +++ b/includes/class-wc-geolocation.php @@ -156,7 +156,7 @@ class WC_Geolocation { * @return string */ private static function geolocate_via_db( $ip_address ) { - if ( ! class_exists( 'GeoIP' ) ) { + if ( ! class_exists( 'GeoIP' ) && ! class_exists( 'geoiprecord' ) ) { include_once( 'libraries/geoip.php' ); } $database = self::get_local_database_path(); From 5ee068071ff443ae241edc3acaa91c2eef09ac98 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 1 Jan 2015 12:43:49 +0000 Subject: [PATCH 513/743] Support HTTP_CF_IPCOUNTRY --- includes/class-wc-geolocation.php | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/includes/class-wc-geolocation.php b/includes/class-wc-geolocation.php index 5986df5d8df..271f81665e0 100644 --- a/includes/class-wc-geolocation.php +++ b/includes/class-wc-geolocation.php @@ -93,18 +93,22 @@ class WC_Geolocation { * @return array */ public static function geolocate_ip( $ip_address = '', $fallback = true ) { - $ip_address = $ip_address ? $ip_address : self::get_ip_address(); - $database = self::get_local_database_path(); - - if ( file_exists( $database ) ) { - $country_code = self::geolocate_via_db( $ip_address ); + // If GEOIP is enabled in CloudFlare, we can use that (Settings -> CloudFlare Settings -> Settings Overview) + if ( ! empty( $_SERVER[ "HTTP_CF_IPCOUNTRY" ] ) ) { + $country_code = sanitize_text_field( strtoupper( $_SERVER["HTTP_CF_IPCOUNTRY"] ) ); } else { - $country_code = self::geolocate_via_api( $ip_address ); - } + $ip_address = $ip_address ? $ip_address : self::get_ip_address(); - if ( ! $country_code && $fallback ) { - // May be a local environment - find external IP - return self::geolocate_ip( self::get_external_ip_address(), false ); + if ( file_exists( self::get_local_database_path() ) ) { + $country_code = self::geolocate_via_db( $ip_address ); + } else { + $country_code = self::geolocate_via_api( $ip_address ); + } + + if ( ! $country_code && $fallback ) { + // May be a local environment - find external IP + return self::geolocate_ip( self::get_external_ip_address(), false ); + } } return array( From 0923d31de24bf7499443a25b484350b61a9bce71 Mon Sep 17 00:00:00 2001 From: splashingpixels Date: Thu, 1 Jan 2015 13:33:08 -0800 Subject: [PATCH 514/743] use proper label tags for generate api key setting field --- includes/admin/class-wc-admin-profile.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/includes/admin/class-wc-admin-profile.php b/includes/admin/class-wc-admin-profile.php index e74e2800986..deb8fe8e049 100644 --- a/includes/admin/class-wc-admin-profile.php +++ b/includes/admin/class-wc-admin-profile.php @@ -216,8 +216,10 @@ class WC_Admin_Profile { woocommerce_api_consumer_key ) ) : ?> - - +

    woocommerce_api_consumer_key; ?>

    @@ -230,8 +232,10 @@ class WC_Admin_Profile {  
    - - + From 08703842ee18ce655b507ad6f5361325cb7efe30 Mon Sep 17 00:00:00 2001 From: splashingpixels Date: Thu, 1 Jan 2015 14:15:47 -0800 Subject: [PATCH 515/743] fixes the encoding issue with pagination on default permalinks setting closes #7011 --- templates/loop/pagination.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/loop/pagination.php b/templates/loop/pagination.php index 780d94647e5..47b91005c31 100644 --- a/templates/loop/pagination.php +++ b/templates/loop/pagination.php @@ -20,7 +20,7 @@ if ( $wp_query->max_num_pages <= 1 ) {
    -
    + -