Search
 
SCRIPT & CODE EXAMPLE
 

PHP

auto complete order

/**
 * Auto Complete all WooCommerce orders.
 */
add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order');
function custom_woocommerce_auto_complete_order( $order_id ) {
    if ( ! $order_id ) {
        return;
    }

    $order = wc_get_order( $order_id );
    $order->update_status( 'completed' );
}
Comment

PREVIOUS NEXT
Code Example
Php :: acf field without spaces 
Php :: laravel scheduler every 10 minutes 
Php :: data XML 
Php :: In PackageManifest.php line 131: Undefined index: name 
Php :: add class to li 
Php :: pegar porcentagem de um valor php 
Php :: asas 
Php :: php how to concatenate strings 
Php :: Deprecated: Implicit conversion from float 
Php :: laravel How do I chain multiple where and orWhere clause in laravel from an Array [duplicate] 
Php :: htaccess rewriterule 
Php :: php check if variable is resource 
Php :: php artisan tinker get records 
Php :: woocommerce status change date 
Php :: discord.py Levels 
Php :: how to sum values of two product which are same gst rate and this product are come from foreach loop in php 
Php :: short isset and not empty php 8 
Php :: obtener tipo 
Php :: do php 
Php :: $n = readline(); for($i = 0; $i < $n ; $i++) { $name = readline(); $names[$name] = (isset($names[$name]) ? $names[$name] + 1 : 1); } 
Php :: lewin muzvonda 
Php :: get_user_info 
Php :: how to change css during holidays with php or Javascript in wordpress 
Php :: foreach in json object php 
Php :: logout php mysql 
Php :: selecting values from database 
Php :: laravel compile blade 
Php :: removing public from laravel url 
Php :: virtual fields cakephp 4 
Php :: composer in serveur ionos 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =