Search
 
SCRIPT & CODE EXAMPLE
 

PHP

woocommerce custom payment process method

function process_payment( $order_id ) {
    global $woocommerce;
    $order = new WC_Order( $order_id );

    // Mark as on-hold (we're awaiting the cheque)
    $order->update_status('on-hold', __( 'Awaiting cheque payment', 'woocommerce' ));

    // Remove cart
    $woocommerce->cart->empty_cart();

    // Return thankyou redirect
    return array(
        'result' => 'success',
        'redirect' => $this->get_return_url( $order )
    );
}
Comment

PREVIOUS NEXT
Code Example
Php :: how to create object in php 
Php :: php variables 
Php :: how to store wp editor in wordpress 
Php :: laravel request query logger 
Php :: laravel 8 cron job 
Php :: php array_slice 
Php :: php mvc example 
Php :: laravel lumen 
Php :: inner pages not found yii 
Php :: Alternatives to chmod 775 or 664 
Php :: php save array to files a 
Php :: Eloquent orWhere clousure 
Php :: how to convert amount in words in php 
Php :: php glob multiple file with different formats in directory 
Php :: PHP strnatcasecmp — Case insensitive string comparisons using a "natural order" algorithm 
Php :: if cat 1 then send email woocommerce functions 
Php :: how get end of array in foreach php 
Php :: File Open File Read File Close 
Php :: wp query compare like and or 
Php :: generate rand password php 
Php :: exe:/usr/local/bin/php 
Php :: wordpress plugin public page 
Php :: php array key value print 
Php :: visual studio php dollar sign double click 
Php :: example of valid php variables 
Php :: PHP Forms - Validate E-mail and URL 
Php :: pht get header from request 
Php :: convert any date to db date in suitecrm 
Php :: create newfilter wordpress 
Php :: laravel pagination bootstrap sorting column 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =