jQuery to PHP: Add a selector class to children elements if more than one – Woocommerce
Is it possible to implement the same thing than the jQuery code below in PHP? I use it to hide errors made during importing products from wholesaler. Here is the jQuery code I use: jQuery(document).ready(function( $ ){ $('.woocommerce-product-details__short-description:has(p:nth-of-type(2)) p').addClass('ukryj-klase-krotki'); });…