WordPress at Your Fingertips
function is not described

WC_Admin_Setup_Wizard::get_product_dimension_selection() protected WC 1.0

Deprecated from version 4.6.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Render a product dimension unit dropdown.

{} It's a method of the class: WC_Admin_Setup_Wizard{}

No Hooks.




// protected - for code of main (parent) or child class
$result = $this->get_product_dimension_selection();


Deprecated 4.6.0

Code of WC_Admin_Setup_Wizard::get_product_dimension_selection() WC 5.9.0

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' );
	<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>

	return ob_get_clean();