WC_Admin_Setup_Wizard::get_product_dimension_selection
Deprecated since 4.6.0. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.
Render a product dimension unit dropdown.
Method of the class: WC_Admin_Setup_Wizard{}
No Hooks.
Returns
String|false.
Usage
// protected - for code of main (parent) or child class $result = $this->get_product_dimension_selection();
Changelog
| Deprecated since | 4.6.0 |
WC_Admin_Setup_Wizard::get_product_dimension_selection() WC Admin Setup Wizard::get product dimension selection code WC 10.7.0
<?php
protected function get_product_dimension_selection() {
_deprecated_function( __CLASS__ . '::' . __FUNCTION__, '4.6.0', 'Onboarding is maintained in WooCommerce Admin.' );
$dimension_unit = get_option( 'woocommerce_dimension_unit' );
ob_start();
?>
<span class="wc-setup-shipping-unit">
<select id="dimension_unit" name="dimension_unit" class="wc-enhanced-select">
<option value="m" <?php selected( $dimension_unit, 'm' ); ?>><?php esc_html_e( 'Meters', 'woocommerce' ); ?></option>
<option value="cm" <?php selected( $dimension_unit, 'cm' ); ?>><?php esc_html_e( 'Centimeters', 'woocommerce' ); ?></option>
<option value="mm" <?php selected( $dimension_unit, 'mm' ); ?>><?php esc_html_e( 'Millimeters', 'woocommerce' ); ?></option>
<option value="in" <?php selected( $dimension_unit, 'in' ); ?>><?php esc_html_e( 'Inches', 'woocommerce' ); ?></option>
<option value="yd" <?php selected( $dimension_unit, 'yd' ); ?>><?php esc_html_e( 'Yards', 'woocommerce' ); ?></option>
</select>
</span>
<?php
return ob_get_clean();
}