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 location_javascript() { | |
if (is_front_page()) { | |
?> | |
<script> | |
(function ($) { | |
$(document).ready(function(){ | |
setTimeout(function() { | |
$(".geocode-location").trigger('click'); | |
},10); | |
}); |
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
// WP - LIMIT IMAGE UPLOAD SIZE | |
function max_image_size( $file ) { | |
$size = $file['size']; | |
$size = $size / 1024; | |
$type = $file['type']; | |
$is_image = strpos( $type, 'image' ) !== false; | |
$limit = 850; | |
$limit_output = '850KB'; | |
if ( $is_image && $size > $limit ) { | |
$file['error'] = 'Image files must be smaller than ' . $limit_output; |
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
/** | |
* @snippet Display FREE if Price Zero or Empty - WooCommerce Single Product | |
* @how-to add to functions.php in your childtheme | |
* @author Peter Kuipers | |
* @testedwith WooCommerce 3.9 | |
* @Change free in line 13 to whatever you want to show instead of the value 0.00 | |
*/ | |
add_filter( 'woocommerce_get_price_html', 'kyzoe_price_free_zero_empty', 9999, 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
// add gift message on checkout after the "Order Notes" | |
add_action( 'woocommerce_after_order_notes', 'bdev_is_this_a_gift' ); | |
function bdev_is_this_a_gift() { | |
$domain = 'woocommerce'; | |
?> | |
<style>p#gift_field{display:none;}</style> | |
<div id="message"> | |
<h3><i class="fa fa-gift"></i><?php _e( ' Is this a gift?', 'woocommerce' ); ?></h3> | |
<?php |