From f6b7ab97b19a6780ad1f11cebee017650822f316 Mon Sep 17 00:00:00 2001 From: Tor Morten Jensen Date: Thu, 20 Aug 2015 14:33:25 +0200 Subject: [PATCH 1/2] Adds tooltips to explain 'tax class' and 'tax status' in product admin. Addresses #8817 --- includes/admin/meta-boxes/class-wc-meta-box-product-data.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-product-data.php b/includes/admin/meta-boxes/class-wc-meta-box-product-data.php index 58733df99e9..f53ca0b461c 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 @@ -256,7 +256,7 @@ class WC_Meta_Box_Product_Data { 'taxable' => __( 'Taxable', 'woocommerce' ), 'shipping' => __( 'Shipping only', 'woocommerce' ), 'none' => _x( 'None', 'Tax status', 'woocommerce' ) - ) ) ); + ), 'desc_tip' => 'true', 'description' => __( 'The tax status specifies which part of your product tax will be calculated on.', 'woocommerce' ) ) ); $tax_classes = WC_Tax::get_tax_classes(); $classes_options = array(); @@ -269,7 +269,7 @@ class WC_Meta_Box_Product_Data { } } - woocommerce_wp_select( array( 'id' => '_tax_class', 'label' => __( 'Tax Class', 'woocommerce' ), 'options' => $classes_options ) ); + woocommerce_wp_select( array( 'id' => '_tax_class', 'label' => __( 'Tax Class', 'woocommerce' ), 'options' => $classes_options, 'desc_tip' => 'true', 'description' => __( 'The tax class specifies what tax rate your product will be calculated with.', 'woocommerce' ) ) ); do_action( 'woocommerce_product_options_tax' ); From 574c0b29362cce3f0764ab0cc1444322afcd6fe8 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Fri, 21 Aug 2015 15:25:03 +0100 Subject: [PATCH 2/2] Update wording --- .../class-wc-meta-box-product-data.php | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-product-data.php b/includes/admin/meta-boxes/class-wc-meta-box-product-data.php index f53ca0b461c..4bf7fe95420 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 @@ -252,24 +252,35 @@ class WC_Meta_Box_Product_Data { echo '
'; // Tax - woocommerce_wp_select( array( 'id' => '_tax_status', 'label' => __( 'Tax Status', 'woocommerce' ), 'options' => array( - 'taxable' => __( 'Taxable', 'woocommerce' ), - 'shipping' => __( 'Shipping only', 'woocommerce' ), - 'none' => _x( 'None', 'Tax status', 'woocommerce' ) - ), 'desc_tip' => 'true', 'description' => __( 'The tax status specifies which part of your product tax will be calculated on.', 'woocommerce' ) ) ); + woocommerce_wp_select( array( + 'id' => '_tax_status', + 'label' => __( 'Tax Status', 'woocommerce' ), + 'options' => array( + 'taxable' => __( 'Taxable', 'woocommerce' ), + 'shipping' => __( 'Shipping only', 'woocommerce' ), + 'none' => _x( 'None', 'Tax status', 'woocommerce' ) + ), + 'desc_tip' => 'true', + 'description' => __( 'Define whether or not the entire product is taxable, or just the cost of shipping it.', 'woocommerce' ) + ) ); $tax_classes = WC_Tax::get_tax_classes(); $classes_options = array(); $classes_options[''] = __( 'Standard', 'woocommerce' ); if ( ! empty( $tax_classes ) ) { - foreach ( $tax_classes as $class ) { $classes_options[ sanitize_title( $class ) ] = esc_html( $class ); } } - woocommerce_wp_select( array( 'id' => '_tax_class', 'label' => __( 'Tax Class', 'woocommerce' ), 'options' => $classes_options, 'desc_tip' => 'true', 'description' => __( 'The tax class specifies what tax rate your product will be calculated with.', 'woocommerce' ) ) ); + woocommerce_wp_select( array( + 'id' => '_tax_class', + 'label' => __( 'Tax Class', 'woocommerce' ), + 'options' => $classes_options, + 'desc_tip' => 'true', + 'description' => __( 'Choose a tax class for this product. Tax classes are used to apply different tax rates specific to certain types of product.', 'woocommerce' ) + ) ); do_action( 'woocommerce_product_options_tax' );