AI Verified

Name

Change COD default order status to On-hold

About

Makes On-hold the orders using COD and BACS

Language

PHP

Rating

Voted: 0 by 0 user(s)

Codevault

Jaypee

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: older

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

Website/ Profile URL:

https://maglacasdigital.com/

History

Last modified:

21/11/2022

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Change COD default order status to On-hold

 
                    
1/*
2* Makes On-hold the orders using COD and BACS
3*/
4add_filter( 'woocommerce_bacs_process_payment_order_status', 'set_process_payment_order_status_on_hold', 10 );
5add_filter( 'woocommerce_cod_process_payment_order_status', 'set_process_payment_order_status_on_hold', 10 );
6 
7function set_process_payment_order_status_on_hold( $status ) {
8 return 'on-hold';
9}

0

Related Snippets

Please see some snippets below related to this snippet..

WooCommerce

AI Verified

0

WooCommerce Add Content Under Product Prices On Archive Page

Added: 10 months ago

Last Updated: 10 months ago

This quick guide shows you how to add any custom content under the product price on the WooCommerce Product Archive template. You may wish to show a shipping notice, promotion, or in our example “Pric...

WooCommerce

Unverified

1

WooCommerce Custom Link To Add Products To Cart

Added: 10 months ago

Last Updated: 1 month ago

Do you want to be able to add links in your content to allow customers to add products to cart without them having to navigate to the product page? Maybe you have pricing plans and want to link each t...

WooCommerce

AI Verified

0

Merge Two "My Account" Tabs @ WooCommerce Account

Added: 1 year ago

Last Updated: 10 months ago

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

WooCommerce

AI Verified

1

Makes read terms of payment checked by default

Added: 10 months ago

Last Updated: 3 months ago

Check out page makes read terms of payment checked by default

WooCommerce

AI Verified

1

Hide Order Notes

Added: 10 months ago

Last Updated: 4 months ago

Hide Order notes in WooCommerce check out page.

WooCommerce

AI Verified

0

Change COD default order status to On-hold

Added: 10 months ago

Last Updated: 10 months ago

Makes On-hold the orders using COD and BACS