/** * Show international customs disclaimer checkbox at WooCommerce checkout * Displays for all countries EXCEPT United States (US) */ // Add the checkbox field to checkout add_action( 'woocommerce_review_order_before_submit', 'idesign_international_customs_checkbox' ); function idesign_international_customs_checkbox() { $chosen_country = WC()->customer->get_shipping_country(); // Fallback to billing country if shipping country is not set if ( empty( $chosen_country ) ) { $chosen_country = WC()->customer->get_billing_country(); } // Only show for non-US countries if ( $chosen_country === 'US' ) { return; } ?>
'checkbox', 'label' => __( 'I understand that international shipments may be delayed, held, or rejected by cust oms in my country and refunds cannot be guaranteed. I accept this liability.', 'woocommerce' ), 'required' => true, ), WC()->checkout->get_value( 'international_customs_accept' ) ); ?>
customer->get_shipping_country(); if ( empty( $chosen_country ) ) { $chosen_country = WC()->customer->get_billing_country(); } // Only validate for non-US countries if ( $chosen_country === 'US' ) { return; } if ( empty( $_POST['international_customs_accept'] ) ) { wc_add_notice( __( 'Please acknowledge the international shipping disclaimer to complete your order.', 'woocommerce' ), 'error' ); } } // Save the checkbox value to th e order meta add_action( 'woocommerce_checkout_update_order_meta', 'idesign_save_international_customs_checkbox' ); function idesign_save_international_customs_checkbox( $order_id ) { if ( ! empty( $_POST['international_customs_accept'] ) ) { update_post_meta( $order_id, '_international_customs_accept', '1' ); } } // Re-render checkbox dynamically when country is changed (AJAX update) add_filter( 'woocommerce_checkout_fields', 'idesign_customs_checkbox_country_refresh' ); function idesign_customs_che
Your cart is currently empty.

Subtotal $0.00
Total $0.00

Shipping Information

Add Apartment, suite, unit, etc.

Add Apartment, suite, unit, etc.

Shipping Method

Order Summary

Product
Total
Subtotal $0.00
Total $0.00

Payment

All transactions are secure and encrypted.

Customs charges on international shipments are the responsibility of the buyer or recipient (the importer), not the seller. Legally, the person receiving the goods must pay duties/taxes to their own government, as they are considered the importer of record. It is the buyer’s duty to know their country’s import regulations.  Please know your country’s laws. We do not guarantee delivery for international shipments.

Secret Link