Search
 
SCRIPT & CODE EXAMPLE
 

PHP

wc php retrieve the order Id on Order pay page

global $wp;

if ( isset($wp->query_vars['order-pay']) && absint($wp->query_vars['order-pay']) > 0 ) {
    $order_id = absint($wp->query_vars['order-pay']); // The order ID

    $order    = wc_get_order( $order_id ); // Get the WC_Order Object instance
}
Comment

PREVIOUS NEXT
Code Example
Php :: how use same method in another class in laravel 
Php :: rerender block in twig 
Php :: laravel select error 
Php :: factorial program in php 
Php :: How to generate a create table script for an existing table in php/Codeigniter 
Php :: return user details from controller to view 
Php :: PHP Superglobal - $_POST 
Php :: PHP OOP - Class Constants 
Php :: show only fatal errors php 
Php :: selecting a time zone from a drop-down list 
Php :: how to disable auto prediction html input in laravel 
Php :: how to download file in laravel 8 delelete from directry 
Php :: Dispatch, performance 
Php :: nano seed generator 
Php :: laravel store mail driver info in database 
Php :: Type cast using int php 
Php :: function() use() php clousure examples 
Php :: odoctrine querybuilder print sql 
Php :: laravel collect whereNotIn not working 
Php :: codeingniter 3 not like 
Php :: laravel where has relation 
Php :: php season calculation 
Php :: live search in ajax 
Php :: ultimo numeto php 
Php :: php mailer 
Php :: timestamp in model laravel 
Php :: stripslash 
Php :: get action name in yii2 
Php :: laravel carbon y-m-d 
Java :: Cannot fit requested classes in a single dex file 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =