This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* PLACE ORDERS ON HOLD WHEN BILLING & SHIPPING INFO DO NOT MATCH */ | |
add_action( 'woocommerce_thankyou', 'woocommerce_billing_shipping_address_match', 10, 1); | |
function woocommerce_billing_shipping_address_match( $order_id ) { | |
if ( ! $order_id ) { | |
return; | |
} | |
// Get the order id | |
$order = wc_get_order( $order_id ); |