This file contains 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 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 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 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 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 | |
/* Remove Color Picker and other unwanted user profile fields from the admin dashboard */ | |
if ( !is_admin() ) { | |
// Remove the theme color picker | |
remove_action("admin_color_scheme_picker", "admin_color_scheme_picker"); | |
// Remove and hide the rest of the User Profile fields (WP Admin Page) | |
add_action( 'personal_options', 'remove_wp_user_personal_options' ); | |
This file contains 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 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 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 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 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 | |
/* Ocultar Secciones en Mi Cuenta Woocommerce */ | |
add_filter( 'woocommerce_account_menu_items', 'hideSectionProfile', 999 ); | |
function hideSectionProfile( $items ) | |
{ | |
unset($items['downloads']); | |
unset($items['dashboard']); | |
return $items; |
NewerOlder