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 | |
// THIS IS THE FILE FROM https://gist.github.com/woogist/5692886#file-gistfile1-php// | |
// ...and, believe it or not, I understand about 50% of this.// | |
// While that's better than the average Joe, it' still not enough to actually CONNECT the points // | |
// Anyone want to jump in here? // | |
// Add the action setting | |
add_filter( 'wc_points_rewards_action_settings', 'bkg_sensei_points' ); | |
function points_rewards_newsletter_action_settings( $settings ) { |
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 | |
function woo_extra_email_recipient($recipient, $object) { | |
$recipient = $recipient . ', [email protected]'; | |
return $recipient; | |
} | |
add_filter( 'woocommerce_low_stock', 'woo_extra_email_recipient', 10, 2); |
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
// Custom CSS to change Variation Dropdown // | |
.woocommerce div.product form.cart .variations select { | |
width: 190px; | |
float: left; | |
background: -webkit-linear-gradient(top, rgb(255, 255, 255) 0%,rgb(194, 204, 228) 100%); | |
border-radius: 5px; | |
border: 1px solid rgba(0,0,0,0.3); | |
box-shadow: 0 0 5px 1px rgba(0,0,0,0.2), inset 0 1px 0 0px rgba(255,255,255,0.3); | |
margin: 50px; | |
} |
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 | |
/** | |
* Yvan's child theme functions.php file. You can "move" this child function.php into ANY (<---pretty cool, right?) child theme that you want. | |
* | |
* @package storefront-child | |
*/ | |
// DO NOT REMOVE THIS FUNCTION AS IT LOADS THE PARENT THEME STYLESHEET | |
add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' ); | |
function enqueue_parent_theme_style() { |
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
/** | |
* Redirect user to checkout page directly after adding to cart | |
* | |
* @return string | |
*/ | |
function wc_redirect_to_checkout() { | |
$checkout_url = WC()->cart->get_checkout_url(); | |
return $checkout_url; | |
} |
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
/* | |
* Let's see if I can do dns prefetching correctly | |
*/ | |
add_action('wp_head', 'dns_prefetch'); | |
function dns_prefetch() { | |
echo '<link rel="dns-prefetch" href="//fonts.gstatic.com" />'; | |
echo '<link rel="dns-prefetch" href="//google-analytics.com" />'; | |
echo '<link rel="dns-prefetch" href="//google.com" />'; | |
echo '<link rel="dns-prefetch" href="//stats.g.doubleclick.net" />'; |
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
function woo_custom_wp_mail_from() { | |
global $woocommerce; | |
return html_entity_decode( '[email protected]' ); | |
} | |
add_filter( 'wp_mail_from', 'woo_custom_wp_mail_from', 99 ); |
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
// Our hooked in function - $fields is passed via the filter! | |
function dropdown( $fields ) { | |
$fields['billing']['dropdown'] = array( | |
'label' => __('Howdy Manja. Would You Like Your Order Gift Wrapped for Free?', 'woocommerce'), | |
'placeholder' => _x('dropdown', 'placeholder', 'woocommerce'), | |
'required' => false, | |
'class' => array('form-row-wide'), | |
'clear' => true, | |
'type' => 'select', | |
'options' => array( |
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
echo apply_filters( 'woocommerce_demo_store', '<p class="demo_store">' . '<a href ="https://www.facebook.com/groups/advanced.woocommerce/permalink/1087929507888134/">' . $notice .'</a>' . '</p>' ); |
This file has been truncated, but you can view the full file.
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
# BLOCK COUNTRY BY IP RANGE | |
# IncrediBILL's HTACCESS Tools | |
# http://incredibill.me | |
<Limit GET POST HEAD> | |
order allow,deny | |
# | |
# Block from AFGHANISTAN (AF) | |
# | |
deny from 27.116.56.0/22 | |
deny from 43.231.131.0/24 |