• Hello,

    Is it possible to run a batch of product categories with categories that have parents that need to be created in the batch?

    <?php
    $data = [
        'create' => [
            [
                'name' => 'Albums'
            ],
            [
                'name' => 'Clothing',
                'parent' => 'Albums' // for example
            ]
        ],
        'update' => [
            [
                'id' => 10,
                'description' => 'Nice hoodies'
            ]
        ],
        'delete' => [
            11,
            12
        ]
    ];
    
    print_r($woocommerce->post('products/categories/batch', $data));
    ?>

    thanks for help.
    Sébastien

The topic ‘REST API batch update product categories’ is closed to new replies.