Select all product woocommerce

you could use something like this: $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => -1 ); $results = new WP_Query( $args ); $products = $results->posts; $json_data = array(); foreach($products as $product){ $product = wc_get_product( $product->ID); if($product->is_visible()){ $json_data[] = array( ‘id’=> $product->get_id(), ‘title’=> $product->get_title(), ); } } $output= json_encode($json_data); reutrn $output this part get all the … Read more

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