-
AuthorPosts
-
January 23, 2019 at 2:33 pm #1057741
Hi I have a problem hiding all other shipping except shipping free on my http://www.coccoledibellezza.it I followed the instructions of the documentation of woothemes but when active the child theme of enfold crashes can you help me please? thanks gianluca
/**
* 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 );January 24, 2019 at 10:44 pm #1058375Hey sitibus,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( do be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create a admin user and post the login credentials in the “private data” field.Best regards,
BasilisJanuary 25, 2019 at 12:10 am #1058424This reply has been marked as private.January 28, 2019 at 4:38 am #1059502Hi,
Thanks for the update. There are no other shipping method aside from “free shipping” in the woocommerce settings. Why do you need that filter?
Best regards,
IsmaelJanuary 28, 2019 at 7:55 am #1059538There’s a free shipping method. You can see it available in your cart. if you make an order greater then 50 euros.
In that case you won’t have to choose between that method and flat rateJanuary 29, 2019 at 11:40 pm #1060238Hi,
Can you please contact the WooCommere support to see where the issue is located?
Best regards,
Basilis -
AuthorPosts
- You must be logged in to reply to this topic.