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_email_header', 'spigot_reply_to_mail_filter', 11, 3); | |
function spigot_reply_to_mail_filter($headers = '', $ordertype = 'new_order', $order = '') { | |
if(!is_object($order) || empty($order) || $ordertype !== 'new_order') { return $headers; } | |
$name = $order->get_billing_first_name().' '.$order->get_billing_last_name(); | |
$email = $order->get_billing_email(); |
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 | |
/** | |
* | |
* Plugin Name: WooCommerce Enable Reviews - Bulk Edit | |
* Description: Allow enable reviews by bulk edit into WooCommerce | |
* Version: 1.0.0 | |
* Author: Mário Valney | |
* Author URI: http://mariovalney.com | |
* Text Domain: woo-enable-reviews-bulk-edit | |
* |
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
<svg class="icon icon--twitter"><use xlink:href="#icon--twitter"></use></svg> |
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
$(".element").hover(function(){ | |
// Get the current title | |
var title = $(this).attr("title"); | |
// Store it in a temporary attribute | |
$(this).attr("tmp_title", title); | |
// Set the title to nothing so we don't see the tooltips | |
$(this).attr("title",""); |
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
/* | |
* Hide zero value on any zero cost shipping methods | |
* | |
*/ | |
add_filter( 'woocommerce_cart_shipping_method_full_label', function( $label, $method ) { | |
if ( $method->cost <= 0 ) { | |
$label = $method->get_label(); |
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 the default state on the checkout page | |
*/ | |
add_filter( 'default_checkout_billing_country', 'change_default_checkout_country' ); | |
add_filter( 'default_checkout_billing_state', 'change_default_checkout_state' ); | |
function change_default_checkout_state() { | |
return 'XX'; // state code | |
} |
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 the default country on the checkout page | |
*/ | |
add_filter( 'default_checkout_billing_country', 'change_default_checkout_country' ); | |
function change_default_checkout_country() { | |
return 'US'; // Put Country code here | |
} |
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( ‘image_send_to_editor’, ‘force_protocol_relative’, 10, 9 ); | |
function force_protocol_relative($content) { | |
$content = str_replace( ‘http://’, ‘https://’, $content ); | |
return $content; | |
} |
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
// Remove WooCommerce Product Gallery | |
remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 ); |
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
/** | |
* Remove image links from WooCommerce thumbnail images | |
* | |
*/ | |
add_filter('woocommerce_single_product_image_thumbnail_html','wc_remove_link_on_thumbnails' ); | |
function wc_remove_link_on_thumbnails( $html ) { | |
return strip_tags( $html,'<div><img>' ); | |
} |