Address_Form::get_data()

Summary

No summary available.

Source

File: src/BigCommerce/Templates/Address_Form.php

	public function get_data() {
		$data = $this->options;
		list ( $data[ self::COUNTRIES ], $data[ self::STATES ] ) = $this->get_countries_and_states( $this->options[ self::COUNTRY ] );

		$error_data           = $this->get_error_data();
		$data[ self::ERRORS ] = $error_data ? $error_data[ 'error' ]->get_error_codes() : [];
		if ( $error_data && array_key_exists( 'submission', $error_data ) ) {
			if ( $error_data[ 'submission' ][ 'bc-address' ][ 'id' ] == $data[ self::ADDRESS_ID ] ) {
				$data = $this->restore_submission( $data, $error_data[ 'submission' ] );
			}
		}

		return $data;
	}

User Contributed Notes

You must log in before being able to contribute a note or feedback.