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
//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
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
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
/* 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
/* 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
<?php | |
/** | |
* Plugin Name: Jonathan's Speed Plugin | |
* Plugin URI: https://bradgriffin.me | |
* Description: | |
* Version: 1 | |
* Author: Brad | |
* Author URI: https://bradgriffin.me | |
* Requires at least: 4.5 | |
* Tested up to: 4.5 |
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: Nikki Gets to Change Her Text | |
* Plugin URI: https://bradgriffin.me | |
* Description: | |
* Version: 1 | |
* Author: Brad | |
* Author URI: https://bradgriffin.me | |
* Requires at least: 4.5 | |
* Tested up to: 4.5 |
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
# Jason: First, open this image --> http://i.imgur.com/i7METNn.png # | |
# Now, assuming that there is already an .htaccess file in place, simply add the code below to that file # | |
AuthUserFile .htpasswd | |
AuthName "Staged Login Area" | |
AuthType Basic | |
require user dave |
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
[14-Jan-2016 20:47:29 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to Prompt_Wp_Mailer::__construct() must be an instance of Prompt_Interface_Http_Client, instance of Prompt_Comment_Email_Batch given, called in /home/bradgrif/public_html/wp-content/plugins/postmatic/core/mailers/comment-wp-mailer.php on line 25 and defined in /home/bradgrif/public_html/wp-content/plugins/postmatic/core/wp-mailer.php:10 | |
Stack trace: | |
#0 /home/bradgrif/public_html/wp-content/plugins/postmatic/core/mailers/comment-wp-mailer.php(25): Prompt_Wp_Mailer->__construct(Object(Prompt_Comment_Email_Batch), NULL, NULL, 0) | |
#1 /home/bradgrif/public_html/wp-content/plugins/postmatic/core/factory.php(92): Prompt_Comment_Wp_Mailer->__construct(Object(Prompt_Comment_Email_Batch)) | |
#2 /home/bradgrif/public_html/wp-content/plugins/postmatic/core/factory.php(26): Prompt_Factory::make_local_mailer(Object(Prompt_Comment_Email_Batch), '') | |
#3 /home/bradgrif/public_html/wp-content/plugins/postmatic/core/comment-mailing.php(26): Prompt_Fac |