html-product-data-shipping.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. exit;
  4. }
  5. ?>
  6. <div id="shipping_product_data" class="panel woocommerce_options_panel hidden">
  7. <div class="options_group">
  8. <?php
  9. if ( wc_product_weight_enabled() ) {
  10. woocommerce_wp_text_input(
  11. array(
  12. 'id' => '_weight',
  13. 'value' => $product_object->get_weight( 'edit' ),
  14. 'label' => __( 'Weight', 'woocommerce' ) . ' (' . get_option( 'woocommerce_weight_unit' ) . ')',
  15. 'placeholder' => wc_format_localized_decimal( 0 ),
  16. 'desc_tip' => true,
  17. 'description' => __( 'Weight in decimal form', 'woocommerce' ),
  18. 'type' => 'text',
  19. 'data_type' => 'decimal',
  20. )
  21. );
  22. }
  23. if ( wc_product_dimensions_enabled() ) {
  24. ?>
  25. <p class="form-field dimensions_field">
  26. <?php /* translators: WooCommerce dimension unit*/ ?>
  27. <label for="product_length"><?php printf( __( 'Dimensions (%s)', 'woocommerce' ), get_option( 'woocommerce_dimension_unit' ) ); ?></label>
  28. <span class="wrap">
  29. <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' ) ) ); ?>" />
  30. <input 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' ) ) ); ?>" />
  31. <input 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' ) ) ); ?>" />
  32. </span>
  33. <?php echo wc_help_tip( __( 'LxWxH in decimal form', 'woocommerce' ) ); ?>
  34. </p>
  35. <?php
  36. }
  37. do_action( 'woocommerce_product_options_dimensions' );
  38. ?>
  39. </div>
  40. <div class="options_group">
  41. <?php
  42. $args = array(
  43. 'taxonomy' => 'product_shipping_class',
  44. 'hide_empty' => 0,
  45. 'show_option_none' => __( 'No shipping class', 'woocommerce' ),
  46. 'name' => 'product_shipping_class',
  47. 'id' => 'product_shipping_class',
  48. 'selected' => $product_object->get_shipping_class_id( 'edit' ),
  49. 'class' => 'select short',
  50. );
  51. ?>
  52. <p class="form-field dimensions_field">
  53. <label for="product_shipping_class"><?php esc_html_e( 'Shipping class', 'woocommerce' ); ?></label>
  54. <?php wp_dropdown_categories( $args ); ?>
  55. <?php echo wc_help_tip( __( 'Shipping classes are used by certain shipping methods to group similar products.', 'woocommerce' ) ); ?>
  56. </p>
  57. <?php
  58. do_action( 'woocommerce_product_options_shipping' );
  59. ?>
  60. </div>
  61. </div>