WooCommerce REST API — v3.0
Ve a WooCommerce → Ajustes → Avanzado → REST API, crea una clave con permisos Lectura/Escritura.
Si ves error CORS al abrir desde PC, agrega al functions.php:
add_action('rest_api_init', function() {
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
header('Access-Control-Allow-Headers: Authorization, Content-Type');
}, 15);
| Img | SKU | Nombre | Precio | Oferta | Stock | Estado | Tipo | Editar | |
|---|---|---|---|---|---|---|---|---|---|
🗄️ Configura credenciales y carga productos | |||||||||
id, sku, name, regular_price, sale_price, stock_quantity, status, description, categories, tags, images