Created
          September 16, 2014 05:09 
        
      - 
      
- 
        Save rayflores/a5ac9e590fb269d9c2c9 to your computer and use it in GitHub Desktop. 
    If you needed to add notes close to the available shipping methods
  
        
  
    
      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 | |
| /** | |
| * Plugin Name: WooCommerce Add Shipping Notes | |
| * Description: Adds some shipping notes to the cart page | |
| * Version: 1.0.0 | |
| * Author: Ray Flores | |
| * Author URI: http://www.rayflores.com | |
| * Requires at least: 3.9 | |
| * Tested up to: 3.9 | |
| * | |
| * License: GNU General Public License v3.0 | |
| * License URI: http://www.gnu.org/licenses/gpl-3.0.html | |
| */ | |
| //uncomment if you're showing shipping in the cart | |
| //add_action( 'woocommerce_cart_collaterals', 'wc_add_shipping_notes_in_cart_display' ); | |
| function wc_add_shipping_notes_in_cart_display() { | |
| ?> | |
| <div class="woocommerce-content-box one_half first cart-totals-container" style="width:43%;margin-top:20px;"> | |
| <div class="shipping-notes"> | |
| <h2><?php _e( 'Shipping Notes', 'woocommerce' ) ?></h2> | |
| <table cellspacing="0"> | |
| <tbody> | |
| <tr class="shipping-note"> | |
| <td style="font-weight:bold;">» To view delivery for UPS Ground <a href="http://www.ups.com/maps/results?zip=11111" style="text-decoration:underline;">Click here</a></td> | |
| </tr> | |
| <tr class="shipping-note"> | |
| <td style="font-weight:bold;">» USPS Priority Mail is slower than UPS Ground</td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <?php } | |
| // review-order.php shows available hooks | |
| add_action('woocommerce_review_order_after_shipping','wc_add_shipping_notes_in_checkout_display'); | |
| function wc_add_shipping_notes_in_checkout_display() { | |
| ?> | |
| <th class="shipping-notes" style="text-align:left;"><?php _e( 'Shipping Notes', 'woocommerce' ) ?> | |
| <br/><span style="font-weight:normal;">» To view delivery for UPS Ground <a href="http://www.ups.com/maps/results?zip=60174" style="text-decoration:underline;" target="_blank">Click here</a> | |
| <br/>» USPS Priority Mail is slower than UPS Ground</span></th> | |
| <?php } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment