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 Show Custom Content Above Product Meta

Added: 1 year ago

Last Updated: 1 year ago

This snippet allows you to display custom content above the product meta. Product meta being the SKU, categories and tags the product belongs to. You may wish to output more important meta data using...

WooCommerce

AI Verified

0

WooCommerce Show Product Attribute On Archive Loop Items

Added: 1 year ago

Last Updated: 1 year ago

This snippet allows you to get the WooCommerce product attributes and output them on the product archive loop items below the product name. In this particular example, we output the “color” product at...

WooCommerce

AI Verified

0

Call Us / Add to Basket - Woo Button swap

Added: 1 year ago

Last Updated: 9 months ago

Enable 'Add to Basket' for Products that are In Stock and 'Call Us' when items are out of stock

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

WooCommerce

AI Verified

1

Hide Order Notes

Added: 1 year ago

Last Updated: 1 year ago

Hide Order notes in WooCommerce check out page.

WooCommerce

AI Verified

0

Change COD default order status to On-hold

Added: 1 year ago

Last Updated: 1 year ago

Makes On-hold the orders using COD and BACS

JavaScript

Unverified

0

Text fields makes autocomplete off

Added: 1 year ago

Last Updated: 1 year ago

Make text field autocomplete off using the Fluent forms plugin