Skip to content

Instantly share code, notes, and snippets.

@flistefliste
Last active September 10, 2018 08:01

Revisions

  1. flistefliste renamed this gist Jul 30, 2015. 1 changed file with 3 additions and 1 deletion.
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,6 @@
    <?php
    $shipping_items = $order->get_items( 'shipping' );
    foreach($shipping_items as $el){
    $shipping_method_id = $el['method_id'] ;
    }
    }
    ?>
  2. flistefliste revised this gist Mar 24, 2015. 1 changed file with 1 addition and 5 deletions.
    6 changes: 1 addition & 5 deletions Get shipping method id WooCommerce
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,4 @@
    <?php

    $shipping_items = $order->get_items( 'shipping' );

    foreach($shipping_items as $el){
    $shipping_method_id = $el['method_id'] ;
    }
    ?>
    }
  3. flistefliste revised this gist Nov 6, 2014. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion Get shipping method id WooCommerce
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,4 @@
    <?php
    //consider $order is WC_order() object

    $shipping_items = $order->get_items( 'shipping' );

  4. flistefliste revised this gist Nov 6, 2014. 1 changed file with 7 additions and 4 deletions.
    11 changes: 7 additions & 4 deletions Get shipping method id WooCommerce
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,9 @@
    <?php
    //consider $order is WC_order() object

    $shipping_items = $order->get_items( 'shipping' );
    foreach($shipping_items as $el){
    $shipping_method_id = $el['method_id'] ;
    }
    $shipping_items = $order->get_items( 'shipping' );

    foreach($shipping_items as $el){
    $shipping_method_id = $el['method_id'] ;
    }
    ?>
  5. flistefliste created this gist Nov 6, 2014.
    6 changes: 6 additions & 0 deletions Get shipping method id WooCommerce
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    //consider $order is WC_order() object

    $shipping_items = $order->get_items( 'shipping' );
    foreach($shipping_items as $el){
    $shipping_method_id = $el['method_id'] ;
    }