Created
December 16, 2019 21:32
-
-
Save jmarreros/5fb43b6d920a62cda14a56ea56e516c0 to your computer and use it in GitHub Desktop.
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 //no copiar esta línea | |
add_action( 'woocommerce_cart_totals_after_shipping' , 'mostrar_mensaje_tipo_envio' ); | |
add_action( 'woocommerce_review_order_after_shipping' , 'mostrar_mensaje_tipo_envio' ); | |
function mostrar_mensaje_tipo_envio() { | |
$chosen_method = WC()->session->get( 'chosen_shipping_methods' ); | |
$chosen_method = explode(':', reset($chosen_method) ); | |
if ( $chosen_method[0] == 'local_pickup' ){ | |
echo '<tr class="msg-shipping"> | |
<td colspan="2" style="text-align:center;background:lightyellow;"> | |
<strong>Horario de atención de 8:00am - 12:00m</strong> | |
</td> | |
</tr>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment