html-order-download-permission.php
6 years ago
html-order-fee.php
3 months ago
html-order-item-meta.php
4 years ago
html-order-item.php
9 months ago
html-order-items.php
1 month ago
html-order-notes.php
1 month ago
html-order-refund.php
3 months ago
html-order-shipping.php
3 months ago
html-product-attribute-inner.php
1 month ago
html-product-attribute.php
3 years ago
html-product-data-advanced.php
5 months ago
html-product-data-attributes.php
1 month ago
html-product-data-general.php
2 months ago
html-product-data-inventory.php
4 months ago
html-product-data-linked-products.php
3 months ago
html-product-data-panel.php
1 year ago
html-product-data-shipping.php
3 years ago
html-product-data-variations.php
1 month ago
html-product-download.php
4 months ago
html-product-variation-download.php
4 months ago
html-variation-admin.php
1 month ago
html-product-data-shipping.php
81 lines
| 1 | <?php |
| 2 | use Automattic\WooCommerce\Utilities\I18nUtil; |
| 3 | |
| 4 | if ( ! defined( 'ABSPATH' ) ) { |
| 5 | exit; |
| 6 | } |
| 7 | ?> |
| 8 | <div id="shipping_product_data" class="panel woocommerce_options_panel hidden"> |
| 9 | <div class="options_group"> |
| 10 | <?php |
| 11 | if ( wc_product_weight_enabled() ) { |
| 12 | woocommerce_wp_text_input( |
| 13 | array( |
| 14 | 'id' => '_weight', |
| 15 | 'value' => $product_object->get_weight( 'edit' ), |
| 16 | 'label' => sprintf( |
| 17 | /* translators: %s: Weight unit */ |
| 18 | __( 'Weight (%s)', 'woocommerce' ), |
| 19 | I18nUtil::get_weight_unit_label( get_option( 'woocommerce_weight_unit', 'kg' ) ) |
| 20 | ), |
| 21 | 'placeholder' => wc_format_localized_decimal( 0 ), |
| 22 | 'desc_tip' => true, |
| 23 | 'description' => __( 'Weight in decimal form', 'woocommerce' ), |
| 24 | 'type' => 'text', |
| 25 | 'data_type' => 'decimal', |
| 26 | ) |
| 27 | ); |
| 28 | } |
| 29 | |
| 30 | if ( wc_product_dimensions_enabled() ) { |
| 31 | ?> |
| 32 | <p class="form-field dimensions_field"> |
| 33 | <label for="product_length"> |
| 34 | <?php |
| 35 | printf( |
| 36 | /* translators: WooCommerce dimension unit */ |
| 37 | esc_html__( 'Dimensions (%s)', 'woocommerce' ), |
| 38 | esc_html( I18nUtil::get_dimensions_unit_label( get_option( 'woocommerce_dimension_unit' ) ) ) |
| 39 | ); |
| 40 | ?> |
| 41 | </label> |
| 42 | <span class="wrap"> |
| 43 | <input id="product_length" placeholder="<?php esc_attr_e( 'Length', 'woocommerce' ); ?>" class="input-text wc_input_decimal" size="6" type="text" name="_length" value="<?php echo esc_attr( wc_format_localized_decimal( $product_object->get_length( 'edit' ) ) ); ?>" /> |
| 44 | <input id="product_width" placeholder="<?php esc_attr_e( 'Width', 'woocommerce' ); ?>" class="input-text wc_input_decimal" size="6" type="text" name="_width" value="<?php echo esc_attr( wc_format_localized_decimal( $product_object->get_width( 'edit' ) ) ); ?>" /> |
| 45 | <input id="product_height" placeholder="<?php esc_attr_e( 'Height', 'woocommerce' ); ?>" class="input-text wc_input_decimal last" size="6" type="text" name="_height" value="<?php echo esc_attr( wc_format_localized_decimal( $product_object->get_height( 'edit' ) ) ); ?>" /> |
| 46 | </span> |
| 47 | <?php echo wc_help_tip( __( 'LxWxH in decimal form', 'woocommerce' ) ); ?> |
| 48 | </p> |
| 49 | <?php |
| 50 | } |
| 51 | |
| 52 | do_action( 'woocommerce_product_options_dimensions' ); |
| 53 | ?> |
| 54 | </div> |
| 55 | |
| 56 | <div class="options_group"> |
| 57 | <?php |
| 58 | $args = array( |
| 59 | 'taxonomy' => 'product_shipping_class', |
| 60 | 'hide_empty' => 0, |
| 61 | 'show_option_none' => __( 'No shipping class', 'woocommerce' ), |
| 62 | 'name' => 'product_shipping_class', |
| 63 | 'id' => 'product_shipping_class', |
| 64 | 'selected' => $product_object->get_shipping_class_id( 'edit' ), |
| 65 | 'class' => 'select short', |
| 66 | 'orderby' => 'name', |
| 67 | ); |
| 68 | ?> |
| 69 | <p class="form-field shipping_class_field"> |
| 70 | <label for="product_shipping_class"><?php esc_html_e( 'Shipping class', 'woocommerce' ); ?></label> |
| 71 | <?php wp_dropdown_categories( $args ); ?> |
| 72 | <?php echo wc_help_tip( __( 'Shipping classes are used by certain shipping methods to group similar products.', 'woocommerce' ) ); ?> |
| 73 | </p> |
| 74 | <?php |
| 75 | |
| 76 | do_action( 'woocommerce_product_options_shipping' ); |
| 77 | ?> |
| 78 | </div> |
| 79 | <?php do_action( 'woocommerce_product_options_shipping_product_data' ); ?> |
| 80 | </div> |
| 81 |