Hello,
Please try to add the code below in the functions.php file in your child theme.
add_filter( 'woocommerce_loop_add_to_cart_link', 'redirect_variable_to_product_page', 10, 2 );
function redirect_variable_to_product_page( $button, $product ) {
// Get the product URL
$url = get_permalink( $product->get_id() );
// Check if the product is variable or simple
if ( $product->is_type( 'variable' ) ) {
$button = '<a href="' . esc_url( $url ) . '" class="button select_options">' . esc_html__( 'Select Options', 'woocommerce' ) . '</a>';
} else {
// Keep default for other product types
$button = '<a href="' . esc_url( $url ) . '" class="button add_to_cart_button">' . esc_html( $product->add_to_cart_text() ) . '</a>';
}
return $button;
}
Best Regards