Woocmmerce add spinner to quantity box

$(document).on(“updated_cart_totals”, function(){
$(‘.qty’).spinner({
change: function (event, ui) {

},
spin: function( event, ui ) {
$(“[name=update_cart]”).prop(“disabled”, false);
}
});
});
$(‘.qty’).spinner({
change: function (event, ui) {

},
spin: function( event, ui ) {
$(“[name=update_cart]”).prop(“disabled”, false);
}
});

Woocommerce variation js

$(document).ready(function () {
var tr_ = $(“”);
var td_ = $(“”);
$(“.main-product-detail .qty-title”).appendTo(td_);
tr_.append(td_);
$(“.main-product-detail .quantity”).appendTo(td_);
tr_.append(td_);
$(“.variations tr”).last().before(tr_);

$(“#picker_pa_style ul li”).last().before(“or”);

$(“.entry-summary .woocommerce-variation-price”).hide();
$(“.variations_form”).on(“found_variation”, function (event, variation) {
if (variation.price_html) {
$(“.entry-summary .novar”).hide();
$(“.entry-summary .woocommerce-variation-price”).hide();
$(“.entry-summary .variations-p”).show();
$(“.entry-summary .variations-p”).html(variation.price_html);

}

});

$(“.variations_form”).on(“hide_variation”, function (event) {
$(“.entry-summary .novar”).show();
$(“.entry-summary .variations-p”).hide();
});

});

Woocommerce product gallery thumbnail slider

add_action( ‘after_setup_theme’, ‘yourtheme_setup’ );

function yourtheme_setup() {
add_theme_support( ‘wc-product-gallery-zoom’ );
add_theme_support( ‘wc-product-gallery-lightbox’ );
add_theme_support( ‘wc-product-gallery-slider’ );
}

/**********************Add js to js file on header or footer*********************************/

$(window).load(function () {
setTimeout(function () {
var thubmNav = $(“.woocommerce-product-gallery .flex-control-nav”);
if (thubmNav.length) {
//console.log(“asd”, !thubmNav.closest(“.navWrapper”).length)
if (!thubmNav.closest(“.navWrapper”).length) {
thubmNav.addClass(“slides”);
thubmNav.wrap(“

“);
$(‘.navWrapper’).flexslider({
animation: “slide”,
    controlNav: false,
    animationLoop: true,
    slideshow: false,
    itemWidth: 100,
    itemMargin: 24,
maxItems: 4,
minItems: 3,
});
}

}
}, 100)
});

/****************Variation product js code ****************************************/

$(“.variations_form”).on(“wc_additional_variation_images_frontend_ajax_response_callback”, function (event, variation) {
console.log(“variation”);
setTimeout(function () {
var thubmNav = $(“.woocommerce-product-gallery .flex-control-nav”);
if (thubmNav.length) {
/*if(!thubmNav.parent().hasClass(“navWrapper”)){
thubmNav.wrap(“

“);
var itemsLength_ = thubmNav.children(“li”).length
var itemWidth_ = thubmNav.children(“li”).outerWidth();
thubmNav.width( itemWidth_* itemsLength_);
thubmNav.parent().css({“width”: $(“.woocommerce-product-gallery”).width(), “overflow”:”hidden”});

var navigationDiv_ = $(“

“, {class: “navigationWrapper”});
var leftNavigation_ = $(““, {class: “leftNavigation”});
var rightNavigation_ = $(““, {class: “rightNavigation”});
navigationDiv_.append(leftNavigation_).append(rightNavigation_);
navigationDiv_.insertAfter(thubmNav);

leftNavigation_.on(“click”, function(){

});
rightNavigation_.on(“click”, function(){

});
}*/
//console.log(“asd”, !thubmNav.closest(“.navWrapper”).length)
if (!thubmNav.closest(“.navWrapper”).length) {
thubmNav.addClass(“slides”);
thubmNav.wrap(“

“);
$(‘.navWrapper’).flexslider({
animation: “slide”,
    controlNav: false,
    animationLoop: false,
    slideshow: false,
    itemWidth: 100,
    itemMargin: 24,
maxItems: 4,
minItems: 3,
});
}

}
}, 100)
});

Instagram feed shortcode

You can download from here http://instafeedjs.com/

add_shortcode('instagram_blog','instagram_gallery_blog');
function instagram_gallery_blog($atts)
{
ob_start();
extract( shortcode_atts(
array(
), $atts )
);

if(isset($atts['item'])){

$iteam_limit = $atts['item'];
}else{

$iteam_limit = 6;
}

    var feed = new Instafeed({
    get: 'user',
    userId: ,
    accessToken: '',
    target: 'instafeed',
    resolution: 'standard_resolution',
    sortBy:"most-recent",
    limit :,
    template:'',
    after: function() {
    }
    });

    window.onload = function() {
    feed.run();
    }

    });
    return ob_get_clean();
    }

    Woocommerce product review sorting

    You can use this filter to sorting woocommerce product page review.

    add_filter( ‘woocommerce_product_review_list_args’, ‘newest_reviews_first’ );
    function newest_reviews_first($args) {
    if($_GET[‘orderby’] ==”rating” && $_GET[‘order’] == ‘desc’){
    $args[‘reverse_top_level’] = true;
    }elseif($_GET[‘orderby’] ==”rating” && $_GET[‘order’] == ‘asc’){
    $args[‘reverse_top_level’] = false;
    }else{
    $args[‘reverse_top_level’] = true;
    }
    return $args;
    }

    Stop Specific plugin Update

    You can stop update specific plugin with below code.

    function filter_plugin_updates( $value ) {
    unset( $value->response[‘boopis-woocommerce-rfq/boopis-rfq.php’] );
    unset( $value->response[‘tw-recent-posts-widget/tw-recent-posts-widget.php’] );

    return $value;
    }
    add_filter( ‘site_transient_update_plugins’, ‘filter_plugin_updates’ );

    Contact form 7 Custom validation

    https://wordpress.org/plugins/cf7-field-validation/

    This plugin add custom validation messages to individual fields of your contact form 7. You will be able to add your custom error message for text, text area, email, url, radio, phone number etc fields in contact form 7.

    Features of this plugin.

    • Add Custom Validation Message to Contact Form Fields.
    • Allows field to be validated for text, text area, email, url, radio, phone number and more.
    • Error message for individual fields.
    • You can add custom validation with multiple forms.

     

    Faq’s plugin

    https://wordpress.org/plugins/accordion-faq-plugin/

    This plugin provide FAQ’s as accordion type with shortcode tag in taxonony/category page,directly take shortcode put in any page,post and widget.

    Features of this plugin. * Unlimited FAQs and Taxonomy/category * Responsive FAQs * Compatible with WordPress standard themes * Taxonomy/Categorized display of FAQS * Displaying question and answer based on accordion. * Unlimited Support for comments/Query.