Query_Mapper::map_rest_args_to_query( $args )

Summary

No summary available.

Source

File: src/BigCommerce/Post_Types/Product/Query_Mapper.php

	public function map_rest_args_to_query( $args ) {
		$parameter_mappings = [
			'page'                 => 'paged',
			'bcid'                 => 'id',
		];
		foreach ( $parameter_mappings as $key => $new_key ) {
			if ( array_key_exists( $key, $args ) && ! array_key_exists( $new_key, $args ) ) {
				$args[ $new_key ] = $args[ $key ];
				unset( $args[ $key ] );
			}
		}
		$args = wp_parse_args( $args, Shortcodes\Products::default_attributes() );

		return $this->map_shortcode_args_to_query( $args );
	}


User Contributed Notes

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