do_action('woocommerce_variation_options_dimensions', $loop, $variation_data, $variation); ?> </div> <div> <p class="form-row hide_if_variation_virtual form-row-full"><label><?php _e('Shipping class', 'woocommerce'); ?> </label> <?php wp_dropdown_categories(array('taxonomy' => 'product_shipping_class', 'hide_empty' => 0, 'show_option_none' => __('Same as parent', 'woocommerce'), 'name' => 'variable_shipping_class[' . $loop . ']', 'id' => '', 'selected' => $variation_object->get_shipping_class_id('edit'))); ?> </p> <?php if (wc_tax_enabled()) { woocommerce_wp_select(array('id' => "variable_tax_class{$loop}", 'name' => "variable_tax_class[{$loop}]", 'value' => $variation_object->get_tax_class('edit'), 'label' => __('Tax class', 'woocommerce'), 'options' => array_merge(array('parent' => __('Same as parent', 'woocommerce')), wc_get_product_tax_class_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'), 'wrapper_class' => 'form-row form-row-full')); /** * woocommerce_variation_options_tax action. * * @since 2.5.0 * * @param int $loop * @param array $variation_data * @param WP_Post $variation */ do_action('woocommerce_variation_options_tax', $loop, $variation_data, $variation); } ?> </div> <div> <?php
if (!defined('ABSPATH')) { exit; // Exit if accessed directly } global $wpdb; // Get the payment gateway $payment_gateway = wc_get_payment_gateway_by_order($order); // Get line items $line_items = $order->get_items(apply_filters('woocommerce_admin_order_item_types', 'line_item')); $line_items_fee = $order->get_items('fee'); $line_items_shipping = $order->get_items('shipping'); if (wc_tax_enabled()) { $order_taxes = $order->get_taxes(); $tax_classes = WC_Tax::get_tax_classes(); $classes_options = wc_get_product_tax_class_options(); $show_tax_columns = sizeof($order_taxes) === 1; } ?> <div class="woocommerce_order_items_wrapper wc-order-items-editable"> <table cellpadding="0" cellspacing="0" class="woocommerce_order_items"> <thead> <tr> <th class="item sortable" colspan="2" data-sort="string-ins"><?php _e('Item', 'woocommerce'); ?> </th> <?php do_action('woocommerce_admin_order_item_headers', $order); ?> <th class="item_cost sortable" data-sort="float"><?php
<?php if (!defined('ABSPATH')) { exit; } $settings = array(array('title' => __('Tax options', 'woocommerce'), 'type' => 'title', 'desc' => '', 'id' => 'tax_options'), array('title' => __('Prices entered with tax', 'woocommerce'), 'id' => 'woocommerce_prices_include_tax', 'default' => 'no', 'type' => 'radio', 'desc_tip' => __('This option is important as it will affect how you input prices. Changing it will not update existing products.', 'woocommerce'), 'options' => array('yes' => __('Yes, I will enter prices inclusive of tax', 'woocommerce'), 'no' => __('No, I will enter prices exclusive of tax', 'woocommerce'))), array('title' => __('Calculate tax based on', 'woocommerce'), 'id' => 'woocommerce_tax_based_on', 'desc_tip' => __('This option determines which address is used to calculate tax.', 'woocommerce'), 'default' => 'shipping', 'type' => 'select', 'class' => 'wc-enhanced-select', 'options' => array('shipping' => __('Customer shipping address', 'woocommerce'), 'billing' => __('Customer billing address', 'woocommerce'), 'base' => __('Shop base address', 'woocommerce'))), 'shipping-tax-class' => array('title' => __('Shipping tax class', 'woocommerce'), 'desc' => __('Optionally control which tax class shipping gets, or leave it so shipping tax is based on the cart items themselves.', 'woocommerce'), 'id' => 'woocommerce_shipping_tax_class', 'css' => 'min-width:150px;', 'default' => 'inherit', 'type' => 'select', 'class' => 'wc-enhanced-select', 'options' => array_merge(array('inherit' => __('Shipping tax class based on cart items', 'woocommerce')), wc_get_product_tax_class_options()), 'desc_tip' => true), array('title' => __('Rounding', 'woocommerce'), 'desc' => __('Round tax at subtotal level, instead of rounding per line', 'woocommerce'), 'id' => 'woocommerce_tax_round_at_subtotal', 'default' => 'no', 'type' => 'checkbox'), array('title' => __('Additional tax classes', 'woocommerce'), 'desc_tip' => __('List additional tax classes below (1 per line). This is in addition to the default "Standard rate".', 'woocommerce'), 'id' => 'woocommerce_tax_classes', 'css' => 'width:100%; height: 65px;', 'type' => 'textarea', 'default' => sprintf(__('Reduced rate%sZero rate', 'woocommerce'), PHP_EOL)), array('title' => __('Display prices in the shop', 'woocommerce'), 'id' => 'woocommerce_tax_display_shop', 'default' => 'excl', 'type' => 'select', 'class' => 'wc-enhanced-select', 'options' => array('incl' => __('Including tax', 'woocommerce'), 'excl' => __('Excluding tax', 'woocommerce'))), array('title' => __('Display prices during cart and checkout', 'woocommerce'), 'id' => 'woocommerce_tax_display_cart', 'default' => 'excl', 'type' => 'select', 'class' => 'wc-enhanced-select', 'options' => array('incl' => __('Including tax', 'woocommerce'), 'excl' => __('Excluding tax', 'woocommerce')), 'autoload' => false), array('title' => __('Price display suffix', 'woocommerce'), 'id' => 'woocommerce_price_display_suffix', 'default' => '', 'placeholder' => __('N/A', 'woocommerce'), 'type' => 'text', 'desc_tip' => __('Define text to show after your product prices. This could be, for example, "inc. Vat" to explain your pricing. You can also have prices substituted here using one of the following: {price_including_tax}, {price_excluding_tax}.', 'woocommerce')), array('title' => __('Display tax totals', 'woocommerce'), 'id' => 'woocommerce_tax_total_display', 'default' => 'itemized', 'type' => 'select', 'class' => 'wc-enhanced-select', 'options' => array('single' => __('As a single total', 'woocommerce'), 'itemized' => __('Itemized', 'woocommerce')), 'autoload' => false), array('type' => 'sectionend', 'id' => 'tax_options')); if (!wc_shipping_enabled()) { unset($settings['shipping-tax-class']); } return apply_filters('woocommerce_tax_settings', $settings);
</th> </tr> </tfoot> </table> </div> <?php woocommerce_wp_text_input(array('id' => '_download_limit', 'value' => -1 === $product_object->get_download_limit('edit') ? '' : $product_object->get_download_limit('edit'), 'label' => __('Download limit', 'woocommerce'), 'placeholder' => __('Unlimited', 'woocommerce'), 'description' => __('Leave blank for unlimited re-downloads.', 'woocommerce'), 'type' => 'number', 'custom_attributes' => array('step' => '1', 'min' => '0'))); woocommerce_wp_text_input(array('id' => '_download_expiry', 'value' => -1 === $product_object->get_download_expiry('edit') ? '' : $product_object->get_download_expiry('edit'), 'label' => __('Download expiry', 'woocommerce'), 'placeholder' => __('Never', 'woocommerce'), 'description' => __('Enter the number of days before a download link expires, or leave blank.', 'woocommerce'), 'type' => 'number', 'custom_attributes' => array('step' => '1', 'min' => '0'))); do_action('woocommerce_product_options_downloads'); ?> </div> <?php if (wc_tax_enabled()) { ?> <div class="options_group show_if_simple show_if_external show_if_variable"> <?php woocommerce_wp_select(array('id' => '_tax_status', 'value' => $product_object->get_tax_status('edit'), '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'))); woocommerce_wp_select(array('id' => '_tax_class', 'value' => $product_object->get_tax_class('edit'), 'label' => __('Tax class', 'woocommerce'), 'options' => wc_get_product_tax_class_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'); ?> </div> <?php } ?> <?php do_action('woocommerce_product_options_general_product_data'); ?> </div>