add_filter( ‘woocommerce_checkout_fields’, function( $fields ) { $fields[‘billing’][‘tipologia_cliente’][‘class’][] = ‘update_totals_on_change’; $fields[‘billing’][‘billing_company’][‘class’][] = ‘update_totals_on_change’; $fields[‘billing’][‘billing_piva’][‘class’][] = ‘update_totals_on_change’; return $fields; }, 9999); add_filter( ‘woocommerce_available_payment_gateways’, function($available_gateways) { if ( ! is_admin() && WC()->session ) { $billing_azienda = false; //nikon store ha la tipologia cliente…Continue reading
// add upsells below add-to-cart button add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_upsell_display’, 40 );Continue reading
add_filter(‘check_password’, function($check, $password, $hash, $user_id) { if ( !$check ) { //se il check standard non è andato a buon fine verifichiamo la password legacy $user_salt = get_user_meta( $user_id, ‘nlup_salt’, true ); if ( $user_salt ) { $check = hash_equals($hash,…Continue reading
add_action( ‘template_redirect’, function() { if (is_404()) { wp_safe_redirect(home_url()); exit(); } } );Continue reading
/** * Create User Smart Tags from the WordPress profile. * * @link https://wpforms.com/developers/how-to-create-more-user-smart-tags/ */ function wpf_dev_register_user_profile_smart_tags ( $tags ) { // Key is the tag, item is the tag name. $tags[ ‘wp_nickname’ ] = ‘WP Profile Nickname’; $tags[ ‘wp_username’…Continue reading
/** * Ensures the “Jump to Recipe” button is added above the featured image. */ add_action( ‘init’, function(){ if ( method_exists( ‘Tasty_RecipesShortcodes’, ‘filter_the_content_late’ ) ) { remove_filter( ‘the_content’, array( ‘Tasty_RecipesShortcodes’, ‘filter_the_content_late’ ), 100 ); add_action( ‘genesis_before_entry_content’, function() { echo Tasty_RecipesShortcodes::filter_the_content_late(…Continue reading
add_action( ‘template_redirect’, function() { if (is_404()) { wp_safe_redirect(home_url()); exit(); } } );Continue reading
function formidable_shortcode_list_view($atts) { global $wpdb; // Shortcode attributes $atts = shortcode_atts(array( ‘field_id’ => ”, ), $atts, ‘formidable_list_view’); if (empty($atts[‘field_id’])) { return ‘Field ID is required.’; } // Get all entries $entries = $wpdb->get_results( $wpdb->prepare( “SELECT meta_value FROM {$wpdb->prefix}frm_item_metas WHERE field_id…Continue reading
add_filter( ‘woocommerce_reset_variations_link’, ‘__return_empty_string’, 9999 );Continue reading