This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Idealista Properties Feed | |
* Plugin URI: https://example.com/ | |
* Description: Generates and sends a properties feed to Idealista. | |
* Version: 1.0.0 | |
* Author: Your Name | |
* Author URI: https://example.com/ | |
* Text Domain: idealista-properties-feed | |
* Domain Path: /languages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Idealista Properties Feed | |
* Plugin URI: https://example.com/ | |
* Description: Generates and sends a properties feed to Idealista. | |
* Version: 1.0.0 | |
* Author: Your Name | |
* Author URI: https://example.com/ | |
* Text Domain: idealista-properties-feed | |
* Domain Path: /languages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @snippet Añadir atributos de producto en las paginas de categorias (ocultando los atributos de variaciones fuera de stock) | |
* @author https://fsxperts.com/how-to-show-product-attributes-on-category-page/ | |
* @author https://stackoverflow.com/questions/30855309/how-to-check-product-have-variation-in-woocommerce | |
*/ | |
add_action('woocommerce_before_shop_loop_item_title','mostrar_atributos_disponibles'); | |
/* @visual_hook_guide: https://www.businessbloomer.com/woocommerce-visual-hook-guide-archiveshopcat-page/*/ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @snippet Minimum Order Amount | |
* @author JJMontalban | |
*/ | |
//woocommerce_check_cart_items will give the customer an warning when reaching the checkout unless purchase requirement is met. | |
add_action( 'woocommerce_check_cart_items', 'jj_minimum_order_amount' ); | |
add_action( 'woocommerce_before_cart', 'jj_minimum_order_amount' ); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Redireccion tras registro */ | |
add_filter( 'woocommerce_registration_redirect', 'custom_redirection_registration', 10, 1 ); | |
function custom_redirection_registration( $redirection_url ) | |
{ | |
$redirection_url = get_home_url(); | |
return $redirection_url; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Redireccion tras login */ | |
add_filter( 'woocommerce_login_redirect', 'custom_redirection_login' ); | |
function custom_redirection_login( $redirection_url ) | |
{ | |
$redirection_url = "https://floramarket.es/tienda/"; | |
return $redirection_url; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Deshabilitar provincias */ | |
add_filter('woocommerce_states', 'eliminar_provincias'); | |
function eliminar_provincias( $provincias ) | |
{ | |
unset($provincias['ES']['TF']); | |
unset($provincias['ES']['GC']); | |
unset($provincias['ES']['CE']); | |
unset($provincias['ES']['ML']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Mostrar atributos del producto en el email */ | |
add_action('woocommerce_order_item_meta_end', 'custom_item_meta', 10, 4); | |
function custom_item_meta($item_id, $item, $order, $plain_text) | |
{ | |
$product_id = $item->get_product_id(); | |
$product = wc_get_product( $product_id ); | |
if ( $product->is_type('simple') ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @snippet Añadir atributos de producto en las paginas woocommerce (ocultando los atributos de variaciones fuera de stock) | |
* @author https://fsxperts.com/how-to-show-product-attributes-on-category-page/ | |
* @author https://stackoverflow.com/questions/30855309/how-to-check-product-have-variation-in-woocommerce | |
*/ | |
add_action('woocommerce_after_shop_loop_item_title','mostrar_atributos_disponibles'); | |
/** | |
* @snippet // Add product attributes in summary (single product page). Entre el precio y descripcion corta | |
* @author https://stackoverflow.com/questions/13374883/get-custom-product-attributes-in-woocommerce |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Traducir cualquier texto en WordPress */ | |
add_filter( 'gettext', 'traducir_cualquier_texto', 10, 3 ); | |
function traducir_cualquier_texto( $translated, $original, $domain ) | |
{ | |
if ( $translated == "Shipping and delivery" ) { | |
$translated = "Envío y Entrega"; | |
} | |
if ( $original == "Delivery Date" ) { |
NewerOlder