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
/* Clayton, you MUST add the code below to your CHILD THEME's functions.php file. */ | |
/* This will remove the sidebar on the product page */ | |
/* BEGIN No sidebar */ | |
function clayton_has_no_more_sidebar() { | |
if( is_product() ) | |
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 ); | |
} | |
add_action( 'template_redirect', 'clayton_has_no_more_sidebar' ); | |
/* End No sidebar */ |
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
/* Use a custom image for PayPal on WooCommerce checkout page. */ | |
/* Be sure to change line 6 to point to your new image */ | |
function my_new_paypal_icon() { | |
// picture of accepted credit card icons for PayPal payments | |
return get_stylesheet_directory_uri() . 'somefolder/images/your-new-image.jpg'; | |
} | |
add_filter( 'woocommerce_paypal_icon', 'my_new_paypal_icon' ); |
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
public function email_order_items_table( $args = array(), $deprecated1 = null, $deprecated2 = null, $deprecated3 = null, $deprecated4 = null, $deprecated5 = null ) { | |
ob_start(); | |
if ( ! is_null( $deprecated1 ) || ! is_null( $deprecated2 ) || ! is_null( $deprecated3 ) || ! is_null( $deprecated4 ) || ! is_null( $deprecated5 ) ) { | |
_deprecated_argument( __FUNCTION__, '2.5.0' ); | |
} |
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
add_filter( 'woocommerce_add_cart_item_data', 'rodolpho_is_a_sexy_beast_empty_cart', 10, 3); | |
function rodolpho_is_a_sexy_beast_empty_cart( $cart_item_data, $product_id, $variation_id ) | |
{ | |
global $woocommerce; | |
if ( $product_id == 851 ) { | |
$woocommerce->cart->empty_cart(); | |
} | |
return $cart_item_data; | |
} |
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
//Christina's function for showing ONLY related items in the SAME category// | |
// Christina, drop this into your CHILD functions.php file // | |
function get_related_custom( $id, $limit = 5 ) { | |
global $woocommerce; | |
$cats_array = array(0); | |
$terms = wp_get_post_terms($id, 'product_cat'); | |
foreach ( $terms as $term ) $cats_array[] = $term->term_id; |
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 | |
// Add Variation Settings | |
add_action( 'woocommerce_product_after_variable_attributes', 'variation_settings_fields', 10, 3 ); | |
// Save Variation Settings | |
add_action( 'woocommerce_save_product_variation', 'save_variation_settings_fields', 10, 2 ); | |
/** | |
* Create new fields for variations |
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 | |
/** | |
* Loop Add to Cart | |
* | |
* @author WooThemes | |
* @package WooCommerce/Templates | |
* @version 2.1.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { |
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
add_action( 'wp_dashboard_setup', 'register_my_dashboard_widget' ); | |
function register_my_dashboard_widget() { | |
wp_add_dashboard_widget( | |
'my_dashboard_widget', | |
'WpFixIt Sales At A Glance', | |
'my_dashboard_widget_display' | |
); | |
} |
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
// Begin Speed Tweaks // | |
function remove_cssjs_ver( $src ) { | |
if( strpos( $src, '?ver=' ) ) | |
$src = remove_query_arg( 'ver', $src ); | |
return $src; | |
} | |
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 ); | |
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 ); | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); |
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 | |
/** | |
* Welcome screen enhance template | |
*/ | |
?> | |
<?php | |
?> | |
<div class="col two-col" style="overflow: hidden;"> | |
<div class="col"> |