Missing variable options on add to cart form

I have replaced woocommerce_template_single_add_to_cart(); by this

 global $product; 

  if( is_a( $product, 'WC_Product_Variable' ) ){
  
        woocommerce_variable_add_to_cart();
          
        } else {
          
            woocommerce_simple_add_to_cart();
          
        }

and it worked as i wanted.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)