From 949a7d56458373a1ace53108572de77d65ee3a47 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Tue, 14 Nov 2023 01:01:24 +0600 Subject: [PATCH 1/2] Add: Filter hook for Image Size on Cart Items --- src/BigCommerce/Templates/Cart_Items.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/BigCommerce/Templates/Cart_Items.php b/src/BigCommerce/Templates/Cart_Items.php index 0bd48178..446faec0 100644 --- a/src/BigCommerce/Templates/Cart_Items.php +++ b/src/BigCommerce/Templates/Cart_Items.php @@ -18,7 +18,12 @@ class Cart_Items extends Controller { protected function parse_options( array $options ) { $defaults = [ self::CART => [], - self::IMAGE_SIZE => Image_Sizes::BC_SMALL, + /** + * Filter the image size used for cart item image + * + * @param string $size The image size to use + */ + self::IMAGE_SIZE => apply_filters( 'bigcommerce/template/cart_items_image/size', Image_Sizes::BC_SMALL ), ]; return wp_parse_args( $options, $defaults ); From 1954e3934c844192004c7fe1fef403e90f21bf33 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Tue, 14 Nov 2023 01:05:03 +0600 Subject: [PATCH 2/2] changed wrong parameter name --- src/BigCommerce/Templates/Cart_Items.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BigCommerce/Templates/Cart_Items.php b/src/BigCommerce/Templates/Cart_Items.php index 446faec0..dcf33b41 100644 --- a/src/BigCommerce/Templates/Cart_Items.php +++ b/src/BigCommerce/Templates/Cart_Items.php @@ -21,7 +21,7 @@ protected function parse_options( array $options ) { /** * Filter the image size used for cart item image * - * @param string $size The image size to use + * @param string $IMAGE_SIZE The image size to use */ self::IMAGE_SIZE => apply_filters( 'bigcommerce/template/cart_items_image/size', Image_Sizes::BC_SMALL ), ];