Closed Lomerill closed 3 years ago
По умолчанию, если это не меняется плагинами, автором заказа является пользователь ID=1. https://woocommerce.github.io/code-reference/files/woocommerce-includes-data-stores-abstract-wc-order-data-store-cpt.html#source-view.74 Так что $order_post->post_author == 1 и айдишник контрагента всегода wc1c#user#1. Чтобы передавался айдишник заказчика, надо использовать get_customer_id().
Спасибо!
По умолчанию, если это не меняется плагинами, автором заказа является пользователь ID=1. https://woocommerce.github.io/code-reference/files/woocommerce-includes-data-stores-abstract-wc-order-data-store-cpt.html#source-view.74 Так что $order_post->post_author == 1 и айдишник контрагента всегода wc1c#user#1. Чтобы передавался айдишник заказчика, надо использовать get_customer_id().