Support » Plugin: WooCommerce » replace local pick up by the shipping id.

  • Resolved coriassphenix

    (@coriassphenix)


    hi there i am trying to hide shipping id:3

    I found this code from https://www.wpexplorer.com/best-woocommerce-snippets-wordpress/ but I don’t how to make it work.
    I want to replace local pick up by the shipping id.

    Thank you very much

    $method_key_id = 'flat_rate:3';
    	
    	if ( ! empty( $new_rates ) ) {
    		//Save local pickup if it's present.
    		foreach ( $rates as $rate_id => $rate ) {
    			if ('local_pickup' === $rate->method_id ) {
    				$new_rates[ $rate_id ] = $rate;
    				break;

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support maykato

    (@maykato)

    Hello,

    Could you elaborate more on what you are trying to do? If you’d like to hide a specific method, you can do so from WooCommerce > Settings > Shipping > Shipping Zones > [Your Shipping Zone].

    Link to image: https://snipboard.io/eUmEgN.jpg

    Plugin Support maykato

    (@maykato)

    Hi @coriassphenix

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. If you have further questions, please feel free to open a new topic.

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