• 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)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘replace local pick up by the shipping id.’ is closed to new replies.