Changeset 3188008
- Timestamp:
- 11/13/2024 07:16:51 PM (17 months ago)
- Location:
- artplacer-widget/trunk
- Files:
-
- 3 edited
-
artplacer-widget.php (modified) (1 diff)
-
assets/js/artplacer-widget-front.js (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
artplacer-widget/trunk/artplacer-widget.php
r3187982 r3188008 4 4 Plugin URI: https://wordpress.org/plugins/artplacer-widget/ 5 5 Description: Display the ArtPlacer widget into your products or posts. 6 Version: 2.21. 86 Version: 2.21.9 7 7 Author: ArtPlacer 8 8 Author URI: http://www.artplacer.com -
artplacer-widget/trunk/assets/js/artplacer-widget-front.js
r3188000 r3188008 6 6 const price = variation.display_price + ' ' + document.querySelector('.woocommerce-Price-currencySymbol').innerText; 7 7 var data, height, width; 8 9 if (variation.dimensions){ 10 width = variation.dimensions.width; 11 height = variation.dimensions.height; 12 } 8 13 9 14 for (var i = 0; i < total_widgets; i++){ 10 15 data = ArtPlacer.getData(i); 11 if (data.dimensions_standard && data.dimensions_standard.toLowerCase() == 'wxh'){ 12 height = parseFloat(dimensions[1]); 13 width = parseFloat(dimensions[0]); 14 } else { 15 height = parseFloat(dimensions[0]); 16 width = parseFloat(dimensions[1]); 16 17 if (!width || !height){ 18 if (data.dimensions_standard && data.dimensions_standard.toLowerCase() == 'wxh'){ 19 height = parseFloat(dimensions[1]); 20 width = parseFloat(dimensions[0]); 21 } else { 22 height = parseFloat(dimensions[0]); 23 width = parseFloat(dimensions[1]); 24 } 17 25 } 18 26 … … 32 40 try{ 33 41 const jsonVariations = JSON.parse(document.querySelector('#ar_available_product_variations').value); 34 console.log({jsonVariations});35 42 if (Array.isArray(jsonVariations)){ 36 43 updateArtPlacerWidget(jsonVariations[0]); … … 44 51 jQuery( '.single_variation_wrap' ).on( 'show_variation', function( event, variation ) { 45 52 try{ 46 console.log({variation});47 53 updateArtPlacerWidget(variation); 48 54 }catch (e) { -
artplacer-widget/trunk/readme.txt
r3188000 r3188008 4 4 Requires at least: 4.0 5 5 Tested up to: 6.6.1 6 Stable tag: 2.21. 86 Stable tag: 2.21.9 7 7 Requires PHP: 5.2.4 8 8 License: GPLv2 or later … … 74 74 = 2.21.7 = 75 75 * Updates tags, stable tag, tested up to version. Improves price autodetection. 76 = 2.21.9 = 77 * Bug fix on AR widget when switching from variants.
Note: See TracChangeset
for help on using the changeset viewer.