From 6dad8fdc59e194c1571ecedf8d5149cd449b8a46 Mon Sep 17 00:00:00 2001 From: Bryce Date: Fri, 21 Nov 2014 16:10:12 +0700 Subject: [PATCH 01/37] #6026 - Introduction of Sort Code 'locale' for BACS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the admin, it will use the store’s base country to determine the term for ‘Sort Code’. In the front-end, it will use the customer’s billing country to determine the term for ‘Sort Code’. In all cases, if a locale does not have a sortcode label set, it will use ‘Sort Code’. **Locales have been added for:** * AU * CA * IE * IN * IT * NZ * SE * US * GB * ZA But may need adjusting based on user feedback. --- includes/class-wc-countries.php | 53 +++++++++++++++---- .../gateways/bacs/class-wc-gateway-bacs.php | 27 ++++++++-- 2 files changed, 68 insertions(+), 12 deletions(-) diff --git a/includes/class-wc-countries.php b/includes/class-wc-countries.php index b956116fb85..68258a5b4d5 100644 --- a/includes/class-wc-countries.php +++ b/includes/class-wc-countries.php @@ -606,7 +606,10 @@ class WC_Countries { ), 'state' => array( 'label' => __( 'State', 'woocommerce' ), - ) + ), + 'sortcode' => array( + 'label' => __( 'BSB', 'woocommerce' ), + ), ), 'BD' => array( 'postcode' => array( @@ -643,7 +646,10 @@ class WC_Countries { 'CA' => array( 'state' => array( 'label' => __( 'Province', 'woocommerce' ), - ) + ), + 'sortcode' => array( + 'label' => __( 'Bank Transit Number', 'woocommerce' ), + ), ), 'CH' => array( 'postcode_before_city' => true, @@ -725,6 +731,16 @@ class WC_Countries { 'state' => array( 'label' => __( 'Province', 'woocommerce' ), ) + ), + 'IE' => array( + 'sortcode' => array( + 'label' => __( 'Sort Code', 'woocommerce' ), + ), + ), + 'IN' => array( + 'sortcode' => array( + 'label' => __( 'IFSC', 'woocommerce' ), + ), ), 'IS' => array( 'postcode_before_city' => true, @@ -743,7 +759,10 @@ class WC_Countries { 'state' => array( 'required' => true, 'label' => __( 'Province', 'woocommerce' ), - ) + ), + 'sortcode' => array( + 'label' => __( 'Branch Sort', 'woocommerce' ), + ), ), 'JP' => array( 'state' => array( @@ -765,7 +784,10 @@ class WC_Countries { 'NZ' => array( 'state' => array( 'required' => false - ) + ), + 'sortcode' => array( + 'label' => __( 'Bank Code', 'woocommerce' ), + ), ), 'NO' => array( 'postcode_before_city' => true, @@ -828,7 +850,10 @@ class WC_Countries { 'postcode_before_city' => true, 'state' => array( 'required' => false - ) + ), + 'sortcode' => array( + 'label' => __( 'Bank Code', 'woocommerce' ), + ), ), 'TR' => array( 'postcode_before_city' => true, @@ -842,7 +867,10 @@ class WC_Countries { ), 'state' => array( 'label' => __( 'State', 'woocommerce' ), - ) + ), + 'sortcode' => array( + 'label' => __( 'Routing Number', 'woocommerce' ), + ), ), 'GB' => array( 'postcode' => array( @@ -851,7 +879,10 @@ class WC_Countries { 'state' => array( 'label' => __( 'County', 'woocommerce' ), 'required' => false - ) + ), + 'sortcode' => array( + 'label' => __( 'Sort Code', 'woocommerce' ), + ), ), 'VN' => array( 'state' => array( @@ -875,7 +906,10 @@ class WC_Countries { 'ZA' => array( 'state' => array( 'label' => __( 'Province', 'woocommerce' ), - ) + ), + 'sortcode' => array( + 'label' => __( 'Branch Code', 'woocommerce' ), + ), ), 'ZW' => array( 'postcode' => array( @@ -892,8 +926,9 @@ 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() ] ); diff --git a/includes/gateways/bacs/class-wc-gateway-bacs.php b/includes/gateways/bacs/class-wc-gateway-bacs.php index 3922a74f70a..74e1a39f944 100644 --- a/includes/gateways/bacs/class-wc-gateway-bacs.php +++ b/includes/gateways/bacs/class-wc-gateway-bacs.php @@ -102,6 +102,13 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { */ public function generate_account_details_html() { ob_start(); + + $country = WC()->countries->get_base_country(); + $locale = WC()->countries->get_country_locale(); + + $sortcode_label = $locale[$country]['sortcode']['label']; + $sortcode = $sortcode_label ? $sortcode_label : __( 'Sort Code', 'woocommerce' ); + ?> : @@ -113,7 +120,7 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { - + @@ -240,12 +247,26 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { return; } + // Get order and store in $order + $order = wc_get_order( $order_id ); + + // Get the order country and country $locale + $country = $order->billing_country; + $locale = WC()->countries->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' ); + echo '

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

