Merhaba arkadaşlar.
Bir ürüne varyasyon eklemem gerekiyor. Fakat Ne yaptıysam bir türlü olmadı.
Fikirlerinizi bekliyorum.

Şu şekilde ürünü çekebiliyorum.
wooCommerce.get("products/7048", (err, data) => {
    let d = JSON.parse(data.body);
    console.log(d)
})
Çıktı:
{
product: {
title: 'tolga bot',
id: 7048,
created_at: '2020-09-08T06:26:08Z',
updated_at: '2020-09-08T06:34:25Z',
type: 'variable',
status: 'publish',
downloadable: false,
virtual: false,
permalink: 'https://happyphonesss.com/urun/tolga-bot-3/',
sku: 'result.urunler[0].urunStokKodu',
price: '',
regular_price: '',
sale_price: null,
price_html: '',
taxable: false,
tax_status: 'taxable',
tax_class: '',
managing_stock: false,
stock_quantity: null,
in_stock: true,
backorders_allowed: false,
backordered: false,
sold_individually: false,
purchaseable: false,
featured: false,
visible: true,
catalog_visibility: 'visible',
on_sale: false,
product_url: '',
button_text: '',
weight: null,
dimensions: { length: '', width: '', height: '', unit: 'cm' },
shipping_required: true,
shipping_taxable: true,
shipping_class: '',
shipping_class_id: null,
description: '<p>tolga bot aciklama</p>\n',
short_description: '',
reviews_allowed: true,
average_rating: '0.00',
rating_count: 0,
related_ids: [ 7043, 7044 ],
upsell_ids: [],
cross_sell_ids: [],
parent_id: 0,
categories: [ 'Collections' ],
tags: [],
images: [ [Object] ],
featured_src: false,
attributes: [ [Object], [Object] ],
downloads: [],
download_limit: -1,
download_expiry: -1,
download_type: 'standard',
purchase_note: '',
total_sales: 0,
variations: [ [Object] ],
parent: [],
grouped_products: [],
menu_order: 0
}
}
Fakat linkin sonuna "variations" eklendiğinde bu yolu bulamadığını söylüyor. Fakat API'yi incelediğimde de aynı işlemleri yapıyor. Denemediğim şey kalmadı çözemedim bir türlü
wooCommerce.get("products/7048/variations", (err, data) => {
    let d = JSON.parse(data.body);
    console.log(d)
})
Çıktı:
{
errors: [
{
code: 'woocommerce_api_no_route',
message: 'İstek yöntemi ve bağlantıyla eşleşen güzergah bulunumadı'
}
]
}
Örnek aldığımız dökümasyon: tıkla

//Edit: Postman ile çektiğimde hiçbir sıkıntı çıkmıyor. Ama kütüphanede nedense böyle bir sorun çıkıyor.