No se han encontrado widgets en la barra lateral

Métodos del objeto de producto

// Get Product ID $product->get_id(); // Get Product General Info $product->get_type();$product->get_name();$product->get_slug();$product->get_date_created();$product->get_date_modified();$product->get_status();$product->get_featured();$product->get_catalog_visibility();$product->get_description();$product->get_short_description();$product->get_sku();$product->get_menu_order();$product->get_virtual();get_permalink( $product->get_id() ); // Get Product Prices $product->get_price();$product->get_regular_price();$product->get_sale_price();$product->get_date_on_sale_from();$product->get_date_on_sale_to();$product->get_total_sales(); // Get Product Tax, Shipping & Stock $product->get_tax_status();$product->get_tax_class();$product->get_manage_stock();$product->get_stock_quantity();$product->get_stock_status();$product->get_backorders();$product->get_sold_individually();$product->get_purchase_note();$product->get_shipping_class_id(); // Get Product Dimensions…

Leer más

Validar un campo como RUT en woocommerce checkout

Solo debes considerar cambiar el nombre de tu field, en el post data. // Validar Rut chileno en el check out de WooCommerceadd_action('woocommerce_after_checkout_validation', 'validar_rut_chileno');function validar_rut_chileno($posted_data) { $rut = sanitize_text_field($posted_data); //…

Leer más

Mínimo de compra en Woocommerce

add_action( 'woocommerce_check_cart_items', 'required_min_cart_subtotal_amount' ); function required_min_cart_subtotal_amount() { // HERE Set minimum cart total amount $minimum_amount = 250; // Total (before taxes and shipping charges) $cart_subtotal = WC()->cart->subtotal; // Add an…

Leer más

Método de pago Custom

Meter éste código en un index.php en una carpeta con el nombre del plugin, en la carpeta de plugins <?php /* Plugin Name: Pagos Locales Description: Pagos para Tienda Local…

Leer más

Reemplazar texto en wordpress

function replace_text($text) { $text = str_replace('Correo electrónico', 'replace-with-this-string', $text); return $text; } add_filter('the_content', 'replace_text');

Leer más

Agregar string en el titulo woocoommerce

remove_action( 'woocommerce_shop_loop_item_title','woocommerce_template_loop_product_title', 10 ); function change_product_title() { $additional_text = ' More info'; echo '<h2 class="woocommerce-loop-product__title">' . get_the_title() .$additional_text.'</h2>'; } add_action('woocommerce_shop_loop_item_title','change_product_title');

Leer más

Cambiar regiones del billing

Esta función se agrega en el archivo functions.php Permite agregar manualmente tus regiones al select de woocommerce en el checkout.   function custom_woocommerce_states( $states ) { $states = array( 'XX1'…

Leer más

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

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