title: Display custom content based on shipping method in Woocommerce email notification
body: <p>After Woocommerce update to 3.2, This code below does not work anymore.</p>
  
  <pre><code>add_action( 'woocommerce_email_order_details', 'my_completed_order_email_instructions', 10, 4 );
  function my_completed_order_email_instructions( $order, $sent_to_admin, $plain_text, $email ) {
  
      // Only for "Customer Completed Order" email notification
      if( 'customer_completed_order' != $email-&gt;id ) return;
  
      // Comptibility With WC 3.0+
      if ( method_exists( $order, 'get_id' ) ) {
          $order_id = $order-&gt;get_id();
      } else {
          $order_id = $order-&gt;id;
      }
      //$order-&gt;has_shipping_method('')
      $shipping_method_arr = get_post_meta($order_id, '_shipping_method', false); // an array
      $rate_id = $shipping_method_arr[0][0]; // the rate ID
  
      if ( 'flat_rate:10' == $rate_id ){
          echo pll__("Text 1");
      } else {
          echo pll__("Text 2");
      }
  }
  </code></pre>
  
  <p>What is wrong or obsolete in this code?<br>
  What changes need to be done to make it work again?</p>