Answers for "order total woocommerce"

PHP
0

orderby total sales woocommerce

$args = array(
  'post_type' => 'shop_order',
  'posts_per_page' => 2000,
  'orderby'   => 'meta_value_num',
  'meta_key'  => 'total_sales',
  ),
);
Posted by: Guest on October-20-2020
0

create woocommerce order

data = {
    "payment_method": "bacs",
    "payment_method_title": "Direct Bank Transfer",
    "set_paid": True,
    "billing": {
        "first_name": "John",
        "last_name": "Doe",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US",
        "email": "[email protected]",
        "phone": "(555) 555-5555"
    },
    "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US"
    },
    "line_items": [
        {
            "product_id": 93,
            "quantity": 2
        },
        {
            "product_id": 22,
            "variation_id": 23,
            "quantity": 1
        }
    ],
    "shipping_lines": [
        {
            "method_id": "flat_rate",
            "method_title": "Flat Rate",
            "total": "10.00"
        }
    ]
}

print(wcapi.post("orders", data).json())
Posted by: Guest on October-12-2021
0

orderby total sales woocommerce

$args = array(
  'post_type' => 'shop_order',
  'posts_per_page' => 2000,
  'orderby'   => 'meta_value_num',
  'meta_key'  => 'total_sales',
  ),
);
Posted by: Guest on October-20-2020
0

create woocommerce order

data = {
    "payment_method": "bacs",
    "payment_method_title": "Direct Bank Transfer",
    "set_paid": True,
    "billing": {
        "first_name": "John",
        "last_name": "Doe",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US",
        "email": "[email protected]",
        "phone": "(555) 555-5555"
    },
    "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "address_1": "969 Market",
        "address_2": "",
        "city": "San Francisco",
        "state": "CA",
        "postcode": "94103",
        "country": "US"
    },
    "line_items": [
        {
            "product_id": 93,
            "quantity": 2
        },
        {
            "product_id": 22,
            "variation_id": 23,
            "quantity": 1
        }
    ],
    "shipping_lines": [
        {
            "method_id": "flat_rate",
            "method_title": "Flat Rate",
            "total": "10.00"
        }
    ]
}

print(wcapi.post("orders", data).json())
Posted by: Guest on October-12-2021

Code answers related to "order total woocommerce"

Browse Popular Code Answers by Language