Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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 );

    #1058375

    Hey sitibus,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. 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 ).
    5. Click ” Submit “.
    6. 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,
    Basilis

    #1058424
    This reply has been marked as private.
    #1059502

    Hi,

    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,
    Ismael

    #1059538

    There’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 rate

    #1060238

    Hi,

    Can you please contact the WooCommere support to see where the issue is located?

    Best regards,
    Basilis

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.