Skip to content

Instantly share code, notes, and snippets.

@daniloab
Created August 3, 2021 17:23
Show Gist options
  • Save daniloab/13ac3f7ea0127bd3ccff2908c3b52c47 to your computer and use it in GitHub Desktop.
Save daniloab/13ac3f7ea0127bd3ccff2908c3b52c47 to your computer and use it in GitHub Desktop.
2021-08-03T17:21:19+00:00 DEBUG order data Array
(
    [id] => 48
    [parent_id] => 0
    [status] => pending
    [currency] => BRL
    [version] => 5.5.2
    [prices_include_tax] => 
    [date_created] => WC_DateTime Object
        (
            [utc_offset:protected] => 0
            [date] => 2021-08-03 17:21:19.000000
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [date_modified] => WC_DateTime Object
        (
            [utc_offset:protected] => 0
            [date] => 2021-08-03 17:21:19.000000
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [discount_total] => 0
    [discount_tax] => 0
    [shipping_total] => 0
    [shipping_tax] => 0
    [cart_tax] => 0
    [total] => 1.00
    [total_tax] => 0
    [customer_id] => 3
    [order_key] => wc_order_y1FGXikVUBPzc
    [billing] => Array
        (
            [first_name] => Ricardo José
            [last_name] => Eduardo Novaes
            [company] => 
            [address_1] => rua dulvina grandin fichelli
            [address_2] => 
            [city] => Paulinia
            [state] => SP
            [postcode] => 13142-514
            [country] => BR
            [email] => ricardojoseeduardonovaes-88@arteche.com.br
            [phone] => (91) 88888-8888
        )

    [shipping] => Array
        (
            [first_name] => 
            [last_name] => 
            [company] => 
            [address_1] => 
            [address_2] => 
            [city] => 
            [state] => 
            [postcode] => 
            [country] => 
        )

    [payment_method] => woocommerce_openpix_pix
    [payment_method_title] => Pay with Pix
    [transaction_id] => 
    [customer_ip_address] => 192.168.32.1
    [customer_user_agent] => Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
    [created_via] => checkout
    [customer_note] => 
    [date_completed] => 
    [date_paid] => 
    [cart_hash] => c1071e415b0d4c7b595f8f0e8ec4521a
    [number] => 48
    [meta_data] => Array
        (
            [0] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1414
                            [key] => _billing_persontype
                            [value] => 1
                        )

                    [data:protected] => Array
                        (
                            [id] => 1414
                            [key] => _billing_persontype
                            [value] => 1
                        )

                )

            [1] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1415
                            [key] => _billing_cpf
                            [value] => 865.752.475-98
                        )

                    [data:protected] => Array
                        (
                            [id] => 1415
                            [key] => _billing_cpf
                            [value] => 865.752.475-98
                        )

                )

            [2] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1416
                            [key] => _billing_cnpj
                            [value] => 
                        )

                    [data:protected] => Array
                        (
                            [id] => 1416
                            [key] => _billing_cnpj
                            [value] => 
                        )

                )

            [3] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1417
                            [key] => _billing_number
                            [value] => 75
                        )

                    [data:protected] => Array
                        (
                            [id] => 1417
                            [key] => _billing_number
                            [value] => 75
                        )

                )

            [4] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1418
                            [key] => _billing_neighborhood
                            [value] => 
                        )

                    [data:protected] => Array
                        (
                            [id] => 1418
                            [key] => _billing_neighborhood
                            [value] => 
                        )

                )

            [5] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1419
                            [key] => _billing_cellphone
                            [value] => (19) 77777-7777
                        )

                    [data:protected] => Array
                        (
                            [id] => 1419
                            [key] => _billing_cellphone
                            [value] => (19) 77777-7777
                        )

                )

            [6] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1420
                            [key] => is_vat_exempt
                            [value] => no
                        )

                    [data:protected] => Array
                        (
                            [id] => 1420
                            [key] => is_vat_exempt
                            [value] => no
                        )

                )

        )

    [line_items] => Array
        (
            [41] => WC_Order_Item_Product Object
                (
                    [extra_data:protected] => Array
                        (
                            [product_id] => 0
                            [variation_id] => 0
                            [quantity] => 1
                            [tax_class] => 
                            [subtotal] => 0
                            [subtotal_tax] => 0
                            [total] => 0
                            [total_tax] => 0
                            [taxes] => Array
                                (
                                    [subtotal] => Array
                                        (
                                        )

                                    [total] => Array
                                        (
                                        )

                                )

                        )

                    [data:protected] => Array
                        (
                            [order_id] => 48
                            [name] => Moletom Cinza
                            [product_id] => 11
                            [variation_id] => 0
                            [quantity] => 1
                            [tax_class] => 
                            [subtotal] => 1
                            [subtotal_tax] => 0
                            [total] => 1
                            [total_tax] => 0
                            [taxes] => Array
                                (
                                    [total] => Array
                                        (
                                        )

                                    [subtotal] => Array
                                        (
                                        )

                                )

                        )

                    [cache_group:protected] => order-items
                    [meta_type:protected] => order_item
                    [object_type:protected] => order_item
                    [id:protected] => 41
                    [changes:protected] => Array
                        (
                        )

                    [object_read:protected] => 1
                    [default_data:protected] => Array
                        (
                            [order_id] => 0
                            [name] => 
                            [product_id] => 0
                            [variation_id] => 0
                            [quantity] => 1
                            [tax_class] => 
                            [subtotal] => 0
                            [subtotal_tax] => 0
                            [total] => 0
                            [total_tax] => 0
                            [taxes] => Array
                                (
                                    [subtotal] => Array
                                        (
                                        )

                                    [total] => Array
                                        (
                                        )

                                )

                        )

                    [data_store:protected] => WC_Data_Store Object
                        (
                            [instance:WC_Data_Store:private] => WC_Order_Item_Product_Data_Store Object
                                (
                                    [internal_meta_keys:protected] => Array
                                        (
                                            [0] => _order_id
                                            [1] => _name
                                            [2] => _product_id
                                            [3] => _variation_id
                                            [4] => _quantity
                                            [5] => _tax_class
                                            [6] => _subtotal
                                            [7] => _subtotal_tax
                                            [8] => _total
                                            [9] => _total_tax
                                            [10] => _taxes
                                            [11] => _product_id
                                            [12] => _variation_id
                                            [13] => _qty
                                            [14] => _tax_class
                                            [15] => _line_subtotal
                                            [16] => _line_subtotal_tax
                                            [17] => _line_total
                                            [18] => _line_tax
                                            [19] => _line_tax_data
                                        )

                                    [meta_type:protected] => order_item
                                    [object_id_field_for_meta:protected] => order_item_id
                                    [must_exist_meta_keys:protected] => Array
                                        (
                                        )

                                )

                            [stores:WC_Data_Store:private] => Array
                                (
                                    [coupon] => WC_Coupon_Data_Store_CPT
                                    [customer] => WC_Customer_Data_Store
                                    [customer-download] => WC_Customer_Download_Data_Store
                                    [customer-download-log] => WC_Customer_Download_Log_Data_Store
                                    [customer-session] => WC_Customer_Data_Store_Session
                                    [order] => WC_Order_Data_Store_CPT
                                    [order-refund] => WC_Order_Refund_Data_Store_CPT
                                    [order-item] => WC_Order_Item_Data_Store
                                    [order-item-coupon] => WC_Order_Item_Coupon_Data_Store
                                    [order-item-fee] => WC_Order_Item_Fee_Data_Store
                                    [order-item-product] => WC_Order_Item_Product_Data_Store
                                    [order-item-shipping] => WC_Order_Item_Shipping_Data_Store
                                    [order-item-tax] => WC_Order_Item_Tax_Data_Store
                                    [payment-token] => WC_Payment_Token_Data_Store
                                    [product] => WC_Product_Data_Store_CPT
                                    [product-grouped] => WC_Product_Grouped_Data_Store_CPT
                                    [product-variable] => WC_Product_Variable_Data_Store_CPT
                                    [product-variation] => WC_Product_Variation_Data_Store_CPT
                                    [shipping-zone] => WC_Shipping_Zone_Data_Store
                                    [webhook] => WC_Webhook_Data_Store
                                    [report-revenue-stats] => Automattic\WooCommerce\Admin\API\Reports\Orders\Stats\DataStore
                                    [report-orders] => Automattic\WooCommerce\Admin\API\Reports\Orders\DataStore
                                    [report-orders-stats] => Automattic\WooCommerce\Admin\API\Reports\Orders\Stats\DataStore
                                    [report-products] => Automattic\WooCommerce\Admin\API\Reports\Products\DataStore
                                    [report-variations] => Automattic\WooCommerce\Admin\API\Reports\Variations\DataStore
                                    [report-products-stats] => Automattic\WooCommerce\Admin\API\Reports\Products\Stats\DataStore
                                    [report-variations-stats] => Automattic\WooCommerce\Admin\API\Reports\Variations\Stats\DataStore
                                    [report-categories] => Automattic\WooCommerce\Admin\API\Reports\Categories\DataStore
                                    [report-taxes] => Automattic\WooCommerce\Admin\API\Reports\Taxes\DataStore
                                    [report-taxes-stats] => Automattic\WooCommerce\Admin\API\Reports\Taxes\Stats\DataStore
                                    [report-coupons] => Automattic\WooCommerce\Admin\API\Reports\Coupons\DataStore
                                    [report-coupons-stats] => Automattic\WooCommerce\Admin\API\Reports\Coupons\Stats\DataStore
                                    [report-downloads] => Automattic\WooCommerce\Admin\API\Reports\Downloads\DataStore
                                    [report-downloads-stats] => Automattic\WooCommerce\Admin\API\Reports\Downloads\Stats\DataStore
                                    [admin-note] => Automattic\WooCommerce\Admin\Notes\DataStore
                                    [report-customers] => Automattic\WooCommerce\Admin\API\Reports\Customers\DataStore
                                    [report-customers-stats] => Automattic\WooCommerce\Admin\API\Reports\Customers\Stats\DataStore
                                    [report-stock-stats] => Automattic\WooCommerce\Admin\API\Reports\Stock\Stats\DataStore
                                )

                            [current_class_name:WC_Data_Store:private] => WC_Order_Item_Product_Data_Store
                            [object_type:WC_Data_Store:private] => order-item-product
                        )

                    [meta_data:protected] => Array
                        (
                        )

                )

        )

    [tax_lines] => Array
        (
        )

    [shipping_lines] => Array
        (
        )

    [fee_lines] => Array
        (
        )

    [coupon_lines] => Array
        (
        )

)

