Search
 
SCRIPT & CODE EXAMPLE
 

PHP

wordpress get order

// Get an instance of the WC_Order object (same as before)
$order = wc_get_order( $order_id );

$order_id  = $order->get_id(); // Get the order ID
$parent_id = $order->get_parent_id(); // Get the parent order ID (for subscriptions…)

$user_id   = $order->get_user_id(); // Get the costumer ID
$user      = $order->get_user(); // Get the WP_User object

$order_status  = $order->get_status(); // Get the order status (see the conditional method has_status() below)
$currency      = $order->get_currency(); // Get the currency used  
$payment_method = $order->get_payment_method(); // Get the payment method ID
$payment_title = $order->get_payment_method_title(); // Get the payment method title
$date_created  = $order->get_date_created(); // Get date created (WC_DateTime object)
$date_modified = $order->get_date_modified(); // Get date modified (WC_DateTime object)

$billing_country = $order->get_billing_country(); // Customer billing country

// ... and so on ...
Comment

PREVIOUS NEXT
Code Example
Php :: how to store an image in laravel directly from url 
Php :: Artisan command on live server 
Php :: update many laravel 
Php :: generate slug on create laravel 
Php :: laravel scss 
Php :: laravel execute command from terminal 
Php :: PHP Time Limit: 
Php :: how to change woocommerce read more text 
Php :: title tag wordpress 
Php :: php echo new line terminal 
Php :: Laravel assets url issue 
Php :: calculate days of a month 
Php :: laravel get latest 
Php :: laravel collection map 
Php :: Remove the Breadcrumbs on the Shop Entirely 
Php :: laravel find by field 
Php :: how to remove keys in subarray php 
Php :: jwt auth laravel auth without password field 
Php :: php realpath 
Php :: php foreach alternative syntax 
Php :: php print array nice format 
Php :: laravel create request 
Php :: how to add share icon in wordpress 
Php :: call to a member function setcookie() on null laravel middleware 
Php :: fetch method and class in codeigniter 
Php :: wp get attachment id 
Php :: ckeditor laravel 
Php :: php sha512 hash 
Php :: lDownload multiple files as a zip-file using php 
Php :: adminlte 3 laravel 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =