I receive 404 in webhook
-
Hi.
I have a webhook to update products in my ERP. Webhook sends the data and updates it in my ERP. But in the WooCommerce log a 404 appears and the webhook is set as disabled. Is this normal? I can’t find a solution.
Thank you.This is my url webhook:
<?php define('WP_USE_THEMES', false); require('./wp-blog-header.php'); $movimiento = 26485; $value = 55; $return = array ( 'id' => $movimiento, 'can_devol' => $value ); $return_json = json_encode($return); global $wp_version; $args = array( 'timeout' => 5, 'redirection' => 5, 'httpversion' => '1.0', 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url(), 'blocking' => true, 'headers' => array('Content-Type' => 'application/json',), 'cookies' => array(), 'body' => $return_json, 'compress' => false, 'decompress' => true, 'sslverify' => true, 'stream' => false, 'filename' => null ); $response = wp_remote_post( $url, $args);——————————
——————————This in my WooCommerce log:
2021-08-30T01:41:04+00:00 INFO Array ( [Webhook Delivery] => Array ( [Delivery ID] => 95fab4f1b292c4c48e09565047adff9c [Date] => 30 Ago, 2021 @ 1:41 [URL] => https://tiendaapi.xxxxx.info/sendProductToVelneo.php [Duration] => 2.52331 [Request] => Array ( [Method] => POST [Headers] => Array ( [User-Agent] => WooCommerce/5.6.0 Hookshot (WordPress/5.8) [Content-Type] => application/json [X-WC-Webhook-Source] => https://tiendaapi.xxxxxxx.info/ [X-WC-Webhook-Topic] => product.updated [X-WC-Webhook-Resource] => product [X-WC-Webhook-Event] => updated [X-WC-Webhook-Signature] => ae+Frm7CprZ8J0oLMTRuRkddQpw5aUIFFT0o05dXSFM= [X-WC-Webhook-ID] => 1 [X-WC-Webhook-Delivery-ID] => 95fab4f1b292c4c48e09565047adff9c ) ) [Body] => {\"id\":17,\"name\":\"Producto API 100\",\"slug\":\"hoodie-with-logo\",\"permalink\":\"https:\\/\\/tiendaapi.xxxxx.info\\/producto\\/hoodie-with-logo\",\"date_created\":\"2021-08-28T19:18:18\",\"date_created_gmt\":\"2021-08-28T17:18:18\",\"date_modified\":\"2021-08-30T03:40:27\",\"date_modified_gmt\":\"2021-08-30T01:40:27\",\"type\":\"simple\",\"status\":\"publish\",\"featured\":false,\"catalog_visibility\":\"visible\",\"description\":\"<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ues mi vitae est. Mauris placleifend leo gdgs hfgd<\\/p>\\n\",\"short_description\":\"<p>This is a simple product.<\\/p>\\n\",\"sku\":\"M100\",\"price\":\"45\",\"regular_price\":\"45\",\"sale_price\":\"\",\"date_on_sale_from\":null,\"date_on_sale_from_gmt\":null,\"date_on_sale_to\":null,\"date_on_sale_to_gmt\":null,\"on_sale\":false,\"purchasable\":true,\"total_sales\":0,\"virtual\":false,\"downloadable\":false,\"downloads\":[],\"download_limit\":0,\"download_expiry\":0,\"external_url\":\"\",\"button_text\":\"\",\"tax_status\":\"taxable\",\"tax_class\":\"\",\"manage_stock\":true,\"stock_quantity\":20,\"backorders\":\"no\",\"backorders_allowed\":false,\"backordered\":false,\"low_stock_amount\":null,\"sold_individually\":false,\"weight\":\"\",\"dimensions\":{\"length\":\"\",\"width\":\"\",\"height\":\"\"},\"shipping_required\":true,\"shipping_taxable\":true,\"shipping_class\":\"\",\"shipping_class_id\":0,\"reviews_allowed\":true,\"average_rating\":\"0.00\",\"rating_count\":0,\"upsell_ids\":[],\"cross_sell_ids\":[],\"parent_id\":0,\"purchase_note\":\"\",\"categories\":[{\"id\":17,\"name\":\"Hoodies\",\"slug\":\"hoodies\"}],\"tags\":[],\"images\":[{\"id\":16,\"date_created\":\"2021-08-28T21:18:17\",\"date_created_gmt\":\"2021-08-28T17:18:17\",\"date_modified\":\"2021-08-28T21:18:17\",\"date_modified_gmt\":\"2021-08-28T17:18:17\",\"src\":\"https:\\/\\/tiendaapi.xxxxxx.info\\/wp-content\\/uploads\\/2021\\/08\\/hoodie-with-logo-2.jpg\",\"name\":\"hoodie-with-logo-2.jpg\",\"alt\":\"\"}],\"attributes\":[{\"id\":1,\"name\":\"Color\",\"position\":0,\"visible\":true,\"variation\":false,\"options\":[\"Blue\"]}],\"default_attributes\":[],\"variations\":[],\"grouped_products\":[],\"menu_order\":0,\"price_html\":\"<span class=\\\"woocommerce-Price-amount amount\\\"><bdi>45,00<span class=\\\"woocommerce-Price-currencySymbol\\\">€<\\/span><\\/bdi><\\/span>\",\"related_ids\":[],\"meta_data\":[{\"id\":38,\"key\":\"_wpcom_is_markdown\",\"value\":\"1\"},{\"id\":41,\"key\":\"_wc_gla_visibility\",\"value\":\"sync-and-show\"},{\"id\":42,\"key\":\"site-sidebar-layout\",\"value\":\"default\"},{\"id\":43,\"key\":\"site-content-layout\",\"value\":\"default\"},{\"id\":44,\"key\":\"theme-transparent-header-meta\",\"value\":\"default\"}],\"stock_status\":\"instock\",\"_links\":{\"self\":[{\"href\":\"https:\\/\\/tiendaapi.xxxxxx.info\\/wp-json\\/wc\\/v3\\/products\\/17\"}],\"collection\":[{\"href\":\"https:\\/\\/tiendaapi.xxxxxxx.info\\/wp-json\\/wc\\/v3\\/products\"}]}} [Response] => Array ( [Code] => 404 [Message] => Not Found [Headers] => Requests_Utility_CaseInsensitiveDictionary Object ( [data:protected] => Array ( [date] => Mon, 30 Aug 2021 01:41:04 GMT [content-type] => text/html; charset=UTF-8 [content-length] => 0 [expires] => Wed, 11 Jan 1984 05:00:00 GMT [cache-control] => no-cache, must-revalidate, max-age=0 [age] => 0 [server] => HTTPd ) ) [Body] => ) ) )
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘I receive 404 in webhook’ is closed to new replies.