This file contains 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 | |
add_filter( 'woocommerce_shipping_package_name', 'rmg_package_names', 10, 3 ); | |
function rmg_package_names( $package_name, $i, $package ) { | |
if ( ! empty( $package['name'] ) ) { | |
$package_name = $package['name']; | |
} |
This file contains 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
// Hide standard shipping option when free shipping is available | |
add_filter( 'woocommerce_available_shipping_methods', 'hide_standard_shipping_when_free_is_available' , 10, 1 ); | |
/** | |
* Hide Standard Shipping option when free shipping is available | |
* | |
* @param array $available_methods | |
*/ | |
function hide_standard_shipping_when_free_is_available( $available_methods ) { |
This file contains 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 Email Customer Address | |
* Plugin URI: https://gist.github.com/BFTrick/7891074 | |
* Description: Email the site admin when a customer changes their address | |
* Author: Patrick Rauland | |
* Author URI: http://patrickrauland.com/ | |
* Version: 1.0 | |
* | |
* This program is free software: you can redistribute it and/or modify |
This file contains 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: Your Shipping plugin | |
Plugin URI: http://woothemes.com/woocommerce | |
Description: Your shipping method plugin | |
Version: 1.0.0 | |
Author: WooThemes | |
Author URI: http://woothemes.com | |
*/ |
This file contains 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
add_filter( 'woocommerce_order_formatted_billing_address' , 'woo_custom_order_formatted_billing_address' ); | |
/** | |
* woo_custom_order_formatted_billing_address | |
* | |
* @access public | |
* @since 1.0 | |
* @return void | |
*/ | |
function woo_custom_order_formatted_billing_address() { |
This file contains 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
add_filter( 'woocommerce_order_formatted_shipping_address' , 'woo_custom_order_formatted_shipping_address' ); | |
/** | |
* woo_custom_order_formatted_shipping_address | |
* | |
* @access public | |
* @since 1.0 | |
* @return void | |
*/ | |
function woo_custom_order_formatted_shipping_address() { |
This file contains 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
<!-- http://benalman.com/projects/jquery-urlinternal-plugin/ --> | |
<script src='<?php bloginfo('template_directory'); ?>/js/jquery.ba-urlinternal.min.js'></script> | |
<!-- http://www.asual.com/jquery/address/ --> | |
<script src='<?php bloginfo('template_directory'); ?>/js/jquery.address-1.3.min.js'></script> | |
<script> | |
// Original JavaScript by Chris Coyier | |
// Updated October 2010 by Stewart Heckenberg & Chris Coyier |
This file contains 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
add_action( 'woocommerce_email_after_order_table', 'add_payment_method_to_admin_new_order', 15, 2 ); | |
/** | |
* Add used coupons to the order confirmation email | |
* | |
*/ | |
function add_payment_method_to_admin_new_order( $order, $is_admin_email ) { | |
if ( $is_admin_email ) { | |