Plugin Directory

Changeset 3225791


Ignore:
Timestamp:
01/20/2025 07:07:41 PM (15 months ago)
Author:
prodigycommerce
Message:

tagging version 3.1.2

Location:
prodigy-commerce
Files:
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • prodigy-commerce/tags/3.1.2/README.txt

    r3208664 r3225791  
    44Requires at least: 4.6
    55Tested up to: 6.7
    6 Stable tag: 3.1.1
     6Stable tag: 3.1.2
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    183183== Changelog ==
    184184
     185= 3.1.2 - 2025-01-20 =
     186* Fix compatibility of new version of elementor plugin
     187
    185188= 3.1.1 - 2024-12-13 =
    186189* Fix Personalization bug
  • prodigy-commerce/tags/3.1.2/includes/class-prodigy-cart.php

    r3203195 r3225791  
    296296        }
    297297
     298        if ( isset( $item['personalization'] ) ) {
     299            foreach ( $item['personalization'] as $key => $value ) {
     300                $item['personalization'][ $key ]['label'] = sanitize_text_field( wp_unslash( $value['label'] ) );
     301                $item['personalization'][ $key ]['value'] = sanitize_text_field( wp_unslash( $value['value'] ) );
     302            }
     303        }
     304
    298305        if ( isset( $item['is_bulk'] ) && $item['is_bulk'] !== 'false' ) {
    299306            $request = array();
     
    313320
    314321                    if ( isset( $item['personalization'][0] ) && $this->is_personalization_filled( $item['personalization'] ) ) {
    315                         $label = wp_unslash( $item['personalization'][0]['label'] ?? '' );
    316322                        $request['line_items'][ $key ]['personalization_id']                 = $item['personalization'][0]['personalization_id'] ?? 0;
    317323                        $request['line_items'][ $key ]['personalization_fields']             = $item['personalization'] ?? '';
    318                         $request['line_items'][ $key ]['personalization_fields'][0]['label'] = $label;
     324                        $request['line_items'][ $key ]['personalization_fields'][0]['label'] = $item['personalization'][0]['label'] ?? '';
    319325                    }
    320326                }
     
    334340
    335341            if ( isset( $item['personalization'][0] ) && $this->is_personalization_filled( $item['personalization'] ) ) {
    336                 $label = wp_unslash( $item['personalization'][0]['label'] ?? '' );
    337342                $request['line_items'][0]['personalization_id']                 = $item['personalization'][0]['personalization_id'] ?? 0;
    338343                $request['line_items'][0]['personalization_fields']             = $item['personalization'] ?? '';
    339                 $request['line_items'][0]['personalization_fields'][0]['label'] = $label;
     344                $request['line_items'][0]['personalization_fields'][0]['label'] = $item['personalization'][0]['label'] ?? '';
    340345            }
    341346        }
  • prodigy-commerce/tags/3.1.2/includes/frontend/mappers/class-prodigy-products-data-mapper.php

    r3174432 r3225791  
    150150                $products_data[ $key ]['id']                    = (int) $product['id'];
    151151                $products_data[ $key ]['name']                  = $product['attributes']['name'];
    152                 $products_data[ $key ]['regular_price']         = $product['attributes']['price'];
    153                 $products_data[ $key ]['sale_price']            = $product['attributes']['sale-price'];
     152                $products_data[ $key ]['price']                 = $product['attributes']['price'];
     153                $products_data[ $key ]['sale-price']            = $product['attributes']['sale-price'];
    154154                $products_data[ $key ]['versions-image-url']    = $product['attributes']['versions-image-url'] ?? array();
    155155                $products_data[ $key ]['rating']                = $product['attributes']['rating'];
     
    159159                $products_data[ $key ]['logo']                  = $product['attributes']['logo'] ?? array();
    160160                $products_data[ $key ]['image-cropping-params'] = $product['attributes']['image-cropping-params'] ?? array();
     161                $products_data[ $key ]['display-price-range']   = $product['attributes']['display-price-range'];
    161162                if ( isset( $local_product->post_id ) ) {
    162163                    $products_data[ $key ]['local_url'] = esc_url( get_permalink( $local_product->post_id ) );
     
    167168            $image         = 'https://prodigycommerce-public-files.s3.us-east-2.amazonaws.com/wordpress/default-category.jpg';
    168169            $products_data = array(
    169                 'id'            => 0,
    170                 'name'          => 'Title product',
    171                 'regular_price' => wp_rand( 1, 10 ),
    172                 'sale_price'    => wp_rand( 1, 10 ),
    173                 'rating'        => wp_rand( 1, 5 ),
    174                 'img_url'       => array(
     170                'id'         => 0,
     171                'name'       => 'Title product',
     172                'price'      => wp_rand( 1, 10 ),
     173                'sale-price' => wp_rand( 1, 10 ),
     174                'rating'     => wp_rand( 1, 5 ),
     175                'img_url'    => array(
    175176                    'catalog'           => $image,
    176177                    'catalog_retina'    => $image,
     
    183184                    'cropped'           => $image,
    184185                ),
    185                 'category'      => 'Category',
     186                'category'   => 'Category',
    186187            );
    187188
  • prodigy-commerce/tags/3.1.2/includes/support/addons/elementor/classes/prodigy-custom-source.php

    r3174432 r3225791  
    8888     * @return array
    8989     */
    90     private function prepare_template( array $template_data ): array {
     90    public function prepare_template( array $template_data ): array {
    9191        $favorite_templates = $this->get_user_meta( 'favorites' );
    9292        // BC: Support legacy APIs that don't have access tiers.
  • prodigy-commerce/tags/3.1.2/prodigy-commerce.php

    r3208664 r3225791  
    55 * Plugin URI:        https://prodigycommerce.com
    66 * Description:       Provides a comprehensive set of tools to build unparalleled eCommerce experiences on WordPress.
    7  * Version:           3.1.1
     7 * Version:           3.1.2
    88 * Author:            Prodigy Commerce
    99 * License:           GPL-2.0+
     
    1717use Prodigy\Includes\Prodigy_Deactivator;
    1818
    19 const PRODIGY_VERSION = '3.1.1';
     19const PRODIGY_VERSION = '3.1.2';
    2020
    2121if ( file_exists( plugin_dir_path( __FILE__ ) . 'env.ini' ) ) {
  • prodigy-commerce/tags/3.1.2/templates/partials/shortcode/products.php

    r3203195 r3225791  
    5151                            </div>
    5252                        <?php endif; ?>
     53
    5354                        <?php if ( Prodigy_Options::get_redemption_store_status() ) : ?>
    5455                            <div class="d-flex flex-wrap">
    55                                 <?php if ( ! empty( $product['sale_price'] ) ) : ?>
     56                                <?php if ( $product['tiered-price'] ) : ?>
     57                                    <?php if ( isset( $product['price-range']['min_price'], $product['price-range']['max_price'] ) ) : ?>
     58                                        <?php if ( $product['price-range']['min_price'] === $product['price-range']['max_price'] ) : ?>
     59                                            <div class="prodigy-product-list__item-price">
     60                                                <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     61                                            </div>
     62                                        <?php else : ?>
     63                                            <div class="prodigy-product-list__item-price">
     64                                                <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     65                                            </div>
     66                                            <span class="prodigy-product-list__item-price">&nbsp;-&nbsp;</span>
     67                                            <div class="prodigy-product-list__item-price">
     68                                                <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['max_price'] ) ); ?>
     69                                            </div>
     70                                        <?php endif; ?>
     71                                    <?php endif; ?>
     72                                    <?php
     73                                elseif (
     74                                    isset( $product['price-range']['min_price'] ) &&
     75                                    $product['display-price-range'] &&
     76                                    $product['price-range']['min_price'] === $product['price-range']['max_price']
     77                                ) :
     78                                    ?>
     79
     80                                    <?php if ( $product['sale-price'] !== null ) : ?>
    5681                                    <div class="prodigy-product-list__item-price prodigy-product-list__item-price--sale">
    57                                         <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['regular_price'] ) ); ?>
     82                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
    5883                                    </div>
    5984                                    <div class="prodigy-product-list__item-price">
    60                                         <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale_price'] ) ); ?>
     85                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale-price'] ) ); ?>
    6186                                    </div>
    6287                                <?php else : ?>
    6388                                    <div class="prodigy-product-list__item-price">
    64                                         <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['regular_price'] ) ); ?>
     89                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
    6590                                    </div>
     91                                <?php endif; ?>
     92                                    <?php
     93                                elseif (
     94                                    isset( $product['price-range']['min_price'] ) &&
     95                                    ! $product['display-price-range']
     96                                ) :
     97                                    ?>
     98                                    <?php if ( $product['sale-price'] !== null ) : ?>
     99                                    <div class="prodigy-product-list__item-price prodigy-product-list__item-price--sale">
     100                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     101                                    </div>
     102                                    <div class="prodigy-product-list__item-price">
     103                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale-price'] ) ); ?>
     104                                    </div>
     105                                <?php else : ?>
     106                                    <div class="prodigy-product-list__item-price">
     107                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     108                                    </div>
     109                                <?php endif; ?>
     110                                <?php elseif ( ( $product['price-range']['min_price'] === $product['price-range']['max_price'] ) ) : ?>
     111                                    <?php if ( $product['sale-price'] !== null ) : ?>
     112                                        <div class="prodigy-product-list__item-price prodigy-product-list__item-price--sale">
     113                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     114                                        </div>
     115                                        <div class="prodigy-product-list__item-price">
     116                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale-price'] ) ); ?>
     117                                        </div>
     118                                    <?php else : ?>
     119                                        <div class="prodigy-product-list__item-price">
     120                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     121                                        </div>
     122                                    <?php endif; ?>
     123                                <?php else : ?>
     124                                    <?php if ( $product['display-price-range'] ) : ?>
     125                                        <div class="prodigy-product-list__item-price">
     126                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     127                                        </div>
     128                                        <span class="prodigy-product-list__item-price">&nbsp;-&nbsp;</span>
     129                                        <div class="prodigy-product-list__item-price">
     130                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['max_price'] ) ); ?>
     131                                        </div>
     132                                    <?php else : ?>
     133                                        <div class="prodigy-product-list__item-price">
     134                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     135                                        </div>
     136                                    <?php endif; ?>
    66137                                <?php endif; ?>
    67138                            </div>
  • prodigy-commerce/tags/3.1.2/templates/partials/shortcode/products_grid.php

    r3205957 r3225791  
    4747                    <?php if ( Prodigy_Options::get_redemption_store_status() ) : ?>
    4848                        <div class="d-flex flex-wrap">
    49                             <?php if ( isset( $product['tiered-price'], $product['price'] ) && $product['tiered-price'] && $product['price'] == 0.0 ) : ?>
     49                            <?php if ( $product['tiered-price'] ) : ?>
    5050                                <?php if ( isset( $product['price-range']['min_price'], $product['price-range']['max_price'] ) ) : ?>
    5151                                    <?php if ( $product['price-range']['min_price'] === $product['price-range']['max_price'] ) : ?>
    5252                                        <div class="prodigy-product-list__item-price">
    53                                             <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     53                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
    5454                                        </div>
    5555                                    <?php else : ?>
    5656                                        <div class="prodigy-product-list__item-price">
    57                                             <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     57                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
    5858                                        </div>
    5959                                        <span class="prodigy-product-list__item-price">&nbsp;-&nbsp;</span>
    6060                                        <div class="prodigy-product-list__item-price">
    61                                             <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['max_price'] ) ); ?>
     61                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['max_price'] ) ); ?>
    6262                                        </div>
    6363                                    <?php endif; ?>
    6464                                <?php endif; ?>
     65                                <?php
     66                            elseif (
     67                                isset( $product['price-range']['min_price'] ) &&
     68                                $product['display-price-range'] &&
     69                                $product['price-range']['min_price'] === $product['price-range']['max_price']
     70                            ) :
     71                                ?>
    6572
    66                             <?php elseif ( ! empty( $product['sale_price'] ) ) : ?>
    67                                 <span class="prodigy-product-list__item-price prodigy-product-list__item-price--sale">
    68                                     <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['regular_price'] ) ); ?>
    69                                 </span>
    70                                 <span class="prodigy-product-list__item-price">
    71                                     <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale_price'] ) ); ?>
    72                                 </span>
     73                                <?php if ( $product['sale-price'] !== null ) : ?>
     74                                <div class="prodigy-product-list__item-price prodigy-product-list__item-price--sale">
     75                                    <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     76                                </div>
     77                                <div class="prodigy-product-list__item-price">
     78                                    <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale-price'] ) ); ?>
     79                                </div>
    7380                            <?php else : ?>
    74                                 <span class="prodigy-product-list__item-price">
    75                                     <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['regular_price'] ) ); ?>
    76                                 </span>
     81                                <div class="prodigy-product-list__item-price">
     82                                    <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     83                                </div>
     84                            <?php endif; ?>
     85                                <?php
     86                            elseif (
     87                                isset( $product['price-range']['min_price'] ) &&
     88                                ! $product['display-price-range']
     89                            ) :
     90                                ?>
     91                                <?php if ( $product['sale-price'] !== null ) : ?>
     92                                <div class="prodigy-product-list__item-price prodigy-product-list__item-price--sale">
     93                                    <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     94                                </div>
     95                                <div class="prodigy-product-list__item-price">
     96                                    <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale-price'] ) ); ?>
     97                                </div>
     98                            <?php else : ?>
     99                                <div class="prodigy-product-list__item-price">
     100                                    <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     101                                </div>
     102                            <?php endif; ?>
     103                            <?php elseif ( ( $product['price-range']['min_price'] === $product['price-range']['max_price'] ) ) : ?>
     104                                <?php if ( $product['sale-price'] !== null ) : ?>
     105                                    <div class="prodigy-product-list__item-price prodigy-product-list__item-price--sale">
     106                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     107                                    </div>
     108                                    <div class="prodigy-product-list__item-price">
     109                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale-price'] ) ); ?>
     110                                    </div>
     111                                <?php else : ?>
     112                                    <div class="prodigy-product-list__item-price">
     113                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     114                                    </div>
     115                                <?php endif; ?>
     116                            <?php else : ?>
     117                                <?php if ( $product['display-price-range'] ) : ?>
     118                                    <div class="prodigy-product-list__item-price">
     119                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     120                                    </div>
     121                                    <span class="prodigy-product-list__item-price">&nbsp;-&nbsp;</span>
     122                                    <div class="prodigy-product-list__item-price">
     123                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['max_price'] ) ); ?>
     124                                    </div>
     125                                <?php else : ?>
     126                                    <div class="prodigy-product-list__item-price">
     127                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     128                                    </div>
     129                                <?php endif; ?>
    77130                            <?php endif; ?>
    78131                        </div>
  • prodigy-commerce/trunk/README.txt

    r3208664 r3225791  
    44Requires at least: 4.6
    55Tested up to: 6.7
    6 Stable tag: 3.1.1
     6Stable tag: 3.1.2
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    183183== Changelog ==
    184184
     185= 3.1.2 - 2025-01-20 =
     186* Fix compatibility of new version of elementor plugin
     187
    185188= 3.1.1 - 2024-12-13 =
    186189* Fix Personalization bug
  • prodigy-commerce/trunk/includes/class-prodigy-cart.php

    r3203195 r3225791  
    296296        }
    297297
     298        if ( isset( $item['personalization'] ) ) {
     299            foreach ( $item['personalization'] as $key => $value ) {
     300                $item['personalization'][ $key ]['label'] = sanitize_text_field( wp_unslash( $value['label'] ) );
     301                $item['personalization'][ $key ]['value'] = sanitize_text_field( wp_unslash( $value['value'] ) );
     302            }
     303        }
     304
    298305        if ( isset( $item['is_bulk'] ) && $item['is_bulk'] !== 'false' ) {
    299306            $request = array();
     
    313320
    314321                    if ( isset( $item['personalization'][0] ) && $this->is_personalization_filled( $item['personalization'] ) ) {
    315                         $label = wp_unslash( $item['personalization'][0]['label'] ?? '' );
    316322                        $request['line_items'][ $key ]['personalization_id']                 = $item['personalization'][0]['personalization_id'] ?? 0;
    317323                        $request['line_items'][ $key ]['personalization_fields']             = $item['personalization'] ?? '';
    318                         $request['line_items'][ $key ]['personalization_fields'][0]['label'] = $label;
     324                        $request['line_items'][ $key ]['personalization_fields'][0]['label'] = $item['personalization'][0]['label'] ?? '';
    319325                    }
    320326                }
     
    334340
    335341            if ( isset( $item['personalization'][0] ) && $this->is_personalization_filled( $item['personalization'] ) ) {
    336                 $label = wp_unslash( $item['personalization'][0]['label'] ?? '' );
    337342                $request['line_items'][0]['personalization_id']                 = $item['personalization'][0]['personalization_id'] ?? 0;
    338343                $request['line_items'][0]['personalization_fields']             = $item['personalization'] ?? '';
    339                 $request['line_items'][0]['personalization_fields'][0]['label'] = $label;
     344                $request['line_items'][0]['personalization_fields'][0]['label'] = $item['personalization'][0]['label'] ?? '';
    340345            }
    341346        }
  • prodigy-commerce/trunk/includes/frontend/mappers/class-prodigy-products-data-mapper.php

    r3174432 r3225791  
    150150                $products_data[ $key ]['id']                    = (int) $product['id'];
    151151                $products_data[ $key ]['name']                  = $product['attributes']['name'];
    152                 $products_data[ $key ]['regular_price']         = $product['attributes']['price'];
    153                 $products_data[ $key ]['sale_price']            = $product['attributes']['sale-price'];
     152                $products_data[ $key ]['price']                 = $product['attributes']['price'];
     153                $products_data[ $key ]['sale-price']            = $product['attributes']['sale-price'];
    154154                $products_data[ $key ]['versions-image-url']    = $product['attributes']['versions-image-url'] ?? array();
    155155                $products_data[ $key ]['rating']                = $product['attributes']['rating'];
     
    159159                $products_data[ $key ]['logo']                  = $product['attributes']['logo'] ?? array();
    160160                $products_data[ $key ]['image-cropping-params'] = $product['attributes']['image-cropping-params'] ?? array();
     161                $products_data[ $key ]['display-price-range']   = $product['attributes']['display-price-range'];
    161162                if ( isset( $local_product->post_id ) ) {
    162163                    $products_data[ $key ]['local_url'] = esc_url( get_permalink( $local_product->post_id ) );
     
    167168            $image         = 'https://prodigycommerce-public-files.s3.us-east-2.amazonaws.com/wordpress/default-category.jpg';
    168169            $products_data = array(
    169                 'id'            => 0,
    170                 'name'          => 'Title product',
    171                 'regular_price' => wp_rand( 1, 10 ),
    172                 'sale_price'    => wp_rand( 1, 10 ),
    173                 'rating'        => wp_rand( 1, 5 ),
    174                 'img_url'       => array(
     170                'id'         => 0,
     171                'name'       => 'Title product',
     172                'price'      => wp_rand( 1, 10 ),
     173                'sale-price' => wp_rand( 1, 10 ),
     174                'rating'     => wp_rand( 1, 5 ),
     175                'img_url'    => array(
    175176                    'catalog'           => $image,
    176177                    'catalog_retina'    => $image,
     
    183184                    'cropped'           => $image,
    184185                ),
    185                 'category'      => 'Category',
     186                'category'   => 'Category',
    186187            );
    187188
  • prodigy-commerce/trunk/includes/support/addons/elementor/classes/prodigy-custom-source.php

    r3174432 r3225791  
    8888     * @return array
    8989     */
    90     private function prepare_template( array $template_data ): array {
     90    public function prepare_template( array $template_data ): array {
    9191        $favorite_templates = $this->get_user_meta( 'favorites' );
    9292        // BC: Support legacy APIs that don't have access tiers.
  • prodigy-commerce/trunk/prodigy-commerce.php

    r3208664 r3225791  
    55 * Plugin URI:        https://prodigycommerce.com
    66 * Description:       Provides a comprehensive set of tools to build unparalleled eCommerce experiences on WordPress.
    7  * Version:           3.1.1
     7 * Version:           3.1.2
    88 * Author:            Prodigy Commerce
    99 * License:           GPL-2.0+
     
    1717use Prodigy\Includes\Prodigy_Deactivator;
    1818
    19 const PRODIGY_VERSION = '3.1.1';
     19const PRODIGY_VERSION = '3.1.2';
    2020
    2121if ( file_exists( plugin_dir_path( __FILE__ ) . 'env.ini' ) ) {
  • prodigy-commerce/trunk/templates/partials/shortcode/products.php

    r3203195 r3225791  
    5151                            </div>
    5252                        <?php endif; ?>
     53
    5354                        <?php if ( Prodigy_Options::get_redemption_store_status() ) : ?>
    5455                            <div class="d-flex flex-wrap">
    55                                 <?php if ( ! empty( $product['sale_price'] ) ) : ?>
     56                                <?php if ( $product['tiered-price'] ) : ?>
     57                                    <?php if ( isset( $product['price-range']['min_price'], $product['price-range']['max_price'] ) ) : ?>
     58                                        <?php if ( $product['price-range']['min_price'] === $product['price-range']['max_price'] ) : ?>
     59                                            <div class="prodigy-product-list__item-price">
     60                                                <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     61                                            </div>
     62                                        <?php else : ?>
     63                                            <div class="prodigy-product-list__item-price">
     64                                                <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     65                                            </div>
     66                                            <span class="prodigy-product-list__item-price">&nbsp;-&nbsp;</span>
     67                                            <div class="prodigy-product-list__item-price">
     68                                                <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['max_price'] ) ); ?>
     69                                            </div>
     70                                        <?php endif; ?>
     71                                    <?php endif; ?>
     72                                    <?php
     73                                elseif (
     74                                    isset( $product['price-range']['min_price'] ) &&
     75                                    $product['display-price-range'] &&
     76                                    $product['price-range']['min_price'] === $product['price-range']['max_price']
     77                                ) :
     78                                    ?>
     79
     80                                    <?php if ( $product['sale-price'] !== null ) : ?>
    5681                                    <div class="prodigy-product-list__item-price prodigy-product-list__item-price--sale">
    57                                         <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['regular_price'] ) ); ?>
     82                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
    5883                                    </div>
    5984                                    <div class="prodigy-product-list__item-price">
    60                                         <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale_price'] ) ); ?>
     85                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale-price'] ) ); ?>
    6186                                    </div>
    6287                                <?php else : ?>
    6388                                    <div class="prodigy-product-list__item-price">
    64                                         <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['regular_price'] ) ); ?>
     89                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
    6590                                    </div>
     91                                <?php endif; ?>
     92                                    <?php
     93                                elseif (
     94                                    isset( $product['price-range']['min_price'] ) &&
     95                                    ! $product['display-price-range']
     96                                ) :
     97                                    ?>
     98                                    <?php if ( $product['sale-price'] !== null ) : ?>
     99                                    <div class="prodigy-product-list__item-price prodigy-product-list__item-price--sale">
     100                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     101                                    </div>
     102                                    <div class="prodigy-product-list__item-price">
     103                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale-price'] ) ); ?>
     104                                    </div>
     105                                <?php else : ?>
     106                                    <div class="prodigy-product-list__item-price">
     107                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     108                                    </div>
     109                                <?php endif; ?>
     110                                <?php elseif ( ( $product['price-range']['min_price'] === $product['price-range']['max_price'] ) ) : ?>
     111                                    <?php if ( $product['sale-price'] !== null ) : ?>
     112                                        <div class="prodigy-product-list__item-price prodigy-product-list__item-price--sale">
     113                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     114                                        </div>
     115                                        <div class="prodigy-product-list__item-price">
     116                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale-price'] ) ); ?>
     117                                        </div>
     118                                    <?php else : ?>
     119                                        <div class="prodigy-product-list__item-price">
     120                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     121                                        </div>
     122                                    <?php endif; ?>
     123                                <?php else : ?>
     124                                    <?php if ( $product['display-price-range'] ) : ?>
     125                                        <div class="prodigy-product-list__item-price">
     126                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     127                                        </div>
     128                                        <span class="prodigy-product-list__item-price">&nbsp;-&nbsp;</span>
     129                                        <div class="prodigy-product-list__item-price">
     130                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['max_price'] ) ); ?>
     131                                        </div>
     132                                    <?php else : ?>
     133                                        <div class="prodigy-product-list__item-price">
     134                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     135                                        </div>
     136                                    <?php endif; ?>
    66137                                <?php endif; ?>
    67138                            </div>
  • prodigy-commerce/trunk/templates/partials/shortcode/products_grid.php

    r3205957 r3225791  
    4747                    <?php if ( Prodigy_Options::get_redemption_store_status() ) : ?>
    4848                        <div class="d-flex flex-wrap">
    49                             <?php if ( isset( $product['tiered-price'], $product['price'] ) && $product['tiered-price'] && $product['price'] == 0.0 ) : ?>
     49                            <?php if ( $product['tiered-price'] ) : ?>
    5050                                <?php if ( isset( $product['price-range']['min_price'], $product['price-range']['max_price'] ) ) : ?>
    5151                                    <?php if ( $product['price-range']['min_price'] === $product['price-range']['max_price'] ) : ?>
    5252                                        <div class="prodigy-product-list__item-price">
    53                                             <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     53                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
    5454                                        </div>
    5555                                    <?php else : ?>
    5656                                        <div class="prodigy-product-list__item-price">
    57                                             <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     57                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
    5858                                        </div>
    5959                                        <span class="prodigy-product-list__item-price">&nbsp;-&nbsp;</span>
    6060                                        <div class="prodigy-product-list__item-price">
    61                                             <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['max_price'] ) ); ?>
     61                                            <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['max_price'] ) ); ?>
    6262                                        </div>
    6363                                    <?php endif; ?>
    6464                                <?php endif; ?>
     65                                <?php
     66                            elseif (
     67                                isset( $product['price-range']['min_price'] ) &&
     68                                $product['display-price-range'] &&
     69                                $product['price-range']['min_price'] === $product['price-range']['max_price']
     70                            ) :
     71                                ?>
    6572
    66                             <?php elseif ( ! empty( $product['sale_price'] ) ) : ?>
    67                                 <span class="prodigy-product-list__item-price prodigy-product-list__item-price--sale">
    68                                     <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['regular_price'] ) ); ?>
    69                                 </span>
    70                                 <span class="prodigy-product-list__item-price">
    71                                     <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale_price'] ) ); ?>
    72                                 </span>
     73                                <?php if ( $product['sale-price'] !== null ) : ?>
     74                                <div class="prodigy-product-list__item-price prodigy-product-list__item-price--sale">
     75                                    <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     76                                </div>
     77                                <div class="prodigy-product-list__item-price">
     78                                    <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale-price'] ) ); ?>
     79                                </div>
    7380                            <?php else : ?>
    74                                 <span class="prodigy-product-list__item-price">
    75                                     <?php echo esc_html( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['regular_price'] ) ); ?>
    76                                 </span>
     81                                <div class="prodigy-product-list__item-price">
     82                                    <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     83                                </div>
     84                            <?php endif; ?>
     85                                <?php
     86                            elseif (
     87                                isset( $product['price-range']['min_price'] ) &&
     88                                ! $product['display-price-range']
     89                            ) :
     90                                ?>
     91                                <?php if ( $product['sale-price'] !== null ) : ?>
     92                                <div class="prodigy-product-list__item-price prodigy-product-list__item-price--sale">
     93                                    <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     94                                </div>
     95                                <div class="prodigy-product-list__item-price">
     96                                    <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale-price'] ) ); ?>
     97                                </div>
     98                            <?php else : ?>
     99                                <div class="prodigy-product-list__item-price">
     100                                    <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     101                                </div>
     102                            <?php endif; ?>
     103                            <?php elseif ( ( $product['price-range']['min_price'] === $product['price-range']['max_price'] ) ) : ?>
     104                                <?php if ( $product['sale-price'] !== null ) : ?>
     105                                    <div class="prodigy-product-list__item-price prodigy-product-list__item-price--sale">
     106                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     107                                    </div>
     108                                    <div class="prodigy-product-list__item-price">
     109                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['sale-price'] ) ); ?>
     110                                    </div>
     111                                <?php else : ?>
     112                                    <div class="prodigy-product-list__item-price">
     113                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price'] ) ); ?>
     114                                    </div>
     115                                <?php endif; ?>
     116                            <?php else : ?>
     117                                <?php if ( $product['display-price-range'] ) : ?>
     118                                    <div class="prodigy-product-list__item-price">
     119                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     120                                    </div>
     121                                    <span class="prodigy-product-list__item-price">&nbsp;-&nbsp;</span>
     122                                    <div class="prodigy-product-list__item-price">
     123                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['max_price'] ) ); ?>
     124                                    </div>
     125                                <?php else : ?>
     126                                    <div class="prodigy-product-list__item-price">
     127                                        <?php echo esc_attr( get_option( 'pg_currency_type' ) . Prodigy_Formatting::prodigy_price_format( $product['price-range']['min_price'] ) ); ?>
     128                                    </div>
     129                                <?php endif; ?>
    77130                            <?php endif; ?>
    78131                        </div>
Note: See TracChangeset for help on using the changeset viewer.