JSFiddle - React, Tailwind, and code Playground
by calder12
HTML
<table>
<tr class="checkout_table_item">
<td class="product-name">
Boxed Set of Sunday Envelopes <strong class="product-quantity">×
20</strong>
</td>
<td class="product-total"><span class="amount">£0.20</span></td>
</tr>
<tr class="checkout_table_item">
<td class="product-name">
Boxed Set of Envelopes <strong class="product-quantity">×
20</strong>
</td>
<td class="product-total"><span class="amount">£0.15</span></td>
</tr>
</table>
<p class="form-row wccs-field-class wccs-form-row-wide woocommerce-validated" id="eod_field"><div style="display:none;" id="test">Hi there</div></p>
JavaScript
$(".product-name").each(function(){
var text = $(this).html();
if(text.indexOf('Sunday') >=1)
{
$(".wccs-field-class").addClass("validate-required");
$("#test").css("display","block");
}
});