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
I am sorry to say this customization is not covered under our [Support Policy](http://www.woothemes.com/support-policy). However, we recommend that you contact one of the following services regarding custom development for your site: | |
* [WooExperts](https://www.woothemes.com/wooexperts/) | |
* [Codeable](http://codeable.io/?utm_source=ZenDesk&utm_medium=ticket-reply&utm_campaign=Custom%20Referral) |
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
I am sorry to say this customization is not covered under our [Support Policy](http://www.woothemes.com/support-policy). However, we recommend that you contact one of the following services regarding custom development for your site: | |
* [WooExperts](https://www.woothemes.com/wooexperts/) | |
* [Codeable](http://codeable.io/?utm_source=ZenDesk&utm_medium=ticket-reply&utm_campaign=Custom%20Referral) |
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 | |
/** | |
* Composite front-end filters and functions. | |
* | |
* @class WC_CP_Display | |
* @version 3.5.0 | |
* @since 2.2.2 | |
*/ | |
// Exit if accessed directly. |
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
PACKAGE 1 (0) | |
stdClass Object | |
( | |
[id] => | |
[packed] => Array | |
( | |
[0] => WC_Boxpack_Item Object | |
( | |
[weight] => 0.69 | |
[height] => 0.30 |
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
/*-----------------------------------------------------------------------------------*/ | |
/* You can add custom functions below */ | |
/*-----------------------------------------------------------------------------------*/ | |
// Add Login & Logout to Navigation Menu. Found on http://www.pootlepress.com | |
add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 ); | |
function add_loginout_link( $items, $args ) { | |
if (is_user_logged_in() && $args->theme_location == 'primary-menu') { | |
$items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>'; | |
} |
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
// Found on http://www.pootlepress.com | |
add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 ); | |
function add_loginout_link( $items, $args ) { | |
if (is_user_logged_in() && $args->theme_location == 'primary-menu') { | |
$items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>'; | |
} | |
elseif (!is_user_logged_in() && $args->theme_location == 'primary-menu') { | |
$items .= '<li><a href="'. site_url('wp-login.php') .'">Log In</a></li>'; | |
} | |
return $items; |
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 | |
/*-----------------------------------------------------------------------------------*/ | |
/* This is a great section header, since it takes space and stands out. */ | |
/*-----------------------------------------------------------------------------------*/ | |
// Note that a line doesn't have a character limit - as long as you don't hit enter/return on your keyboard, one mark will null the entire bit. | |
/* The same thing goes for this way. */ | |
This line is missing a prefix. | |
// This one has a prefix, and that line above is going to be a problem. |
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 | |
/*-----------------------------------------------------------------------------------*/ | |
/* Start WooThemes Functions - Please refrain from editing this section */ | |
/*-----------------------------------------------------------------------------------*/ | |
// Set path to WooFramework and theme specific functions | |
$functions_path = get_template_directory() . '/functions/'; | |
$includes_path = get_template_directory() . '/includes/'; |
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_cart_no_shipping_available_html', 'change_noship_message', 10, 1 ); | |
add_filter( 'woocommerce_no_shipping_available_html', 'change_noship_message', 10, 1 ); | |
function change_noship_message( $default ) { | |
$search_shipping_class = 32; // Use Shipping Class ID | |
$cart_shipping_classes = array(); | |
foreach( WC()->cart->cart_contents as $key => $values ) | |
$cart_shipping_classes[] = $values[ 'data' ]->get_shipping_class_id(); | |
$cart_shipping_classes = array_unique( $cart_shipping_classes ); |