Feat/add to cart variations#1743
Closed
KMchaudhary wants to merge 6 commits intofeat/godam-woocommerce-integrationfrom
Closed
Feat/add to cart variations#1743KMchaudhary wants to merge 6 commits intofeat/godam-woocommerce-integrationfrom
KMchaudhary wants to merge 6 commits intofeat/godam-woocommerce-integrationfrom
Conversation
added 5 commits
March 18, 2026 11:27
…ct reels in mobile view, and godam-product-gallery mobile view
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a variation-selection experience for WooCommerce products linked to GoDAM videos, spanning admin (metabox) and frontend (reels modal + sidebar) so variable products can be added to cart with the correct attributes and optional per-video “preselected” defaults.
Changes:
- Add per-video, per-product variation preselection storage (
_rtgodam_product_video_variations) and admin UI to set it. - Add frontend variation selector UIs (reels modal overlay + sidebar inline selector) wired to WooCommerce cart store actions.
- Introduce shared SCSS for the variation selector component and integrate it into the carousel + sidebar styling.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| integrations/woocommerce/templates/sidebar/single-product-details.php | Adds variable-product data attributes (variations/attributes/preselected) to drive sidebar inline selector. |
| integrations/woocommerce/templates/sidebar/multiple-products-list.php | Same as above for additional products list; updates “view product” URL handling. |
| integrations/woocommerce/templates/sidebar/hero-product.php | Adds variable-product payload + preselected attrs to the hero product add-to-cart button. |
| integrations/woocommerce/classes/class-wc-utility.php | Passes video_id from AJAX requests into sidebar templates to enable per-video preselection lookup. |
| integrations/woocommerce/classes/class-wc-product-video-gallery.php | Adds admin-localized product attribute data, renders/saves per-video variation preselects, and exposes preselects to frontend modal markup. |
| integrations/woocommerce/assets/js/single-product-story/wc-video-carousel.js | Implements the reels modal variation selector overlay and variable add-to-cart flow. |
| integrations/woocommerce/assets/js/global-video-popup/sidebar.js | Implements inline sidebar variation selector + improves toast creation/reset; passes video_id for sidebar HTML fetches. |
| integrations/woocommerce/assets/js/admin/wc-product-video-gallery.js | Adds admin “Select variation” modal UI and persists per-video preselected attributes. |
| integrations/woocommerce/assets/css/godam-woo-sidebar.scss | Imports shared selector styles and adds sidebar wrapper open/close animation styles. |
| integrations/woocommerce/assets/css/godam-video-carousel.scss | Imports shared selector styles and adds modal overlay wrapper positioning styles. |
| integrations/woocommerce/assets/css/_variation-selector.scss | New shared component styles for the pill-based variation selector. |
| assets/src/css/_common.scss | Adds admin metabox styles for variation picker button, chips, and modal overlay. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+508
to
+518
| .godam-select-variation-button { | ||
| flex-shrink: 0; | ||
| padding: 2px !important; | ||
| min-width: 24px; | ||
| min-height: 24px; | ||
| display: inline-flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| color: #3c434a; | ||
| border-radius: 4px; | ||
|
|
Comment on lines
+391
to
+468
| // "Add to Cart" confirm button. | ||
| const addBtn = document.createElement( 'button' ); | ||
| addBtn.type = 'button'; | ||
| addBtn.className = 'rtgodam-variation-add-btn'; | ||
| addBtn.textContent = 'Add to Cart'; | ||
| selector.appendChild( addBtn ); | ||
|
|
||
| // Price display area. | ||
| const priceEl = document.createElement( 'span' ); | ||
| priceEl.className = 'rtgodam-variation-price'; | ||
| selector.appendChild( priceEl ); | ||
|
|
||
| // Close button — top-right corner. | ||
| const closeBtn = document.createElement( 'button' ); | ||
| closeBtn.type = 'button'; | ||
| closeBtn.className = 'rtgodam-variation-close-btn'; | ||
| closeBtn.setAttribute( 'aria-label', 'Close variation selector' ); | ||
| closeBtn.innerHTML = '×'; | ||
| closeBtn.addEventListener( 'click', () => { | ||
| wrapper.classList.remove( 'is-open' ); | ||
| } ); | ||
| selector.prepend( closeBtn ); | ||
|
|
||
| wrapper.appendChild( selector ); | ||
|
|
||
| // ---- Pill click toggles ---- | ||
| selector.addEventListener( 'click', ( e ) => { | ||
| const pill = e.target.closest( '.rtgodam-variation-pill' ); | ||
| if ( ! pill ) { | ||
| return; | ||
| } | ||
|
|
||
| // Deselect siblings in the same attribute row. | ||
| const row = pill.closest( '.rtgodam-variation-attr-row' ); | ||
| row.querySelectorAll( '.rtgodam-variation-pill' ).forEach( ( p ) => p.classList.remove( 'is-selected' ) ); | ||
| pill.classList.add( 'is-selected' ); | ||
|
|
||
| // Update price preview. | ||
| const matchedId = findMatchingVariation( selector, attributes, variations ); | ||
| if ( matchedId ) { | ||
| const v = variations.find( ( vr ) => vr.id === matchedId ); | ||
| if ( v && v.price_html ) { | ||
| priceEl.innerHTML = v.price_html; | ||
| } | ||
| addBtn.disabled = false; | ||
| addBtn.classList.remove( 'is-disabled' ); | ||
| } else { | ||
| priceEl.innerHTML = ''; | ||
| addBtn.disabled = true; | ||
| addBtn.classList.add( 'is-disabled' ); | ||
| } | ||
| } ); | ||
|
|
||
| // ---- Add to Cart click ---- | ||
| addBtn.addEventListener( 'click', async () => { | ||
| const matchedId = findMatchingVariation( selector, attributes, variations ); | ||
| if ( ! matchedId ) { | ||
| self.showCartNotice( 'Please select all options', 'error' ); | ||
| return; | ||
| } | ||
|
|
||
| const v = variations.find( ( vr ) => vr.id === matchedId ); | ||
| if ( v && ! v.in_stock ) { | ||
| self.showCartNotice( 'Selected variation is out of stock', 'error' ); | ||
| return; | ||
| } | ||
|
|
||
| const cartStore = dispatch( 'wc/store/cart' ); | ||
| if ( ! cartStore ) { | ||
| self.showCartNotice( 'Cart not available', 'error' ); | ||
| return; | ||
| } | ||
|
|
||
| const originalText = addBtn.textContent; | ||
| addBtn.disabled = true; | ||
| addBtn.classList.add( 'loading' ); | ||
| addBtn.textContent = 'Adding…'; | ||
|
|
Comment on lines
+41
to
+48
| $attr_data = array(); | ||
| foreach ( $product->get_variation_attributes() as $attribute_slug => $attribute_values ) { | ||
| $options = array(); | ||
| foreach ( $attribute_values as $value ) { | ||
| $attr_term = get_term_by( 'slug', $value, $attribute_slug ); | ||
| $options[] = array( | ||
| 'value' => $value, | ||
| 'label' => $attr_term ? $attr_term->name : ucfirst( str_replace( '-', ' ', $value ) ), |
Comment on lines
+106
to
+127
| if ( 'variable' === $item_type ) { | ||
| $item_available_variations = $product->get_available_variations(); | ||
| $item_var_map = array(); | ||
| foreach ( $item_available_variations as $variation ) { | ||
| $item_var_map[] = array( | ||
| 'id' => $variation['variation_id'], | ||
| 'attributes' => $variation['attributes'], | ||
| 'in_stock' => $variation['is_in_stock'], | ||
| 'price_html' => $variation['price_html'], | ||
| ); | ||
| } | ||
| $item_variations_json = wp_json_encode( $item_var_map ); | ||
|
|
||
| $item_attr_data = array(); | ||
| foreach ( $product->get_variation_attributes() as $attribute_slug => $attribute_values ) { | ||
| $options = array(); | ||
| foreach ( $attribute_values as $value ) { | ||
| $attr_term = get_term_by( 'slug', $value, $attribute_slug ); | ||
| $options[] = array( | ||
| 'value' => $value, | ||
| 'label' => $attr_term ? $attr_term->name : ucfirst( str_replace( '-', ' ', $value ) ), | ||
| ); |
… page in new tab on desktop and show variation selector on mobile
🔍 WordPress Plugin Check Report
📊 Report
|
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
missing_composer_json_file | The "/vendor" directory using composer exists, but "composer.json" file is missing. |
📁 readme.txt (2 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
mismatched_plugin_name | Plugin name "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" is different from the name declared in plugin header "GoDAM". |
0 |
trademarked_term | The plugin name includes a restricted term. Your chosen plugin name - "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" - contains the restricted term "wordpress" which cannot be used at all in your plugin name. |
📁 assets/build/integrations/woocommerce/blocks/godam-reel-pops/render.php (11 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
23 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attributes". |
57 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$valid_videos". |
69 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$video_ids". |
71 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$video_id". |
72 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$video_ids". |
76 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$shortcode_atts". |
97 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$shortcode_parts". |
98 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$key". |
98 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$value". |
100 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$shortcode_parts". |
104 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$shortcode". |
📁 integrations/woocommerce/templates/sidebar/hero-product.php (28 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
19 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$product_url". |
20 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$product_name". |
21 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$product_img". |
23 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$product_type". |
24 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$variations_json". |
25 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attributes_json". |
26 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$preselected_json". |
29 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$available_variations". |
30 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$var_map". |
31 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$variation". |
32 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$var_map". |
39 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$variations_json". |
41 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attr_data". |
42 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attribute_slug". |
42 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attribute_values". |
43 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$options". |
44 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$value". |
45 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attr_term". |
46 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$options". |
51 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attr_data". |
57 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attributes_json". |
61 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$video_id_ref". |
62 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$preselected_attrs". |
64 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$video_variations". |
65 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$video_variations". |
67 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$preselected_attrs". |
71 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$preselected_attrs". |
74 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$preselected_json". |
📁 integrations/woocommerce/templates/sidebar/single-product-details.php (43 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
18 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$product_images". |
21 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$main_image_id". |
23 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$main_image_url". |
25 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$product_images". |
30 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$gallery_image_ids". |
31 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$gallery_image_id". |
32 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$gallery_image_url". |
34 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$product_images". |
40 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$product_images". |
43 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$average". |
44 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$rating_count". |
46 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$full_star_svg". |
51 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$empty_star_svg". |
57 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$allowed_svg". |
98 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$index". |
98 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$image_url". |
121 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$i". |
128 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$partial". |
143 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_product_type". |
144 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_variations_json". |
145 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_attributes_json". |
146 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_preselected_json". |
149 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_available_variations". |
150 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_var_map". |
151 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$variation". |
152 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_var_map". |
159 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_variations_json". |
161 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_attr_data". |
162 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attribute_slug". |
162 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attribute_values". |
163 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$options". |
164 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$value". |
165 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attr_term". |
166 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$options". |
171 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_attr_data". |
177 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_attributes_json". |
181 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_video_id_ref". |
182 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_preselected". |
184 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_video_variations". |
185 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_video_variations". |
187 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_preselected". |
191 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_preselected". |
193 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$small_preselected_json". |
📁 integrations/woocommerce/templates/sidebar/multiple-products-list.php (33 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
21 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$product". |
37 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$average". |
38 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$rating_count". |
40 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$full_star_svg". |
45 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$empty_star_svg". |
51 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$allowed_svg". |
81 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$i". |
88 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$partial". |
101 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_type". |
102 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_variations_json". |
103 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_attributes_json". |
104 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_preselected_json". |
107 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_available_variations". |
108 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_var_map". |
109 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$variation". |
110 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_var_map". |
117 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_variations_json". |
119 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_attr_data". |
120 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attribute_slug". |
120 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attribute_values". |
121 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$options". |
122 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$value". |
123 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attr_term". |
124 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$options". |
129 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_attr_data". |
135 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_attributes_json". |
139 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_video_id_ref". |
140 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_preselected". |
142 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_video_variations". |
143 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_video_variations". |
145 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_preselected". |
149 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_preselected". |
151 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$item_preselected_json". |
📁 integrations/woocommerce/blocks/godam-reel-pops/render.php (11 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
23 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attributes". |
57 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$valid_videos". |
69 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$video_ids". |
71 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$video_id". |
72 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$video_ids". |
76 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$shortcode_atts". |
97 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$shortcode_parts". |
98 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$key". |
98 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$value". |
100 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$shortcode_parts". |
104 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$shortcode". |
📁 assets/build/css/main.css (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedStylesScope | This style is being loaded in all contexts. |
📁 assets/src/libs/analytics.min.js (6 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedScriptsScope | This script is being loaded in all frontend contexts. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/2026/03/19/hello-world/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/sample-page/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/demo-attachment-post/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?godam-video=demo-godam-video-post (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
📁 assets/build/js/main.min.js (6 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedScriptsScope | This script is being loaded in all frontend contexts. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/2026/03/19/hello-world/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/sample-page/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/demo-attachment-post/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/?godam-video=demo-godam-video-post (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces extensive styling updates and new components for product variation selection in both admin and frontend contexts. The main focus is on implementing and refining the variation selector UI for WooCommerce product videos, ensuring consistent design and improved usability across admin metaboxes, frontend product cards, and the WooCommerce sidebar. The changes include new shared component styles, modal overlays, and inline selectors, as well as various improvements and fixes to existing styles.
Variation Selector Component Styles (Shared & Frontend):
variation-selectorSCSS module (integrations/woocommerce/assets/css/_variation-selector.scss) for consistent variation selector styling, including pills, attribute rows, buttons, and price display, used across reels and sidebar/popup contexts.godam-video-carousel.scssandgodam-woo-sidebar.scssfor frontend and sidebar variation selection UIs. [1] [2].rtgodam-variation-selector-wrapperfor frontend product cards, enabling a smooth, animated overlay for variation selection..godam-sidebar-variation-selector-wrapperfor inline variation selection in the WooCommerce sidebar, with animated open/close transitions and custom styling.Admin Metabox & Modal Styling Enhancements:
.godam-video-actions-row,.godam-select-variation-button,.godam-variation-chips, and a modal overlay with header, body, and footer components for variation selection..godam-select-variation-buttonstyles for visibility and interaction, both in product card hover states and admin contexts. [1] [2]General Style Improvements & Fixes:
These changes lay the foundation for a cohesive and user-friendly variation selection experience in both admin and customer-facing interfaces.
Ref: https://rtcamp.slack.com/archives/C25QZJ50B/p1773743678646929?thread_ts=1773676566.315589&cid=C25QZJ50B
Screencast
Screen.Recording.2026-03-19.at.4.56.47.PM.mp4
Screen.Recording.2026-03-19.at.5.00.43.PM.mov
Screen.Recording.2026-03-19.at.5.03.21.PM.mp4