<?php
/**
* JBA Jueg@S
* WooCommerce Checkout
* Corrección definitiva del resumen del pedido
*/
add_action('wp_head', function () {
if (!function_exists('is_checkout') || !is_checkout()) {
return;
}
?>
<style>
/* =====================================================
RESUMEN DEL PEDIDO
===================================================== */
.woocommerce-checkout-review-order-table {
width: 100% !important;
table-layout: auto !important;
display: table !important;
}
.woocommerce-checkout-review-order-table tbody,
.woocommerce-checkout-review-order-table tr {
width: 100% !important;
}
/* COLUMNA IMAGEN */
.woocommerce-checkout-review-order-table td.product-thumbnail {
width: 70px !important;
min-width: 70px !important;
max-width: 70px !important;
padding-right: 10px !important;
vertical-align: top !important;
}
.woocommerce-checkout-review-order-table td.product-thumbnail img {
width: 55px !important;
max-width: 55px !important;
height: auto !important;
}
/* =====================================================
COLUMNA NOMBRE
===================================================== */
.woocommerce-checkout-review-order-table td.product-name {
width: auto !important;
min-width: 150px !important;
max-width: none !important;
padding-left: 10px !important;
padding-right: 10px !important;
white-space: normal !important;
word-break: normal !important;
overflow-wrap: break-word !important;
hyphens: none !important;
}
/* TODO EL CONTENIDO DEL NOMBRE */
.woocommerce-checkout-review-order-table td.product-name *,
.woocommerce-checkout-review-order-table td.product-name a,
.woocommerce-checkout-review-order-table td.product-name span {
white-space: normal !important;
word-break: normal !important;
overflow-wrap: break-word !important;
hyphens: none !important;
}
/* =====================================================
PRECIO
===================================================== */
.woocommerce-checkout-review-order-table td.product-total {
width: 90px !important;
min-width: 90px !important;
max-width: 90px !important;
padding-left: 5px !important;
white-space: nowrap !important;
text-align: right !important;
vertical-align: top !important;
}
/* =====================================================
EVITAR DIVISIÓN LETRA POR LETRA
===================================================== */
.woocommerce-checkout-review-order-table
.product-name {
writing-mode: horizontal-tb !important;
text-orientation: mixed !important;
}
</style>
<?php
}, 9999);
/* ==========================================================
TÉRMINOS Y CONDICIONES
========================================================== */
add_filter(
'woocommerce_get_terms_and_conditions_checkbox_text',
function ($text) {
return 'Debes aceptar nuestros ' .
'<a href="https://jba.com.es/politica-de-devoluciones-compra-sin-preocupaciones/" target="_blank" rel="noopener noreferrer">' .
'<span style="color:#fcb900;">Términos y condiciones</span>' .
'</a> y nuestra ' .
'<a href="https://jba.com.es/politica-de-privacidad/" target="_blank" rel="noopener noreferrer">' .
'<span style="color:#fcb900;">Política de privacidad</span>' .
'</a> para continuar con tu compra.';
},
9999
);
Deja una respuesta