This topic has 7 replies, 3 voices, and was last updated 1 weeks, 5 days ago ago by Andrew Mitchell
Hello
Please see the attached screenshot-1 and help me display the shipment fee after the subtotal.
Also, the free shipment should only be applied if the order amount exceeds 10,000. screenshot-2
How may I fix it?
Best Regards
Awais
Dear Awais Bhatti,
We hope this message finds you well.
At the moment, it is not possible to move the shipping fees to the total column when using the Checkout Page (Multistep) element.
However, if you would like to display only the Free Shipping method when the cart qualifies for an amount of 10,000 or more, you can achieve this by adding the following custom code to the functions.php
file located in your child theme:
/**
* Hide shipping rates when free shipping is available.
* Updated to support WooCommerce 2.6 Shipping Zones.
*
* @param array $rates Array of rates found for the package.
* @return array
*/
function my_hide_shipping_when_free_is_available( $rates ) {
$free = array();
foreach ( $rates as $rate_id => $rate ) {
if ( 'free_shipping' === $rate->method_id ) {
$free[ $rate_id ] = $rate;
break;
}
}
return ! empty( $free ) ? $free : $rates;
}
add_filter( 'woocommerce_package_rates', 'my_hide_shipping_when_free_is_available', 100 );
For further details, you may refer to this article: [WooCommerce Free Shipping Customizations](https://developer.woocommerce.com/docs/free-shipping-customizations/#1-code-snippets).
Should you have any questions or need additional assistance, please feel free to reach out.
Best regards,
8Theme Team
Hello
I have copied the code in the functions.php
Screenshot 1
We must show at the checkout phase the shipping cost, like it is available on the cart page. otherwise how the user will understand the prince different between sub-total and total?
Screenshot 2
Somehow the paid shipment is gone and only free shipping is there.
Desired behavior was to charge for shipment (hide free shiping) if order value is below 10,000.
When the order value is above 10,000 the we hide flat rate shipping and show free shipping.
Best Regards
Awais
Dear Awais Bhatti,
We hope this message finds you well.
We kindly request you to review the following plugin: [WC Hide Shipping Methods](https://wordpress.org/plugins/wc-hide-shipping-methods/). We believe it may be helpful for your needs.
Thank you for your attention, and please feel free to reach out if you have any questions.
Best regards,
The 8Theme Team
Hi
I was able to solve the issue with the shipping method, thanks for helping.
But we must still show the shipping cost at the checkout phase, the same way it is shown on the cart page. Otherwise, how will the users understand the price difference between the sub-total and total?
Best Regards
Awais
Dear @Awais Bhatti,
We hope this message finds you well.
To ensure the shipping cost is displayed correctly, we kindly request that you update the Checkout element as per the following references:
– [Screenshot 1](https://prnt.sc/81IeBB6sFOT0)
– [Screenshot 2](https://prnt.sc/IJqX0heptmIb)
We hope this information is helpful. Should you need any further assistance, please do not hesitate to reach out.
Best regards,
The 8Theme Team
Dear Awais Bhatti,
As we continue our mission to exceed expectations, your insights become increasingly valuable. Could we, with all due respect, request your thoughtful feedback by giving our theme a deserved 5-star rating on ThemeForest?
Click here to share your valuable perspective: https://themeforest.net/downloads
Your time and trust are highly appreciated!
Best Regards,
The 8Theme Team
The issue related to '‘Why the shipment cost is not displayed on the checkout page?’' has been successfully resolved, and the topic is now closed for further responses