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 custom Theme Functions here | |
/** | |
* Sorting out of stock WooCommerce products - Order product collections by stock status, in-stock products first. | |
*/ | |
class iWC_Orderby_Stock_Status | |
{ | |
public function __construct() | |
{ | |
// Check if WooCommerce is active |
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 price format from range to "From:" | |
* | |
* @param float $price | |
* @param obj $product | |
* @return str | |
*/ | |
function iconic_variable_price_format( $price, $product ) { | |
$prefix = sprintf('%s: ', __('From', 'iconic')); |
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( 'wc_smart_cod_available', 'cod_restrict_coupons' ); | |
function cod_restrict_coupons( $is_cod_available ) { | |
global $woocommerce; | |
$applied_coupons = $woocommerce->cart->applied_coupons; | |
// add the coupon codes you want | |
// to restrict in this array | |
$restricted_coupons = array( |
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
/* Yith Add 'Submit review' Link on Top */ | |
if( defined('YITH_YWAR_PREMIUM') ){ | |
add_action( 'ywar_summary_prepend','yith_ywar_show_submit_review_link',5 ); | |
function yith_ywar_show_submit_review_link(){ | |
echo '<a href="#review_form_wrapper">Submit review</a>'; | |
} | |
} |
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
function iconic_modify_woothumbs_all_images_data( $image_data, $product_id ) { | |
$title = get_the_title( $product_id ); | |
foreach( $image_data as $index => $image ) { | |
$image_data[ $index ]['alt'] = $title; | |
} | |
return $image_data; | |
} |
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( 'wc_order_is_editable', 'wc_make_processing_orders_editable', 10, 2 ); | |
function wc_make_processing_orders_editable( $is_editable, $order ) { | |
if ( $order->get_status() == 'processing' ) { | |
$is_editable = true; | |
} | |
return $is_editable; | |
} |
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
function custom_guaven_js(){ | |
?> | |
<script> | |
jQuery(window).scroll(function(){ | |
var guaven_woos_offset = jQuery('.header-search-form-wrapper [name="s"]').offset(); | |
jQuery(".guaven_woos_suggestion").css('left', guaven_woos_offset.left); | |
jQuery(".guaven_woos_suggestion").css('top', guaven_woos_offset.top + parseFloat(jQuery('.header-search-form-wrapper [name="s"]').outerHeight())); | |
}); | |
</script> | |
<?php |
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
/** | |
* @snippet Add Billing First_name to Email Receipt | |
* @how-to Watch tutorial @ https://businessbloomer.com/?p=19055 | |
* @sourcecode https://businessbloomer.com/?p=19870 | |
* @author Rodolfo Melogli | |
* @testedwith WooCommerce 2.5.2 | |
*/ | |
add_filter('woocommerce_email_subject_customer_processing_order', 'bbloomer_change_processing_email_subject', 10, 2); | |
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
function iconic_wc_ajax_variation_threshold( $qty, $product ) { | |
return 50; | |
} | |
add_filter( 'woocommerce_ajax_variation_threshold', 'iconic_wc_ajax_variation_threshold', 10, 2 ); |
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_action('woocommerce_before_single_product_summary','flatsome_sale_flash_custom',21); | |
function flatsome_sale_flash_custom(){ | |
do_action('flatsome_sale_flash'); | |
} |
OlderNewer