Created
          September 4, 2014 05:00 
        
      - 
      
- 
        Save rayflores/ec868f3efd55f7565ce0 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| /** | |
| * Shipping Methods Display - cart-shipping.php template /woocommerce/cart/cart-shipping.php | |
| * | |
| * In 2.1 we show methods per package. This allows for multiple methods per order if so desired. | |
| * | |
| * @author WooThemes | |
| * @package WooCommerce/Templates | |
| * @version 2.1.0 | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
| ?> | |
| <?php | |
| foreach ( $package['contents'] as $item_id => $values ) { | |
| if ( $values['data']->needs_shipping() ) { | |
| $shipm = $values['data']->get_shipping_class(); | |
| //echo print_r( $shipm, true ); // make sure you are capturing classes by printing them to the screen here | |
| } | |
| } | |
| ?> | |
| <tr class="shipping"> | |
| <th><?php | |
| if ( $show_package_details ) { | |
| $num_index = $index + 1; | |
| if($shipm == 'class-1') { | |
| _e( 'Class One Title', 'woocommerce' ); | |
| } elseif($shipm == 'class-2'){ | |
| _e( 'Class Two Title', 'woocommerce' ); | |
| //printf( __( 'Shipping #%d', 'woocommerce' ), $num_index ); | |
| } elseif($shipm == 'class-3'){ | |
| _e( 'Class Three Title', 'woocommerce' ); | |
| }elseif($shipm == 'free-shipping'){ | |
| _e( 'Free Shipping Class', 'woocommerce' ); | |
| } | |
| } else { | |
| _e( 'Shipping and Handling', 'woocommerce' ); | |
| } | |
| ?></th> | 
I would also be grateful to hear from you on how to implement this. I came here via https://wordpress.org/support/topic/shipping-titles/#post-4967609, and I am looking for a way to rename the split shipping packages.
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Hello, I know this is old and I'm new to all this, but where would I implement this code into the cart-shipping.php?