Amp_Cart_Items

Summary

Amp_Cart_Items class


Source

File: src/BigCommerce/Templates/Amp_Cart_items.php

class Amp_Cart_Items extends Cart_Items {
	const PROXY_BASE = 'proxy_base';

	protected function parse_options( array $options ) {
		$defaults = [
			self::PROXY_BASE => '',
			self::CART       => [],
			self::IMAGE_SIZE => Image_Sizes::BC_SMALL,
		];

		return wp_parse_args( $options, $defaults );
	}

	public function get_data() {
		return array_merge(
			parent::get_data(),
			[
				/**
				 * Filters REST proxy base.
				 *
				 * @param string $proxy_base Proxy base.
				 */
				self::PROXY_BASE => apply_filters( 'bigcommerce/rest/proxy_base', 'bc/v3' ),
			]
		);
	}
}

Methods


User Contributed Notes

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