Hide Gift Card Notice and Form
add_filter(‘yith_gift_cards_show_field’, ‘__return_false’);Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter(‘yith_gift_cards_show_field’, ‘__return_false’);Continue reading
function g9_remove_image_zoom_support() { remove_theme_support(‘wc-product-gallery-zoom’); } add_action(‘wp’, ‘g9_remove_image_zoom_support’, 100);Continue reading
function g9_update_price_with_variation_price() { global $product; $price = $product->get_price_html(); wc_enqueue_js(” jQuery(document).ready(function ($) { $(document).on(‘found_variation’, ‘form.cart’, function( event, variation ) { if(variation.price_html) $(‘.summary > p.price’).html(variation.price_html); $(‘.summary .woocommerce-variation-price’).hide(); }); $(document).on(‘hide_variation’, ‘form.cart’, function( event, variation ) { $(‘.summary > p.price’).html(‘” . $price . “‘);…Continue reading
function g9_change_cross_sells_columns($columns) { return 3; } add_filter(‘woocommerce_cross_sells_columns’, ‘g9_change_cross_sells_columns’);Continue reading
function g9_wc_ajax_variation_threshold($qty, $product) { return 300; } add_filter(‘woocommerce_ajax_variation_threshold’, ‘g9_wc_ajax_variation_threshold’, 10, 2);Continue reading
add_filter(‘woocommerce_get_image_size_single’, function($size) { return array( ‘width’ => 800, ‘height’ => 800, ‘crop’ => 1, ); });Continue reading
add_filter(‘woocommerce_gallery_thumbnail_size’, function ($size) { return array( ‘width’ => 150, ‘height’ => 150, ‘crop’ => 1, ); });Continue reading
add_filter( ‘tribe_event_label_singular’, function() { return ‘Moment’; } ); add_filter( ‘tribe_event_label_singular_lowercase’, function() { return ‘moment’; } ); add_filter( ‘tribe_event_label_plural’, function() { return ‘Moments’; } ); add_filter( ‘tribe_event_label_plural_lowercase’, function() { return ‘moments’; } );Continue reading
// This line is adding a custom function to the ‘login_redirect’ filter. The ‘login_redirect’ filter is applied right after a user logs in to WordPress. The custom function ‘wppbc_custom_login_redirect’ is given a priority of 10, and it accepts 3 arguments.…Continue reading
function maybe_exclude_protected_posts($query) { if(!$query->is_admin && $query->is_search && $query->is_main_query()) { $posts_to_exclude = array(); $posts = get_posts(array( ‘post_type’ => get_post_types(), ‘numberposts’ => -1 )); foreach($posts as $post) { if(MeprRule::is_locked($post)) { $posts_to_exclude[] = $post->ID; } } if(!empty($posts_to_exclude)) { $query->set(‘post__not_in’, $posts_to_exclude); } } }…Continue reading