Commit 4923e71fe2a for woocommerce
commit 4923e71fe2abbb907ced48565ce7f5098b7e6d05
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date: Wed Apr 1 14:22:17 2026 +0200
Use default cursor in Product Gallery large image when it's not clickable (#63956)
* Use default cursor in Product Gallery large image when it's not clickable
* Add changelog
* Fix typo
* Fix selector
diff --git a/plugins/woocommerce/changelog/fix-63955-product-gallery-cursor b/plugins/woocommerce/changelog/fix-63955-product-gallery-cursor
new file mode 100644
index 00000000000..cd91b211632
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-63955-product-gallery-cursor
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Use default cursor in Product Gallery large image when it's not clickable
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-gallery/style.scss b/plugins/woocommerce/client/blocks/assets/js/blocks/product-gallery/style.scss
index 83c34171d96..b66c813f7ea 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-gallery/style.scss
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-gallery/style.scss
@@ -63,9 +63,8 @@ $dialog-padding: 20px;
transition: all 0.1s linear;
z-index: 1;
- // Keep the order in this way. The hoverZoom class should override the full-screen-on-click class when both are applied.
- &:where(.wc-block-woocommerce-product-gallery-large-image__image--full-screen-on-click) {
- cursor: pointer;
+ &:where(:not(.wc-block-woocommerce-product-gallery-large-image__image--full-screen-on-click)) {
+ cursor: default;
}
&:where(.wc-block-woocommerce-product-gallery-large-image__image--hoverZoom) {
diff --git a/plugins/woocommerce/src/Blocks/BlockTypes/ProductGalleryLargeImage.php b/plugins/woocommerce/src/Blocks/BlockTypes/ProductGalleryLargeImage.php
index 88da5a234fe..4c9170335fd 100644
--- a/plugins/woocommerce/src/Blocks/BlockTypes/ProductGalleryLargeImage.php
+++ b/plugins/woocommerce/src/Blocks/BlockTypes/ProductGalleryLargeImage.php
@@ -145,7 +145,7 @@ class ProductGalleryLargeImage extends AbstractBlock {
$p->set_attribute( 'tabindex', '-1' );
} else {
/**
- * If we can't find and <a> tag, we're at then end of the document.
+ * If we can't find and <a> tag, we're at the end of the document.
* We need to reinitialize the processor instance to search for <img> tag.
*/
$p = new \WP_HTML_Tag_Processor( $image_html );