Created
June 19, 2026 06:36
-
-
Save plugin-republic/8a164e05cefecbe1c1260176db480d2b to your computer and use it in GitHub Desktop.
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
| <?php | |
| // Filters for WooCommerce Variation Product Gallery plugin | |
| // The outermost gallery container | |
| add_filter( 'apaou_gallery_container', function( $selector ) { | |
| return 'woo-variation-gallery-slider'; | |
| } ); | |
| // The wrapper where the preview layer is inserted | |
| add_filter( 'apaou_layer_parent', function( $selector ) { | |
| return 'wvg-single-gallery-image-container'; | |
| } ); | |
| // The main image selector (for size ratio calculations) | |
| add_filter( 'apaou_gallery_first_image', function( $selector ) { | |
| return '.woo-variation-gallery-slider img.wp-post-image'; | |
| } ); | |
| // Thumbnails — WVG uses divs, not a ul/li structure | |
| add_filter( 'apaou_control_container', function( $selector ) { | |
| return 'woo-variation-gallery-thumbnail-slider'; | |
| } ); | |
| add_filter( 'apaou_control_list', function( $selector ) { | |
| return 'div.wvg-gallery-thumbnail-image'; | |
| } ); | |
| add_filter( 'apaou_control_element', function( $selector ) { | |
| return 'img'; | |
| } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment