private function submit_shipping_and_billing() { if (!$this->verify_nonce('wpsc-checkout-form')) { return; } // wipe out completed steps because we're starting from scratch $this->wizard->reset(); $form_args = wpsc_get_checkout_form_args(); $validation = wpsc_validate_form($form_args); if (is_wp_error($validation)) { $this->message_collection->add(__('Sorry but it looks like there are some errors with your submitted information.', 'wpsc'), 'error'); wpsc_set_validation_errors($validation, $context = 'inline'); return; } if (!empty($_POST['wpsc_copy_billing_details'])) { _wpsc_copy_billing_details(); } $this->save_shipping_and_billing_info(); }
private function submit_customer_settings() { if (!$this->verify_nonce('wpsc-customer-settings-form')) { return; } $form_args = wpsc_get_customer_settings_form_args(); $validation = wpsc_validate_form($form_args); if (is_wp_error($validation)) { $this->message_collection->add(__('Sorry, but it looks like there are some errors with your submitted information.', 'wpsc'), 'error'); wpsc_set_validation_errors($validation, $context = 'inline'); return; } if (!empty($_POST['wpsc_copy_billing_details'])) { _wpsc_copy_billing_details(); } $this->save_customer_settings(); }