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 a message above the login / register form on my-account page | |
*/ | |
add_action( 'woocommerce_before_customer_login_form', 'jk_login_message' ); | |
function jk_login_message() { | |
if ( get_option( 'woocommerce_enable_myaccount_registration' ) == 'yes' ) { | |
?> | |
<div class="woocommerce-info"> | |
<p><?php _e( 'Returning customers login. New users register for next time so you can:' ); ?></p> | |
<ul> |
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
/** | |
* Replace the home link URL | |
*/ | |
add_filter( 'woocommerce_breadcrumb_home_url', 'woo_custom_breadrumb_home_url' ); | |
function woo_custom_breadrumb_home_url() { | |
return 'http://woocommerce.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
/** | |
* Change several of the breadcrumb defaults | |
*/ | |
add_filter( 'woocommerce_breadcrumb_defaults', 'jk_woocommerce_breadcrumbs' ); | |
function jk_woocommerce_breadcrumbs() { | |
return array( | |
'delimiter' => ' / ', | |
'wrap_before' => '<nav class="woocommerce-breadcrumb" itemprop="breadcrumb">', | |
'wrap_after' => '</nav>', | |
'before' => '', |
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 a 1% surcharge to your cart / checkout based on delivery country | |
* Taxes, shipping costs and order subtotal are all included in the surcharge amount | |
*/ | |
add_action( 'woocommerce_cart_calculate_fees','woocommerce_custom_surcharge' ); | |
function woocommerce_custom_surcharge() { | |
global $woocommerce; | |
if ( is_admin() && ! defined( 'DOING_AJAX' ) ) | |
return; |
NewerOlder