is_on_sale()) $classes[] = 'price-on-sale';
if (!$product->is_in_stock()) $classes[] = 'price-not-in-stock';
?>
get_stock_status();
// Define the custom stock statuses and their corresponding labels
$custom_stock_statuses = array(
'one_to_two_weeks' => __('Production Time 1 to 2 weeks', 'woocommerce'),
'two_to_three_weeks' => __('Production Time 2 to 3 weeks', 'woocommerce'),
'three_to_four_weeks' => __('Production Time 3 to 4 weeks', 'woocommerce'),
'four_to_five_weeks' => __('Production Time 4 to 5 weeks', 'woocommerce'),
'five_to_six_weeks' => __('Production Time 5 to 6 weeks', 'woocommerce'),
'six_to_seven_weeks' => __('Production Time 6 to 7 weeks', 'woocommerce'),
'six_to_eight_weeks' => __('Production Time 6 to 8 weeks', 'woocommerce'),
'seven_to_eight_weeks' => __('Production Time 7 to 8 weeks', 'woocommerce'),
'eight_to_nine_weeks' => __('Production Time 8 to 9 weeks', 'woocommerce'),
'eight_to_ten_weeks' => __('Production Time 8 to 10 weeks', 'woocommerce'),
'nine_to_ten_weeks' => __('Production Time 9 to 10 weeks', 'woocommerce'),
'ten_to_eleven_weeks' => __('Production Time 10 to 11 weeks', 'woocommerce'),
'eleven_to_twelve_weeks' => __('Production Time 11 to 12 weeks', 'woocommerce'),
'time_to_be_advised' => __('Production Time To Be Advised', 'woocommerce'),
);
// If the stock status is "In Stock", display the custom status text
if ($stock_status === 'instock') {
echo '' . esc_html($custom_stock_statuses['eight_to_nine_weeks']) . '
';
} elseif (array_key_exists($stock_status, $custom_stock_statuses)) {
// If the stock status matches one of the custom stock statuses, display it
echo '' . esc_html($custom_stock_statuses[$stock_status]) . '
';
}
?>
Shipment is by FedEx, UPS or DHL International Express Courier with a normal door-to-door delivery time worldwide of within 2-3 business days after dispatch. Due to the current volatility of world fuel prices, the amount mentioned here is our best estimate for DHL and UPS and may be subject to change at the time of shipping.
Model Description:
Manufacturer:
Product statistics
has_dimensions()) {
$dimensions = $product->get_dimensions(false);
// Retrieve individual dimensions
$length = $dimensions['length'];
$width = $dimensions['width'];
$height = $dimensions['height'];
// Retrieve the weight
$weight = get_post_meta($product->get_id(), '_purchase_note', true);
// Convert inches to centimeters
$length_cm = is_numeric($length) ? round($length * 2.54, 2) : '';
$width_cm = is_numeric($width) ? round($width * 2.54, 2) : '';
$height_cm = is_numeric($height) ? round($height * 2.54, 2) : '';
// Get the product category and use it as the category code
$categories = get_the_terms($product->get_id(), 'product_cat');
$category_code = '';
if (!empty($categories)) {
foreach ($categories as $category) {
$category_code = $category->slug;
break; // Get only the first category
}
}
// Display the dimensions and weight
if (!empty($length_cm)) {
echo 'Length: ' . $length . ' in (' . $length_cm . ' cm) ;
';
}
if (!empty($width_cm)) {
if ($category_code === 'hel') {
echo 'Rotor Diameter: ' . $width . ' in (' . $width_cm . ' cm) ;
';
} else {
echo 'Width: ' . $width . ' in (' . $width_cm . ' cm) ;
';
}
}
if (!empty($height_cm)) {
echo 'Height: ' . $height . ' in (' . $height_cm . ' cm)
';
}
if (!empty($weight)) {
echo 'Scale: 1:' . $weight . '
';
}
if (!empty(get_field('registration'))) {
echo 'Registration: ' . get_field('registration');
}
}
?>