public/wordpress/wp-content/plugins/wp-courseware/includes/controllers/checkout.php
/**
	 * Process Checkout Failed.
	 *
	 * Collects all errors and returns
	 * the checkout as failed.
	 *
	 * @since 4.3.0
	 */
Process Checkout Failed.
Collects all errors and returns
the checkout as failed.


Process Checkout Failed . Collects all errors and returns the checkout as failed .
protected function process_checkout_failed() {
		if ( wpcw_is_ajax() ) {
			ob_start();
			wpcw_print_notices();
			$messages = ob_get_clean();
			$response = array(
				'result'   => 'failure',
				'messages' => isset( $messages ) ? $messages : '',
				'reload'   => isset( wpcw()->session->reload_checkout ),
			);
			unset( wpcw()->session->reload_checkout );
			wp_send_json( $response );
		} else {
			wp_safe_redirect( apply_filters( 'wpcw_checkout_failed_redirect', wpcw_get_page_permalink( 'checkout' ) ) );
			exit;
		}
	}
protected function process_checkout_failed ( ) { if ( wpcw_is_ajax ( ) ) { ob_start ( ) ; wpcw_print_notices ( ) ; $ messages = ob_get_clean ( ) ; $ response = array ( 'result' => 'failure' , 'messages' => isset ( $ messages ) ? $ messages : '' , 'reload' => isset ( wpcw ( ) -> session -> reload_checkout ) , ) ; unset ( wpcw ( ) -> session -> reload_checkout ) ; wp_send_json ( $ response ) ; } else { wp_safe_redirect ( apply_filters ( 'wpcw_checkout_failed_redirect' , wpcw_get_page_permalink ( 'checkout' ) ) ) ; exit ; } }
Process Checkout Failed.
Process Checkout Failed .