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
| /*Ocultar otros metodos de envio cuando hay envio gratis*/ | |
| add_filter( 'woocommerce_package_rates', 'bbloomer_unset_shipping_when_free_is_available_all_zones', 10, 2 ); | |
| function bbloomer_unset_shipping_when_free_is_available_all_zones( $rates, $package ) { | |
| $all_free_rates = array(); | |
| foreach ( $rates as $rate_id => $rate ) { | |
| if ( 'free_shipping' === $rate->method_id ) { | |
| $all_free_rates[ $rate_id ] = $rate; |
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
| /*Elimina la dureza de la contrasena para nuevos usuarios*/ | |
| add_action ('wp_print_scripts', function () { | |
| if (wp_script_is ('wc-password-strength-meter', 'enqueued')) | |
| wp_dequeue_script ('wc-password-strength-meter'); | |
| }, 100); |
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
| /* Checkbox habilitado crear cuenta en checkout */ | |
| add_filter('woocommerce_create_account_default_checked' , function ($checked){ | |
| return true; | |
| }); |
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
| /*Personalizar texto en checkout "tienes un cupon..."*/ | |
| add_filter( 'woocommerce_checkout_coupon_message', 'bbloomer_have_coupon_message'); | |
| function bbloomer_have_coupon_message() { | |
| return '¿Tienes un cupón? 🍀 <a href="#" class="showcoupon">Introduce tu código aquí</a>'; | |
| } |
OlderNewer