' . PHP_EOL; $bacs_accounts = apply_filters( 'woocommerce_bacs_accounts', $this->account_details ); if ( ! empty( $bacs_accounts ) ) { foreach ( $bacs_accounts as $bacs_account ) { + $bacs_account = (object) $bacs_account; if ( $bacs_account->account_name || $bacs_account->bank_name ) { @@ -261,7 +282,7 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { 'value' => $bacs_account->account_number ), 'sort_code' => array( - 'label' => __( 'Sort Code', 'woocommerce' ), + 'label' => $sortcode, 'value' => $bacs_account->sort_code ), 'iban' => array( @@ -310,4 +331,4 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { 'redirect' => $this->get_return_url( $order ) ); } -} +} \ No newline at end of file From 7abd1358fc3eb0e2ffb37f35df05b19d50f26c67 Mon Sep 17 00:00:00 2001 From: Bryce Date: Fri, 21 Nov 2014 16:13:03 +0700 Subject: [PATCH 02/37] Fix whitespace --- includes/class-wc-countries.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/class-wc-countries.php b/includes/class-wc-countries.php index 68258a5b4d5..99e62534e19 100644 --- a/includes/class-wc-countries.php +++ b/includes/class-wc-countries.php @@ -732,16 +732,16 @@ class WC_Countries { 'label' => __( 'Province', 'woocommerce' ), ) ), - 'IE' => array( + 'IE' => array( 'sortcode' => array( 'label' => __( 'Sort Code', 'woocommerce' ), ), - ), - 'IN' => array( + ), + 'IN' => array( 'sortcode' => array( 'label' => __( 'IFSC', 'woocommerce' ), ), - ), + ), 'IS' => array( 'postcode_before_city' => true, 'state' => array( From 3fd799741317e5116c7a237b6128f22a9f24c4fb Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 24 Nov 2014 21:26:33 +0700 Subject: [PATCH 03/37] 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 88c4c2394f966145aeaec539624f136f57cb2ea2 Mon Sep 17 00:00:00 2001 From: Illimar Tambek Date: Tue, 25 Nov 2014 16:59:29 +0200 Subject: [PATCH 04/37] 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: Wed, 26 Nov 2014 00:28:23 +0200 Subject: [PATCH 05/37] 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 c3fb83d4435fa2cef61179ebe9c6c2490101fed6 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 26 Nov 2014 10:56:51 +0000 Subject: [PATCH 06/37] 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 07/37] 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 08/37] 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 09/37] 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 10/37] 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' ); + ?> + + + + + + + + + cart->get_coupons( 'cart' ) as $code => $coupon ) : ?> + + + + + + + cart->needs_shipping() && WC()->cart->show_shipping() ) : ?> + + + + + + + -
    + cart->get_fees() as $fee ) : ?> + + name ); ?> + + + - + cart->tax_display_cart === 'excl' ) : ?> + + cart->get_tax_totals() as $code => $tax ) : ?> + + label ); ?> + formatted_amount ); ?> + + + + + countries->tax_or_vat() ); ?> + cart->get_taxes_total() ); ?> + + + - + 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" /> -

    - - - - -
    - -
    - -
    - - - -

    + + From 4bc63de72a374c8b269df50493f035e3a6350d39 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 26 Nov 2014 15:37:06 +0000 Subject: [PATCH 11/37] 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 12/37] 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 13/37] 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 14/37] 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 15/37] 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 16/37] 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 17/37] 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 19/37] 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 20/37] 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 21/37] 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 22/37] [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 23/37] [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 24/37] 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 25/37] 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 26/37] 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 27/37] 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 28/37] 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 29/37] 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 30/37] 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 31/37] 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 3af23cb7f56d5c3b85d9a108b2f90bccae4af239 Mon Sep 17 00:00:00 2001 From: Justin Sainton Date: Thu, 27 Nov 2014 20:15:49 -0800 Subject: [PATCH 32/37] 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 33/37] 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 34/37] 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 35/37] 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 36/37] 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 37/37] [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 );