Plugin Directory

Changeset 3433244


Ignore:
Timestamp:
01/06/2026 06:00:38 AM (6 weeks ago)
Author:
aslamdoctor
Message:

Update to version 5.0.8 from GitHub

Location:
rearrange-woocommerce-products
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • rearrange-woocommerce-products/tags/5.0.8/includes/Plugin.php

    r3427517 r3433244  
    2424     */
    2525    private $current_category_id = 0;
     26
     27    /**
     28     * Flag to track when plugin is applying sort to main query.
     29     *
     30     * @var bool
     31     */
     32    private $rwpp_applying_main_query_sort = false;
    2633
    2734    /**
     
    558565                $term_id = $term->term_id;
    559566                if ( $term_id ) {
    560                     // Store category ID for use in filter callbacks
     567                    // Store category ID for use in filter callbacks.
    561568                    $this->current_category_id = $term_id;
    562569
    563                     // Add filters for table join and ordering
     570                    // Set flag to indicate we're applying sort to main query.
     571                    $this->rwpp_applying_main_query_sort = true;
     572
     573                    // Add filters for table join and ordering.
    564574                    add_filter( 'posts_join', [ $this, 'join_product_order_table' ], 10, 2 );
    565575                    add_filter( 'posts_orderby', [ $this, 'orderby_product_order' ], 10, 2 );
     576
     577                    // Remove filters after posts are selected to prevent affecting secondary queries.
     578                    add_action( 'posts_selection', [ $this, 'remove_sorting_filters' ] );
    566579                }
    567580            }
     581        }
     582    }
     583
     584    /**
     585     * Remove sorting filters after main query posts are selected.
     586     *
     587     * This prevents the plugin's sorting from affecting secondary queries
     588     * like widgets, shortcodes, or custom product blocks.
     589     *
     590     * @return void
     591     */
     592    public function remove_sorting_filters() {
     593        // Only remove if we actually added the filters.
     594        if ( isset( $this->rwpp_applying_main_query_sort ) && $this->rwpp_applying_main_query_sort ) {
     595            remove_filter( 'posts_join', [ $this, 'join_product_order_table' ], 10 );
     596            remove_filter( 'posts_orderby', [ $this, 'orderby_product_order' ], 10 );
     597            remove_action( 'posts_selection', [ $this, 'remove_sorting_filters' ] );
     598
     599            // Reset the flag.
     600            $this->rwpp_applying_main_query_sort = false;
    568601        }
    569602    }
  • rearrange-woocommerce-products/tags/5.0.8/readme.txt

    r3427517 r3433244  
    88License: GPL-3.0-or-later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
    10 Stable Tag: 5.0.7
     10Stable Tag: 5.0.8
    1111
    1212Boost WooCommerce sales with the Rearrange Products for WooCommerce plugin. Easily reorder products with a simple drag-and-drop tool!
     
    1616Take Full Control of Your WooCommerce Product Sort-Order
    1717
    18 <strong>Do you want to decide which products appear first in your WooCommerce shop?</strong> 
     18<strong>Do you want to decide which products appear first in your WooCommerce shop?</strong>
    1919Rearrange Products for WooCommerce gives you full control over product ordering so you can highlight your best-selling, featured, or new products exactly where you want them.
    2020
     
    121121
    122122== ChangeLog ==
     123
     124= Version 5.0.8 =
     125* Fixed: Plugin sorting no longer affects secondary product queries (widgets, shortcodes, custom blocks) on category pages
     126* Fixed: Footer product blocks now display correctly with their configured sorting on category archives
     127* Improved: Sorting filters are now properly removed after main query execution
    123128
    124129= Version 5.0.7 =
  • rearrange-woocommerce-products/tags/5.0.8/rearrange-woocommerce-products.php

    r3427517 r3433244  
    44 * Plugin URI: https://wordpress.org/plugins/rearrange-woocommerce-products/
    55 * Description: A WordPress plugin to rearrange WooCommerce products listed on the Shop page with drag-and-drop functionality.
    6  * Version: 5.0.7
     6 * Version: 5.0.8
    77 * Requires at least: 6.6
    88 * Requires PHP: 7.4.0
  • rearrange-woocommerce-products/tags/5.0.8/vendor/composer/installed.php

    r3427517 r3433244  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => 'cf6670cbba4cbb31e7d89eddb4f572dea79aec62',
     6        'reference' => '277eead22b18f028bc9a7fb38b0dd013b258e09e',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => 'cf6670cbba4cbb31e7d89eddb4f572dea79aec62',
     16            'reference' => '277eead22b18f028bc9a7fb38b0dd013b258e09e',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
  • rearrange-woocommerce-products/trunk/includes/Plugin.php

    r3427517 r3433244  
    2424     */
    2525    private $current_category_id = 0;
     26
     27    /**
     28     * Flag to track when plugin is applying sort to main query.
     29     *
     30     * @var bool
     31     */
     32    private $rwpp_applying_main_query_sort = false;
    2633
    2734    /**
     
    558565                $term_id = $term->term_id;
    559566                if ( $term_id ) {
    560                     // Store category ID for use in filter callbacks
     567                    // Store category ID for use in filter callbacks.
    561568                    $this->current_category_id = $term_id;
    562569
    563                     // Add filters for table join and ordering
     570                    // Set flag to indicate we're applying sort to main query.
     571                    $this->rwpp_applying_main_query_sort = true;
     572
     573                    // Add filters for table join and ordering.
    564574                    add_filter( 'posts_join', [ $this, 'join_product_order_table' ], 10, 2 );
    565575                    add_filter( 'posts_orderby', [ $this, 'orderby_product_order' ], 10, 2 );
     576
     577                    // Remove filters after posts are selected to prevent affecting secondary queries.
     578                    add_action( 'posts_selection', [ $this, 'remove_sorting_filters' ] );
    566579                }
    567580            }
     581        }
     582    }
     583
     584    /**
     585     * Remove sorting filters after main query posts are selected.
     586     *
     587     * This prevents the plugin's sorting from affecting secondary queries
     588     * like widgets, shortcodes, or custom product blocks.
     589     *
     590     * @return void
     591     */
     592    public function remove_sorting_filters() {
     593        // Only remove if we actually added the filters.
     594        if ( isset( $this->rwpp_applying_main_query_sort ) && $this->rwpp_applying_main_query_sort ) {
     595            remove_filter( 'posts_join', [ $this, 'join_product_order_table' ], 10 );
     596            remove_filter( 'posts_orderby', [ $this, 'orderby_product_order' ], 10 );
     597            remove_action( 'posts_selection', [ $this, 'remove_sorting_filters' ] );
     598
     599            // Reset the flag.
     600            $this->rwpp_applying_main_query_sort = false;
    568601        }
    569602    }
  • rearrange-woocommerce-products/trunk/readme.txt

    r3427517 r3433244  
    88License: GPL-3.0-or-later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
    10 Stable Tag: 5.0.7
     10Stable Tag: 5.0.8
    1111
    1212Boost WooCommerce sales with the Rearrange Products for WooCommerce plugin. Easily reorder products with a simple drag-and-drop tool!
     
    1616Take Full Control of Your WooCommerce Product Sort-Order
    1717
    18 <strong>Do you want to decide which products appear first in your WooCommerce shop?</strong> 
     18<strong>Do you want to decide which products appear first in your WooCommerce shop?</strong>
    1919Rearrange Products for WooCommerce gives you full control over product ordering so you can highlight your best-selling, featured, or new products exactly where you want them.
    2020
     
    121121
    122122== ChangeLog ==
     123
     124= Version 5.0.8 =
     125* Fixed: Plugin sorting no longer affects secondary product queries (widgets, shortcodes, custom blocks) on category pages
     126* Fixed: Footer product blocks now display correctly with their configured sorting on category archives
     127* Improved: Sorting filters are now properly removed after main query execution
    123128
    124129= Version 5.0.7 =
  • rearrange-woocommerce-products/trunk/rearrange-woocommerce-products.php

    r3427517 r3433244  
    44 * Plugin URI: https://wordpress.org/plugins/rearrange-woocommerce-products/
    55 * Description: A WordPress plugin to rearrange WooCommerce products listed on the Shop page with drag-and-drop functionality.
    6  * Version: 5.0.7
     6 * Version: 5.0.8
    77 * Requires at least: 6.6
    88 * Requires PHP: 7.4.0
  • rearrange-woocommerce-products/trunk/vendor/composer/installed.php

    r3427517 r3433244  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => 'cf6670cbba4cbb31e7d89eddb4f572dea79aec62',
     6        'reference' => '277eead22b18f028bc9a7fb38b0dd013b258e09e',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => 'cf6670cbba4cbb31e7d89eddb4f572dea79aec62',
     16            'reference' => '277eead22b18f028bc9a7fb38b0dd013b258e09e',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.