Skip to content

Instantly share code, notes, and snippets.

View ahmedeshaan's full-sized avatar

Ahmed Eshaan ahmedeshaan

View GitHub Profile
add_filter( 'flatsome_custom_product_single_product_hooks', function( $array ) {
$array['more_hooks'] = 'more_hooks';
return $array;
});
jQuery(document).ready(function( $ ){
// Your code in here
jQuery( document ).on( ‘jet-filter-loaded’, function(){
jQuery(‘.variations_form’).each(function(){
jQuery(this).wc_variation_form();
});});
});
function wvg_stop_live_feed() {
return true;
}
add_filter('stop_gwp_live_feed', 'wvg_stop_live_feed');
[section label="Future Gird" padding="20px" padding__sm="0px"]
[ux_banner_grid height="636"]
[col_grid span="6" span__sm="12" height="1-2"]
[ux_banner height="500px" bg="4263" bg_size="original" bg_color="rgb(58, 143, 83)" link="#" video_visibility="visible"]
[text_box width__sm="60" position_x="50" position_y="50"]
<?php
add_filter( 'default_wvs_variation_attribute_options_html', function ( $default ) {
if ( is_ajax() && is_admin() ) {
return true;
}
return $default;
} );
<?php do_action('wvs_pro_variation_show_archive_variation'); ?>
.archive.woo-variation-swatches-stylesheet-enabled.woo-variation-swatches-pro .variable-items-wrapper {
display: inline-flex !important;
}
.woo-variation-swatches-pro .wvs_add_to_cart_button.button{
float:none !important;
display:block;
text-align:right !important;
}
<?php
function wcs_limit_word_count_in_post_title( $title ) {
return wp_trim_words( $title, 2, '' );
}
add_filter( 'the_title', 'wcs_limit_word_count_in_post_title' );
<script type="text/javascript">
jQuery(document).ready(function( $ ){
// Your code in here
jQuery(window).on('wcpf_update_products', function () {
$('.variations_form').each(function(){
$(this).wc_variation_form();
});
});
<?php
add_filter( 'disable_wvs_enqueue_scripts', function(){
// Load only product page. Return true to disable.
return ! is_product();
} );
//Or