• Resolved careplacement

    (@careplacement)


    We are using the REST API to bulk add and update products with PHP using the code below (snipped for brevity)
    How can we either update or set the yoast meta data? ie:_yoast_wpseo_metadesc

    $data = buildHomeData($h);
    $woocommerce->put('products/' . $h->prodid, $data);
    
    function buildHomeData($h) {
    global $debug;
    if (!isset($h->HomeType)) { var_dump($h); exit; }
    $shortdesc = "*** Short Desc ***";
    $data = [
    'name' => $h->FacilityName,
    'slug' => $h->slug,
    'sku' => "".$h->id,
    'description' => $h->Web_Notes,
    'short_description' => $shortdesc,
    ];
    return $data;
    }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘REST API set meta data’ is closed to new replies.