2021-08-03T17:21:54+00:00 DEBUG order data Array
(
    [id] => 48
    [parent_id] => 0
    [status] => pending
    [currency] => BRL
    [version] => 5.5.2
    [prices_include_tax] => 
    [date_created] => WC_DateTime Object
        (
            [utc_offset:protected] => 0
            [date] => 2021-08-03 17:21:19.000000
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [date_modified] => WC_DateTime Object
        (
            [utc_offset:protected] => 0
            [date] => 2021-08-03 17:21:19.000000
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [discount_total] => 0
    [discount_tax] => 0
    [shipping_total] => 0
    [shipping_tax] => 0
    [cart_tax] => 0
    [total] => 1.00
    [total_tax] => 0
    [customer_id] => 3
    [order_key] => wc_order_y1FGXikVUBPzc
    [billing] => Array
        (
            [first_name] => Ricardo José
            [last_name] => Eduardo Novaes
            [company] => 
            [address_1] => rua dulvina grandin fichelli
            [address_2] => 
            [city] => Paulinia
            [state] => SP
            [postcode] => 13142-514
            [country] => BR
            [email] => ricardojoseeduardonovaes-88@arteche.com.br
            [phone] => (91) 88888-8888
        )

    [shipping] => Array
        (
            [first_name] => 
            [last_name] => 
            [company] => 
            [address_1] => 
            [address_2] => 
            [city] => 
            [state] => 
            [postcode] => 
            [country] => 
        )

    [payment_method] => woocommerce_openpix_pix
    [payment_method_title] => Pay with Pix
    [transaction_id] => 
    [customer_ip_address] => 192.168.32.1
    [customer_user_agent] => Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
    [created_via] => checkout
    [customer_note] => 
    [date_completed] => 
    [date_paid] => 
    [cart_hash] => c1071e415b0d4c7b595f8f0e8ec4521a
    [number] => 48
    [meta_data] => Array
        (
            [0] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1414
                            [key] => _billing_persontype
                            [value] => 1
                        )

                    [data:protected] => Array
                        (
                            [id] => 1414
                            [key] => _billing_persontype
                            [value] => 1
                        )

                )

            [1] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1415
                            [key] => _billing_cpf
                            [value] => 865.752.475-98
                        )

                    [data:protected] => Array
                        (
                            [id] => 1415
                            [key] => _billing_cpf
                            [value] => 865.752.475-98
                        )

                )

            [2] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1416
                            [key] => _billing_cnpj
                            [value] => 
                        )

                    [data:protected] => Array
                        (
                            [id] => 1416
                            [key] => _billing_cnpj
                            [value] => 
                        )

                )

            [3] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1417
                            [key] => _billing_number
                            [value] => 75
                        )

                    [data:protected] => Array
                        (
                            [id] => 1417
                            [key] => _billing_number
                            [value] => 75
                        )

                )

            [4] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1418
                            [key] => _billing_neighborhood
                            [value] => 
                        )

                    [data:protected] => Array
                        (
                            [id] => 1418
                            [key] => _billing_neighborhood
                            [value] => 
                        )

                )

            [5] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1419
                            [key] => _billing_cellphone
                            [value] => (19) 77777-7777
                        )

                    [data:protected] => Array
                        (
                            [id] => 1419
                            [key] => _billing_cellphone
                            [value] => (19) 77777-7777
                        )

                )

            [6] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1421
                            [key] => is_vat_exempt
                            [value] => no
                        )

                    [data:protected] => Array
                        (
                            [id] => 1421
                            [key] => is_vat_exempt
                            [value] => no
                        )

                )

        )

    [line_items] => Array
        (
            [42] => WC_Order_Item_Product Object
                (
                    [extra_data:protected] => Array
                        (
                            [product_id] => 0
                            [variation_id] => 0
                            [quantity] => 1
                            [tax_class] => 
                            [subtotal] => 0
                            [subtotal_tax] => 0
                            [total] => 0
                            [total_tax] => 0
                            [taxes] => Array
                                (
                                    [subtotal] => Array
                                        (
                                        )

                                    [total] => Array
                                        (
                                        )

                                )

                        )

                    [data:protected] => Array
                        (
                            [order_id] => 48
                            [name] => Moletom Cinza
                            [product_id] => 11
                            [variation_id] => 0
                            [quantity] => 1
                            [tax_class] => 
                            [subtotal] => 1
                            [subtotal_tax] => 0
                            [total] => 1
                            [total_tax] => 0
                            [taxes] => Array
                                (
                                    [total] => Array
                                        (
                                        )

                                    [subtotal] => Array
                                        (
                                        )

                                )

                        )

                    [cache_group:protected] => order-items
                    [meta_type:protected] => order_item
                    [object_type:protected] => order_item
                    [id:protected] => 42
                    [changes:protected] => Array
                        (
                        )

                    [object_read:protected] => 1
                    [default_data:protected] => Array
                        (
                            [order_id] => 0
                            [name] => 
                            [product_id] => 0
                            [variation_id] => 0
                            [quantity] => 1
                            [tax_class] => 
                            [subtotal] => 0
                            [subtotal_tax] => 0
                            [total] => 0
                            [total_tax] => 0
                            [taxes] => Array
                                (
                                    [subtotal] => Array
                                        (
                                        )

                                    [total] => Array
                                        (
                                        )

                                )

                        )

                    [data_store:protected] => WC_Data_Store Object
                        (
                            [instance:WC_Data_Store:private] => WC_Order_Item_Product_Data_Store Object
                                (
                                    [internal_meta_keys:protected] => Array
                                        (
                                            [0] => _order_id
                                            [1] => _name
                                            [2] => _product_id
                                            [3] => _variation_id
                                            [4] => _quantity
                                            [5] => _tax_class
                                            [6] => _subtotal
                                            [7] => _subtotal_tax
                                            [8] => _total
                                            [9] => _total_tax
                                            [10] => _taxes
                                            [11] => _product_id
                                            [12] => _variation_id
                                            [13] => _qty
                                            [14] => _tax_class
                                            [15] => _line_subtotal
                                            [16] => _line_subtotal_tax
                                            [17] => _line_total
                                            [18] => _line_tax
                                            [19] => _line_tax_data
                                        )

                                    [meta_type:protected] => order_item
                                    [object_id_field_for_meta:protected] => order_item_id
                                    [must_exist_meta_keys:protected] => Array
                                        (
                                        )

                                )

                            [stores:WC_Data_Store:private] => Array
                                (
                                    [coupon] => WC_Coupon_Data_Store_CPT
                                    [customer] => WC_Customer_Data_Store
                                    [customer-download] => WC_Customer_Download_Data_Store
                                    [customer-download-log] => WC_Customer_Download_Log_Data_Store
                                    [customer-session] => WC_Customer_Data_Store_Session
                                    [order] => WC_Order_Data_Store_CPT
                                    [order-refund] => WC_Order_Refund_Data_Store_CPT
                                    [order-item] => WC_Order_Item_Data_Store
                                    [order-item-coupon] => WC_Order_Item_Coupon_Data_Store
                                    [order-item-fee] => WC_Order_Item_Fee_Data_Store
                                    [order-item-product] => WC_Order_Item_Product_Data_Store
                                    [order-item-shipping] => WC_Order_Item_Shipping_Data_Store
                                    [order-item-tax] => WC_Order_Item_Tax_Data_Store
                                    [payment-token] => WC_Payment_Token_Data_Store
                                    [product] => WC_Product_Data_Store_CPT
                                    [product-grouped] => WC_Product_Grouped_Data_Store_CPT
                                    [product-variable] => WC_Product_Variable_Data_Store_CPT
                                    [product-variation] => WC_Product_Variation_Data_Store_CPT
                                    [shipping-zone] => WC_Shipping_Zone_Data_Store
                                    [webhook] => WC_Webhook_Data_Store
                                    [report-revenue-stats] => Automattic\WooCommerce\Admin\API\Reports\Orders\Stats\DataStore
                                    [report-orders] => Automattic\WooCommerce\Admin\API\Reports\Orders\DataStore
                                    [report-orders-stats] => Automattic\WooCommerce\Admin\API\Reports\Orders\Stats\DataStore
                                    [report-products] => Automattic\WooCommerce\Admin\API\Reports\Products\DataStore
                                    [report-variations] => Automattic\WooCommerce\Admin\API\Reports\Variations\DataStore
                                    [report-products-stats] => Automattic\WooCommerce\Admin\API\Reports\Products\Stats\DataStore
                                    [report-variations-stats] => Automattic\WooCommerce\Admin\API\Reports\Variations\Stats\DataStore
                                    [report-categories] => Automattic\WooCommerce\Admin\API\Reports\Categories\DataStore
                                    [report-taxes] => Automattic\WooCommerce\Admin\API\Reports\Taxes\DataStore
                                    [report-taxes-stats] => Automattic\WooCommerce\Admin\API\Reports\Taxes\Stats\DataStore
                                    [report-coupons] => Automattic\WooCommerce\Admin\API\Reports\Coupons\DataStore
                                    [report-coupons-stats] => Automattic\WooCommerce\Admin\API\Reports\Coupons\Stats\DataStore
                                    [report-downloads] => Automattic\WooCommerce\Admin\API\Reports\Downloads\DataStore
                                    [report-downloads-stats] => Automattic\WooCommerce\Admin\API\Reports\Downloads\Stats\DataStore
                                    [admin-note] => Automattic\WooCommerce\Admin\Notes\DataStore
                                    [report-customers] => Automattic\WooCommerce\Admin\API\Reports\Customers\DataStore
                                    [report-customers-stats] => Automattic\WooCommerce\Admin\API\Reports\Customers\Stats\DataStore
                                    [report-stock-stats] => Automattic\WooCommerce\Admin\API\Reports\Stock\Stats\DataStore
                                )

                            [current_class_name:WC_Data_Store:private] => WC_Order_Item_Product_Data_Store
                            [object_type:WC_Data_Store:private] => order-item-product
                        )

                    [meta_data:protected] => Array
                        (
                        )

                )

        )

    [tax_lines] => Array
        (
        )

    [shipping_lines] => Array
        (
        )

    [fee_lines] => Array
        (
        )

    [coupon_lines] => Array
        (
        )

)

