add_action('woocommerce_review_order_before_submit', 'add_card_save_consent_checkbox', 10); function add_card_save_consent_checkbox() { woocommerce_form_field('card_save_consent', [ 'type' => 'checkbox', 'class' => ['form-row terms'], 'label' => 'By proceeding with the purchase, I agree to the Terms and Conditions, and understand that my card will be saved and may be charged post-service for overweight or prohibited items.', 'required' => true, ]); } add_action('woocommerce_checkout_process', 'validate_card_save_consent'); function validate_card_save_consent() { if (!isset($_POST['card_save_consent'])) { wc_add_notice(__('You must agree to save your card and allow post-service charges.'), 'error'); } } add_action('woocommerce_review_order_after_payment', 'add_save_card_button'); function add_save_card_button() { echo '
'; } add_action('woocommerce_before_checkout_form', 'show_card_saved_notice', 5); function show_card_saved_notice() { if (isset($_GET['card_saved']) && $_GET['card_saved'] == '1') { wc_print_notice('✅ Your card was saved securely for future charges.', 'success'); } } add_filter('wc_stripe_payment_request_is_reusable', '__return_true'); add_filter('wc_stripe_force_save_source', '__return_true'); add_filter('wc_stripe_save_payment_method_checkbox_enabled', '__return_true'); 20-Yard Dumpsters Archives - 904 Dumpster