15 1 0 4000 1 https://codeblock.co.za 300 true 0

save()

0 Comments

Framework / CMS

WooCommerce [Version: Since 3.0.0]

Syntax

Typical Usage

Saves or updates WooCommerce orders, products and other objects.


Accepted Parameters

none.

Return Value(s)

Returns the item’s ID.

Examples of save()

Example 1

<?php
$user_id = get_current_user_id(); 
$args = array(
    'customer_id'   => $user_id
);

$new_order = wc_create_order($args);
$new_order->save();

Was This Helpful?

Previous Post
update_status()

0 Comments

Leave a Reply