Improve the visual presentation of your WooCommerce Cart Page by customizing the text color of the shipping method labels. The following code snippet will change the color of the shipping method labels.
add_action('wp_head', 'ts_custom_cart_shipping_method_text_color'); function ts_custom_cart_shipping_method_text_color() { if (is_cart()) { echo '<style> input[type=radio]+label { color: blue; /* Adjust the font size as needed */ } </style>'; } }
Output
The below output changes the shipping method text color from the default one to the new one i.e. blue text color on the cart page.
In another scenario, the WooCommerce cart page shows the default title text color for the shipping method as shown below.
It’s also possible to customize selected shipping methods title in WooCommerce cart, which will change the color of the text based on the selected radio buttons. This means you won’t have to add text color for every shipping method in the cart total section.
Read Related Article: How To Customize “Proceed to Checkout” Button Styles in WooCommerce Cart?