Changeset 3225791
- Timestamp:
- 01/20/2025 07:07:41 PM (15 months ago)
- Location:
- prodigy-commerce
- Files:
-
- 14 edited
- 1 copied
-
tags/3.1.2 (copied) (copied from prodigy-commerce/trunk)
-
tags/3.1.2/README.txt (modified) (2 diffs)
-
tags/3.1.2/includes/class-prodigy-cart.php (modified) (3 diffs)
-
tags/3.1.2/includes/frontend/mappers/class-prodigy-products-data-mapper.php (modified) (4 diffs)
-
tags/3.1.2/includes/support/addons/elementor/classes/prodigy-custom-source.php (modified) (1 diff)
-
tags/3.1.2/prodigy-commerce.php (modified) (2 diffs)
-
tags/3.1.2/templates/partials/shortcode/products.php (modified) (1 diff)
-
tags/3.1.2/templates/partials/shortcode/products_grid.php (modified) (1 diff)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/includes/class-prodigy-cart.php (modified) (3 diffs)
-
trunk/includes/frontend/mappers/class-prodigy-products-data-mapper.php (modified) (4 diffs)
-
trunk/includes/support/addons/elementor/classes/prodigy-custom-source.php (modified) (1 diff)
-
trunk/prodigy-commerce.php (modified) (2 diffs)
-
trunk/templates/partials/shortcode/products.php (modified) (1 diff)
-
trunk/templates/partials/shortcode/products_grid.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
prodigy-commerce/tags/3.1.2/README.txt
r3208664 r3225791 4 4 Requires at least: 4.6 5 5 Tested up to: 6.7 6 Stable tag: 3.1. 16 Stable tag: 3.1.2 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 183 183 == Changelog == 184 184 185 = 3.1.2 - 2025-01-20 = 186 * Fix compatibility of new version of elementor plugin 187 185 188 = 3.1.1 - 2024-12-13 = 186 189 * Fix Personalization bug -
prodigy-commerce/tags/3.1.2/includes/class-prodigy-cart.php
r3203195 r3225791 296 296 } 297 297 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 298 305 if ( isset( $item['is_bulk'] ) && $item['is_bulk'] !== 'false' ) { 299 306 $request = array(); … … 313 320 314 321 if ( isset( $item['personalization'][0] ) && $this->is_personalization_filled( $item['personalization'] ) ) { 315 $label = wp_unslash( $item['personalization'][0]['label'] ?? '' );316 322 $request['line_items'][ $key ]['personalization_id'] = $item['personalization'][0]['personalization_id'] ?? 0; 317 323 $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'] ?? ''; 319 325 } 320 326 } … … 334 340 335 341 if ( isset( $item['personalization'][0] ) && $this->is_personalization_filled( $item['personalization'] ) ) { 336 $label = wp_unslash( $item['personalization'][0]['label'] ?? '' );337 342 $request['line_items'][0]['personalization_id'] = $item['personalization'][0]['personalization_id'] ?? 0; 338 343 $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'] ?? ''; 340 345 } 341 346 } -
prodigy-commerce/tags/3.1.2/includes/frontend/mappers/class-prodigy-products-data-mapper.php
r3174432 r3225791 150 150 $products_data[ $key ]['id'] = (int) $product['id']; 151 151 $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']; 154 154 $products_data[ $key ]['versions-image-url'] = $product['attributes']['versions-image-url'] ?? array(); 155 155 $products_data[ $key ]['rating'] = $product['attributes']['rating']; … … 159 159 $products_data[ $key ]['logo'] = $product['attributes']['logo'] ?? array(); 160 160 $products_data[ $key ]['image-cropping-params'] = $product['attributes']['image-cropping-params'] ?? array(); 161 $products_data[ $key ]['display-price-range'] = $product['attributes']['display-price-range']; 161 162 if ( isset( $local_product->post_id ) ) { 162 163 $products_data[ $key ]['local_url'] = esc_url( get_permalink( $local_product->post_id ) ); … … 167 168 $image = 'https://prodigycommerce-public-files.s3.us-east-2.amazonaws.com/wordpress/default-category.jpg'; 168 169 $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( 175 176 'catalog' => $image, 176 177 'catalog_retina' => $image, … … 183 184 'cropped' => $image, 184 185 ), 185 'category' => 'Category',186 'category' => 'Category', 186 187 ); 187 188 -
prodigy-commerce/tags/3.1.2/includes/support/addons/elementor/classes/prodigy-custom-source.php
r3174432 r3225791 88 88 * @return array 89 89 */ 90 p rivatefunction prepare_template( array $template_data ): array {90 public function prepare_template( array $template_data ): array { 91 91 $favorite_templates = $this->get_user_meta( 'favorites' ); 92 92 // BC: Support legacy APIs that don't have access tiers. -
prodigy-commerce/tags/3.1.2/prodigy-commerce.php
r3208664 r3225791 5 5 * Plugin URI: https://prodigycommerce.com 6 6 * Description: Provides a comprehensive set of tools to build unparalleled eCommerce experiences on WordPress. 7 * Version: 3.1. 17 * Version: 3.1.2 8 8 * Author: Prodigy Commerce 9 9 * License: GPL-2.0+ … … 17 17 use Prodigy\Includes\Prodigy_Deactivator; 18 18 19 const PRODIGY_VERSION = '3.1. 1';19 const PRODIGY_VERSION = '3.1.2'; 20 20 21 21 if ( file_exists( plugin_dir_path( __FILE__ ) . 'env.ini' ) ) { -
prodigy-commerce/tags/3.1.2/templates/partials/shortcode/products.php
r3203195 r3225791 51 51 </div> 52 52 <?php endif; ?> 53 53 54 <?php if ( Prodigy_Options::get_redemption_store_status() ) : ?> 54 55 <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"> - </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 ) : ?> 56 81 <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'] ) ); ?> 58 83 </div> 59 84 <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'] ) ); ?> 61 86 </div> 62 87 <?php else : ?> 63 88 <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'] ) ); ?> 65 90 </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"> - </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; ?> 66 137 <?php endif; ?> 67 138 </div> -
prodigy-commerce/tags/3.1.2/templates/partials/shortcode/products_grid.php
r3205957 r3225791 47 47 <?php if ( Prodigy_Options::get_redemption_store_status() ) : ?> 48 48 <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'] ) : ?> 50 50 <?php if ( isset( $product['price-range']['min_price'], $product['price-range']['max_price'] ) ) : ?> 51 51 <?php if ( $product['price-range']['min_price'] === $product['price-range']['max_price'] ) : ?> 52 52 <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'] ) ); ?> 54 54 </div> 55 55 <?php else : ?> 56 56 <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'] ) ); ?> 58 58 </div> 59 59 <span class="prodigy-product-list__item-price"> - </span> 60 60 <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'] ) ); ?> 62 62 </div> 63 63 <?php endif; ?> 64 64 <?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 ?> 65 72 66 <?php elseif ( ! empty( $product['sale_price'] )) : ?>67 < spanclass="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 < spanclass="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> 73 80 <?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"> - </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; ?> 77 130 <?php endif; ?> 78 131 </div> -
prodigy-commerce/trunk/README.txt
r3208664 r3225791 4 4 Requires at least: 4.6 5 5 Tested up to: 6.7 6 Stable tag: 3.1. 16 Stable tag: 3.1.2 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 183 183 == Changelog == 184 184 185 = 3.1.2 - 2025-01-20 = 186 * Fix compatibility of new version of elementor plugin 187 185 188 = 3.1.1 - 2024-12-13 = 186 189 * Fix Personalization bug -
prodigy-commerce/trunk/includes/class-prodigy-cart.php
r3203195 r3225791 296 296 } 297 297 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 298 305 if ( isset( $item['is_bulk'] ) && $item['is_bulk'] !== 'false' ) { 299 306 $request = array(); … … 313 320 314 321 if ( isset( $item['personalization'][0] ) && $this->is_personalization_filled( $item['personalization'] ) ) { 315 $label = wp_unslash( $item['personalization'][0]['label'] ?? '' );316 322 $request['line_items'][ $key ]['personalization_id'] = $item['personalization'][0]['personalization_id'] ?? 0; 317 323 $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'] ?? ''; 319 325 } 320 326 } … … 334 340 335 341 if ( isset( $item['personalization'][0] ) && $this->is_personalization_filled( $item['personalization'] ) ) { 336 $label = wp_unslash( $item['personalization'][0]['label'] ?? '' );337 342 $request['line_items'][0]['personalization_id'] = $item['personalization'][0]['personalization_id'] ?? 0; 338 343 $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'] ?? ''; 340 345 } 341 346 } -
prodigy-commerce/trunk/includes/frontend/mappers/class-prodigy-products-data-mapper.php
r3174432 r3225791 150 150 $products_data[ $key ]['id'] = (int) $product['id']; 151 151 $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']; 154 154 $products_data[ $key ]['versions-image-url'] = $product['attributes']['versions-image-url'] ?? array(); 155 155 $products_data[ $key ]['rating'] = $product['attributes']['rating']; … … 159 159 $products_data[ $key ]['logo'] = $product['attributes']['logo'] ?? array(); 160 160 $products_data[ $key ]['image-cropping-params'] = $product['attributes']['image-cropping-params'] ?? array(); 161 $products_data[ $key ]['display-price-range'] = $product['attributes']['display-price-range']; 161 162 if ( isset( $local_product->post_id ) ) { 162 163 $products_data[ $key ]['local_url'] = esc_url( get_permalink( $local_product->post_id ) ); … … 167 168 $image = 'https://prodigycommerce-public-files.s3.us-east-2.amazonaws.com/wordpress/default-category.jpg'; 168 169 $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( 175 176 'catalog' => $image, 176 177 'catalog_retina' => $image, … … 183 184 'cropped' => $image, 184 185 ), 185 'category' => 'Category',186 'category' => 'Category', 186 187 ); 187 188 -
prodigy-commerce/trunk/includes/support/addons/elementor/classes/prodigy-custom-source.php
r3174432 r3225791 88 88 * @return array 89 89 */ 90 p rivatefunction prepare_template( array $template_data ): array {90 public function prepare_template( array $template_data ): array { 91 91 $favorite_templates = $this->get_user_meta( 'favorites' ); 92 92 // BC: Support legacy APIs that don't have access tiers. -
prodigy-commerce/trunk/prodigy-commerce.php
r3208664 r3225791 5 5 * Plugin URI: https://prodigycommerce.com 6 6 * Description: Provides a comprehensive set of tools to build unparalleled eCommerce experiences on WordPress. 7 * Version: 3.1. 17 * Version: 3.1.2 8 8 * Author: Prodigy Commerce 9 9 * License: GPL-2.0+ … … 17 17 use Prodigy\Includes\Prodigy_Deactivator; 18 18 19 const PRODIGY_VERSION = '3.1. 1';19 const PRODIGY_VERSION = '3.1.2'; 20 20 21 21 if ( file_exists( plugin_dir_path( __FILE__ ) . 'env.ini' ) ) { -
prodigy-commerce/trunk/templates/partials/shortcode/products.php
r3203195 r3225791 51 51 </div> 52 52 <?php endif; ?> 53 53 54 <?php if ( Prodigy_Options::get_redemption_store_status() ) : ?> 54 55 <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"> - </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 ) : ?> 56 81 <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'] ) ); ?> 58 83 </div> 59 84 <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'] ) ); ?> 61 86 </div> 62 87 <?php else : ?> 63 88 <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'] ) ); ?> 65 90 </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"> - </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; ?> 66 137 <?php endif; ?> 67 138 </div> -
prodigy-commerce/trunk/templates/partials/shortcode/products_grid.php
r3205957 r3225791 47 47 <?php if ( Prodigy_Options::get_redemption_store_status() ) : ?> 48 48 <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'] ) : ?> 50 50 <?php if ( isset( $product['price-range']['min_price'], $product['price-range']['max_price'] ) ) : ?> 51 51 <?php if ( $product['price-range']['min_price'] === $product['price-range']['max_price'] ) : ?> 52 52 <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'] ) ); ?> 54 54 </div> 55 55 <?php else : ?> 56 56 <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'] ) ); ?> 58 58 </div> 59 59 <span class="prodigy-product-list__item-price"> - </span> 60 60 <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'] ) ); ?> 62 62 </div> 63 63 <?php endif; ?> 64 64 <?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 ?> 65 72 66 <?php elseif ( ! empty( $product['sale_price'] )) : ?>67 < spanclass="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 < spanclass="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> 73 80 <?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"> - </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; ?> 77 130 <?php endif; ?> 78 131 </div>
Note: See TracChangeset
for help on using the changeset viewer.