No se han encontrado widgets en la barra lateral

Limitar monto de compra en cart y checkout

Agregar el sgte código en el archivo de functions.php add_action('woocommerce_checkout_process', 'wc_minimum_order_amount'); add_action('woocommerce_before_cart', 'wc_minimum_order_amount'); function wc_minimum_order_amount() { // Set this variable to specify a minimum order value $minimum = 30000; if…

Leer más

Jquery ajax Queue

var ajaxQueue = jQuery({}); jQuery.ajaxQueue = function(ajaxOpts) { var oldComplete = ajaxOpts.complete; ajaxQueue.queue(function(next) { ajaxOpts.complete = function() { if (oldComplete) oldComplete.apply(this, arguments); next(); }; jQuery.ajax(ajaxOpts); }); }; $("a.actualizar").each(function(idx) { var…

Leer más

Establecer mínimo de compra Woocommerce

// Establecer un importe minimo en la compra function woocommerce_importe_minimo() { $minimum = 20; // Debes cambiar el 20 por el importe mínimo que quieras establecer en tu pedido if…

Leer más

Imprimir todos los fields del checkout

Agregar éste código en el archivo functions.php del tema function custom_override_checkout_fields($fields){ print_r($fields); } add_filter('woocommerce_checkout_fields', 'custom_override_checkout_fields', 100);

Leer más

Yoast seo bradcrumbs codigo

if ( function_exists('yoast_breadcrumb') ) {yoast_breadcrumb( '<p id="breadcrumbs">','</p>' ); }

Leer más

Obtener el post_content usando un id de post

$post = get_post(12); // specific post $the_content = apply_filters('the_content', $post->post_content); if ( !empty($the_content) ) { echo $the_content; }

Leer más

Obtener el id de la pagina de posts

Para obtener este id, se utiliza el siguoiente código: $page_for_posts = get_option( 'page_for_posts' );

Leer más

Crear usuario y base de datos comando

Paso 1 - Acceder a mysql como root mysql -u root Paso 2 - Crear la base de datos. CREATE DATABASE db_name; Paso 3 - Crear el usuario con contraseña…

Leer más

Agregar ACF de imágenes en el menú

add_filter('wp_nav_menu_objects', 'my_wp_nav_menu_objects', 10, 2); function my_wp_nav_menu_objects( $items, $args ) { foreach( $items as &$item ) { $icon = get_field('icono', $item); if( $icon ) { $item->title .= ' ';} } return…

Leer más

Obtener Wishlist por usuario

/** * @param int $customerId */ public function getWishlistByCustomerId($customerId) { $wishlist = $this->wishlist->loadByCustomerId($customerId)->getItemCollection(); return $wishlist; } getWishlistByCustomerId($customerId); if(count($wishlistCollection)) { foreach ($wishlistCollection as $_item) { /* You can get ID, Name,…

Leer más