2021-08-03T17:21:57+00:00 DEBUG correlationID 980ad619-d951-4a9f-9b49-2b090d26e6c5
@daniloab
Copy link
Author

daniloab commented Aug 3, 2021

order when only individual person is accepted

[meta_data] => Array
        (
            [0] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1452
                            [key] => _billing_cpf
                            [value] => 781.614.764-38
                        )

                    [data:protected] => Array
                        (
                            [id] => 1452
                            [key] => _billing_cpf
                            [value] => 781.614.764-38
                        )

                )

            [1] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1453
                            [key] => _billing_number
                            [value] => 373
                        )

                    [data:protected] => Array
                        (
                            [id] => 1453
                            [key] => _billing_number
                            [value] => 373
                        )

                )

            [2] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1454
                            [key] => _billing_neighborhood
                            [value] => Jardim Nélia
                        )

                    [data:protected] => Array
                        (
                            [id] => 1454
                            [key] => _billing_neighborhood
                            [value] => Jardim Nélia
                        )

                )

            [3] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1455
                            [key] => _billing_cellphone
                            [value] => (21) 33333-3333
                        )

                    [data:protected] => Array
                        (
                            [id] => 1455
                            [key] => _billing_cellphone
                            [value] => (21) 33333-3333
                        )

                )

            [4] => WC_Meta_Data Object
                (
                    [current_data:protected] => Array
                        (
                            [id] => 1456
                            [key] => is_vat_exempt
                            [value] => no
                        )

                    [data:protected] => Array
                        (
                            [id] => 1456
                            [key] => is_vat_exempt
                            [value] => no
                        )

                )

        )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment