Changeset 3432665
- Timestamp:
- 01/05/2026 11:02:44 AM (3 months ago)
- Location:
- smart-variations-images/trunk
- Files:
-
- 5 edited
-
includes/class-smart-variations-images.php (modified) (1 diff)
-
public/class-smart-variations-images-public.php (modified) (1 diff)
-
public/partials/smart-variations-images-public-display.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
svi.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
smart-variations-images/trunk/includes/class-smart-variations-images.php
r3383302 r3432665 307 307 20 308 308 ); 309 // Divi Builder compatibility - replace Divi's WooCommerce Images module with SVI 310 $this->loader->add_filter( 311 'et_module_shortcode_output', 312 $plugin_public, 313 'replace_divi_module_output', 314 10, 315 3 316 ); 309 317 add_shortcode( 'svi_wcsc', [$plugin_public, 'render_sc_frontend'] ); 310 318 if ( $this->is_option_enabled( 'variation_thumbnails' ) ) { -
smart-variations-images/trunk/public/class-smart-variations-images-public.php
r3423813 r3432665 1574 1574 1575 1575 /** 1576 * Replace Divi's WooCommerce Images module output with SVI gallery. 1577 * 1578 * @since 5.2.22 1579 * @param mixed $output The HTML output of the module (string on frontend, array in admin). 1580 * @param string $render_slug The slug/shortcode of module. 1581 * @param object $element The module object. 1582 * @return mixed The modified or original output. 1583 */ 1584 public function replace_divi_module_output( $output, string $render_slug, $element ) { 1585 global $product; 1586 // Only replace et_pb_wc_images module, and not in the visual builder 1587 if ( $render_slug !== 'et_pb_wc_images' || isset( $_REQUEST['et_fb'] ) ) { 1588 return $output; 1589 } 1590 // Return early if output is not a string (e.g., in admin/builder context) 1591 if ( !is_string( $output ) ) { 1592 return $output; 1593 } 1594 if ( !$product instanceof WC_Product ) { 1595 return $output; 1596 } 1597 // Check if SVI should run for this product 1598 $run = $this->validate_run( $product ); 1599 if ( !$run ) { 1600 return $output; 1601 } 1602 // Render SVI gallery 1603 ob_start(); 1604 include plugin_dir_path( dirname( __FILE__ ) ) . 'public/partials/smart-variations-images-public-display.php'; 1605 return ob_get_clean(); 1606 } 1607 1608 /** 1576 1609 * Store the current instance reference for template rendering. 1577 1610 * -
smart-variations-images/trunk/public/partials/smart-variations-images-public-display.php
r3383302 r3432665 74 74 } 75 75 } 76 // Remove 'images' class when using Divi Builder 77 if ($this->options->template === 'Divi' && $this->validate_runningDivi($product)) { 78 if (($key = array_search('images', $wrapper_classes)) !== false) { 79 unset($wrapper_classes[$key]); 80 } 81 } 76 82 if (property_exists($this->options, 'custom_class') && !empty(trim($this->options->custom_class))) { 77 83 $wrapper_classes[] = $this->options->custom_class; -
smart-variations-images/trunk/readme.txt
r3423813 r3432665 4 4 Requires at least: 4.9 5 5 Tested up to: 6.9 6 Stable tag: 5.2.2 26 Stable tag: 5.2.23 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 129 129 == Changelog == 130 130 131 = 5.2.23 = 132 * Added: Divi Builder compatibility - SVI gallery now replaces Divi's WooCommerce Images module 133 * Fix: CSS class conflicts when using Divi theme - conditionally removes 'images' class to prevent styling conflicts 134 * Compatibility: 'Showcase Images under Variations' option now fully supported with Divi Builder 131 135 132 136 = 5.2.22 = -
smart-variations-images/trunk/svi.php
r3423813 r3432665 10 10 * @author David Rosendo 11 11 * @link https://www.rosendo.pt 12 * @since 5.2.2 212 * @since 5.2.23 13 13 * @license GPL-2.0+ 14 14 * @wordpress-plugin … … 17 17 * Plugin URI: https://www.smart-variations.com/ 18 18 * Description: Enhance your WooCommerce store by adding multiple images to the product gallery and using them as variable product variations images effortlessly. 19 * Version: 5.2.2 219 * Version: 5.2.23 20 20 * WC requires at least: 5.0 21 * WC tested up to: 10.4. 321 * WC tested up to: 10.4.4 22 22 * Author: David Rosendo 23 23 * Author URI: https://www.rosendo.pt … … 34 34 * Define plugin constants. 35 35 */ 36 define( 'SMART_VARIATIONS_IMAGES_VERSION', '5.2.2 2' );36 define( 'SMART_VARIATIONS_IMAGES_VERSION', '5.2.23' ); 37 37 // Current plugin version. 38 38 define( 'WCSVFS_VERSION', '1.0' );
Note: See TracChangeset
for help on using the changeset viewer.