Plugin Directory

Changeset 3432665


Ignore:
Timestamp:
01/05/2026 11:02:44 AM (3 months ago)
Author:
drosendo
Message:

Read changelog for changes

Location:
smart-variations-images/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • smart-variations-images/trunk/includes/class-smart-variations-images.php

    r3383302 r3432665  
    307307            20
    308308        );
     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        );
    309317        add_shortcode( 'svi_wcsc', [$plugin_public, 'render_sc_frontend'] );
    310318        if ( $this->is_option_enabled( 'variation_thumbnails' ) ) {
  • smart-variations-images/trunk/public/class-smart-variations-images-public.php

    r3423813 r3432665  
    15741574
    15751575    /**
     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    /**
    15761609     * Store the current instance reference for template rendering.
    15771610     *
  • smart-variations-images/trunk/public/partials/smart-variations-images-public-display.php

    r3383302 r3432665  
    7474    }
    7575}
     76// Remove 'images' class when using Divi Builder
     77if ($this->options->template === 'Divi' && $this->validate_runningDivi($product)) {
     78    if (($key = array_search('images', $wrapper_classes)) !== false) {
     79        unset($wrapper_classes[$key]);
     80    }
     81}
    7682if (property_exists($this->options, 'custom_class') && !empty(trim($this->options->custom_class))) {
    7783    $wrapper_classes[] = $this->options->custom_class;
  • smart-variations-images/trunk/readme.txt

    r3423813 r3432665  
    44Requires at least: 4.9
    55Tested up to: 6.9
    6 Stable tag: 5.2.22
     6Stable tag: 5.2.23
    77Requires PHP: 7.4
    88License: GPLv2 or later 
     
    129129== Changelog ==
    130130
     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
    131135
    132136= 5.2.22 =
  • smart-variations-images/trunk/svi.php

    r3423813 r3432665  
    1010 * @author            David Rosendo
    1111 * @link              https://www.rosendo.pt
    12  * @since             5.2.22
     12 * @since             5.2.23
    1313 * @license           GPL-2.0+
    1414 * @wordpress-plugin
     
    1717 * Plugin URI:        https://www.smart-variations.com/
    1818 * 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.22
     19 * Version:           5.2.23
    2020 * WC requires at least: 5.0
    21  * WC tested up to:   10.4.3
     21 * WC tested up to:   10.4.4
    2222 * Author:            David Rosendo
    2323 * Author URI:        https://www.rosendo.pt
     
    3434 * Define plugin constants.
    3535 */
    36 define( 'SMART_VARIATIONS_IMAGES_VERSION', '5.2.22' );
     36define( 'SMART_VARIATIONS_IMAGES_VERSION', '5.2.23' );
    3737// Current plugin version.
    3838define( 'WCSVFS_VERSION', '1.0' );
Note: See TracChangeset for help on using the changeset viewer.