mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-08 21:52:55 +08:00
Add custom checkout validation (WIP)
This commit is contained in:
parent
2024f2c0ab
commit
5089b6335f
1 changed files with 8 additions and 0 deletions
|
@ -98,6 +98,14 @@ class PayUponInvoice {
|
|||
}
|
||||
return $description;
|
||||
}, 10, 2);
|
||||
|
||||
add_action('woocommerce_checkout_order_processed', function($order_id, $posted_data, $order) {
|
||||
if($order->get_billing_country() !== 'DE') {
|
||||
wp_send_json_error(array(
|
||||
'result' => 'failure',
|
||||
));
|
||||
}
|
||||
}, 10, 3);
|
||||
}
|
||||
|
||||
public function add_parameter_block() { ?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue