syntax:- get_page_by_title( $page_title, $output, $post_type ); In wordpress 6.2 this function is deprecated instead you can use it's definition with little bit of change https://developer.wordpress.org/reference/functions/get_page_by_title/ function get_page_by_title(string $name, string $post_type = "post") { $query = new WP_Query([ "post_type" => $post_type, "name" => $name ]); return $query->have_posts() ? reset($query->posts) : null; } now call get_page_by_title(<product_name>, 'product');$product = wc_get_product( $post_id ); $product->get_regular_price(); $product->get_sale_price(); $product->get_price(); global $product; $product->get_id();global $product; $koostis = $product->get_attribute( 'pa_koostis' );$terms = get_the_terms( $product_id, 'product_cat' ); foreach ($terms as $term) { $product_cat_id[] = $term->term_id; } $categories_html = get_the_term_list($product->ID, 'product_cat', '', ', '); $categories_text = strip_tags($categories_html); echo $categories_text;global $product; $koostis = array_shift( wc_get_product_terms( $product->id, 'pa_koostis', array( 'fields' => 'names' ) ) );$result = array_shift(woocommerce_get_product_terms($product->id, 'pa_koostis', 'names'));Woocommerce product data