1add_action( 'template_redirect', 'quadlayers_add_to_cart_function' );
2
3function quadlayers_add_to_cart_function () {
4
5 $product_id = 1326;
6
7 if ( WC()->cart->get_cart_contents_count() == 0 ) {
8
9 WC()->cart->add_to_cart( $product_id );
10
11 }
12
13}
14