I would like to remove (not just hide) the first payment date on the cart and checkout pages because it's very confusing for my client. I don't find where and how to override the html output.
The information is added from a woocommerce subscription function (wcs-cart-functions.php) as following:
function wcs_add_cart_first_renewal_payment_date( $order_total_html, $cart ) {
if ( 0 !== $cart->next_payment_date ) {
$first_renewal_date = date_i18n( wc_date_format(), wcs_date_to_time( get_date_from_gmt( $cart->next_payment_date ) ) );
// translators: placeholder is a date
$order_total_html .= '<div class="first-payment-date"><small>' . sprintf( __( 'First renewal: %s', 'woocommerce-subscriptions' ), $first_renewal_date ) . '</small></div>';
}
return $order_total_html;
}
add_filter( 'wcs_cart_totals_order_total_html', 'wcs_add_cart_first_renewal_payment_date', 10, 2 );
For obvious reasons, I don't want to modify the core files.
What I've tried is to add a display:none in my theme CSS. It works but it just hides the information.
.woocommerce-checkout-review-order-table .first-payment-date {
display: none;
}
Thank you for your clues and ideas. Fred