I build my proper shop with ecommerce, and I'm beginner in development, I know correctly the CSS/HTML but JS he's not my tea cup...
Actually, I want to display some products randomly in my "no_product_found" page in woocommerce.
When a customer come to a product that are out of the shop, or a empty subcategory, he display products randomly.
I have add this hook to my function.php file from my child template
add_action( 'woocommerce_no_products_found', 'show_products_no_products', 20 );
function show_products_no_products() {
echo '<h2 class="customnoproduct">' . __( 'Houston... On a un problème! </br>On a rien trouvé comme produits dans cette catégorie