Answer the question
In order to leave comments, you need to log in
How to get order data in Woocommerce cart?
I connect an online store on WooCommerce with Bitrix24 CRM via webhooks. It is necessary that when placing an order in Bitrix, a lead is created with the data in the basket.
The request was accepted, it remains only to receive the order data. How to get the order number, first name, last name, and the amount of goods in the basket?
The received data must be recorded here
$queryData = http_build_query(array(
'fields' => array(
'TITLE' => "Заказ с сайта №",
'NAME' => [$billing_first_name],
),
'params' => array("REGISTER_SONET_EVENT" => "Y")
));
Answer the question
In order to leave comments, you need to log in
The cart object and the order object are different objects, at what point do you want to send data to Bitrix?
as an option, use the woocommerce rest api and processing orders by krone on the server / hosting under certain conditions (for example, status), processed orders can change the status after sending to B24.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question