Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter slicedgifts

    (@slicedgifts)

    Added this to functions.php of child theme as a workaround.

    add_filter('woocommerce_package_rates', 'sort_shipping_methods', 10, 2);
    function sort_shipping_methods($rates, $package) {
    // Here define the primary shipping method key
    $shipping_method_key = 'gls_shipping_method';

    if (isset($rates[$shipping_method_key])) {
    $rates1[$shipping_method_key] = $rates[$shipping_method_key];
    unset($rates[$shipping_method_key]);
    }
    return isset($rates1) ? array_merge($rates1, $rates) : $rates;
    }

    add_action( 'woocommerce_after_shipping_rate', 'Mcs_shipping_rate_des' );
    function Mcs_shipping_rate_des( $method ) {
    if ( $method->id === 'gls_shipping_method' ) {
    echo '<div class="shipping-method-description"><p style="font-size:14px; font-weight:400; margin-top:10px">Obave?tenje o prispe?u po?iljke u vidu mejla i SMS poruke kao i okvirno vreme uru?enja u rasponu od 3 sata. Mogu?nost promene termina uru?enja kao i preusmeravanje po?iljke na drugu adresu. Najava kurira sat vremena uo?i uru?enja. Direktan kontakt telefon kurira. 3 poku?aja uru?enja.</p></div>';
    }
    }
Viewing 1 replies (of 1 total)