Changeset 3371696
- Timestamp:
- 10/02/2025 10:02:18 AM (5 months ago)
- Location:
- wcboost-products-compare/trunk
- Files:
-
- 1 deleted
- 18 edited
-
assets/css/compare.css.map (deleted)
-
includes/admin/notices.php (modified) (1 diff)
-
includes/admin/settings.php (modified) (1 diff)
-
includes/ajax-handler.php (modified) (1 diff)
-
includes/analytics/data.php (modified) (1 diff)
-
includes/analytics/tracker.php (modified) (1 diff)
-
includes/compare-list.php (modified) (1 diff)
-
includes/compatibility.php (modified) (1 diff)
-
includes/customizer.php (modified) (1 diff)
-
includes/form-handler.php (modified) (1 diff)
-
includes/frontend.php (modified) (2 diffs)
-
includes/helper.php (modified) (2 diffs)
-
includes/install.php (modified) (1 diff)
-
includes/plugin.php (modified) (1 diff)
-
includes/shortcodes.php (modified) (1 diff)
-
includes/widgets/products-compare.php (modified) (1 diff)
-
languages/wcboost-products-compare.pot (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
-
wcboost-products-compare.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wcboost-products-compare/trunk/includes/admin/notices.php
r3322266 r3371696 6 6 */ 7 7 namespace WCBoost\ProductsCompare\Admin; 8 9 defined( 'ABSPATH' ) || exit; 8 10 9 11 use WCBoost\ProductsCompare\Plugin; -
wcboost-products-compare/trunk/includes/admin/settings.php
r3122349 r3371696 1 1 <?php 2 /** 3 * Manage settings for the plugin. 4 */ 5 2 6 namespace WCBoost\ProductsCompare\Admin; 7 8 defined( 'ABSPATH' ) || exit; 3 9 4 10 /** -
wcboost-products-compare/trunk/includes/ajax-handler.php
r3322266 r3371696 1 1 <?php 2 /** 3 * Handle AJAX actions. 4 */ 5 2 6 namespace WCBoost\ProductsCompare; 3 7 4 use MailPoet\AdminPages\Pages\Help;8 defined( 'ABSPATH' ) || exit; 5 9 10 /** 11 * Ajax handler class. 12 */ 6 13 class Ajax_Handler { 7 14 -
wcboost-products-compare/trunk/includes/analytics/data.php
r3122349 r3371696 1 1 <?php 2 /** 3 * Analytics usage data. 4 */ 5 2 6 namespace WCBoost\ProductsCompare\Analytics; 7 8 defined( 'ABSPATH' ) || exit; 3 9 4 10 /** -
wcboost-products-compare/trunk/includes/analytics/tracker.php
r3322266 r3371696 1 1 <?php 2 namespace WCBoost\ProductsCompare\Analytics;3 4 use WCBoost\ProductsCompare\Analytics\Data;5 6 2 /** 7 3 * Monitor comparison data 4 */ 5 6 namespace WCBoost\ProductsCompare\Analytics; 7 8 defined( 'ABSPATH' ) || exit; 9 10 use WCBoost\ProductsCompare\Analytics\Data; 11 12 /** 13 * Tracker class 8 14 */ 9 15 class Tracker { -
wcboost-products-compare/trunk/includes/compare-list.php
r3127006 r3371696 1 1 <?php 2 /** 3 * Compare products list 4 */ 2 5 namespace WCBoost\ProductsCompare; 3 6 -
wcboost-products-compare/trunk/includes/compatibility.php
r2824094 r3371696 3 3 * Compatible with other plugins/themes 4 4 */ 5 5 6 namespace WCBoost\ProductsCompare; 6 7 -
wcboost-products-compare/trunk/includes/customizer.php
r3322266 r3371696 1 1 <?php 2 /** 3 * Handle Customizer settings for plugin. 4 */ 5 2 6 namespace WCBoost\ProductsCompare; 3 7 -
wcboost-products-compare/trunk/includes/form-handler.php
r3322266 r3371696 1 1 <?php 2 /** 3 * Handle form actions. 4 */ 5 2 6 namespace WCBoost\ProductsCompare; 3 7 4 use Exception;8 defined( 'ABSPATH' ) || exit; 5 9 6 10 /** -
wcboost-products-compare/trunk/includes/frontend.php
r3322266 r3371696 1 1 <?php 2 /** 3 * Handle frontend actions. 4 */ 5 2 6 namespace WCBoost\ProductsCompare; 7 8 defined( 'ABSPATH' ) || exit; 3 9 4 10 use WCBoost\ProductsCompare\Helper; … … 67 73 68 74 // Compare bar. 69 if ( get_option( 'wcboost_products_compare_bar' ) && ! Helper::is_compare_page() ) {75 if ( get_option( 'wcboost_products_compare_bar' ) && ! Helper::is_compare_page() && Helper::can_user_view_site() ) { 70 76 add_action( 'wp_footer', [ $this, 'compare_bar' ] ); 71 77 } -
wcboost-products-compare/trunk/includes/helper.php
r3322266 r3371696 1 1 <?php 2 /** 3 * Helper functions for the plugin. 4 */ 5 2 6 namespace WCBoost\ProductsCompare; 7 8 defined( 'ABSPATH' ) || exit; 3 9 4 10 /** … … 20 26 21 27 return is_page( $page_id ); 28 } 29 30 /** 31 * Check if current user can view the site (not restricted by WooCommerce Coming Soon mode). 32 * 33 * @since 1.0.9 34 * 35 * @return bool True if user can view the site, false if restricted by coming soon mode. 36 */ 37 public static function can_user_view_site() { 38 // If WooCommerce's Coming Soon classes don't exist, assume site is viewable 39 if ( ! class_exists( 'Automattic\WooCommerce\Internal\ComingSoon\ComingSoonHelper' ) ) { 40 return true; 41 } 42 43 // Check if Launch Your Store feature is enabled 44 if ( class_exists( 'Automattic\WooCommerce\Admin\Features\Features' ) ) { 45 if ( ! \Automattic\WooCommerce\Admin\Features\Features::is_enabled( 'launch-your-store' ) ) { 46 return true; 47 } 48 } 49 50 // Initialize coming soon helper 51 $coming_soon_helper = wc_get_container()->get( \Automattic\WooCommerce\Internal\ComingSoon\ComingSoonHelper::class ); 52 53 // If site is live, everyone can view 54 if ( $coming_soon_helper->is_site_live() ) { 55 return true; 56 } 57 58 // Administrators and shop managers can always view 59 if ( current_user_can( 'manage_woocommerce' ) ) { 60 return true; 61 } 62 63 // Check if the current page is in coming soon mode 64 if ( ! $coming_soon_helper->is_current_page_coming_soon() ) { 65 return true; 66 } 67 68 // Check for coming soon exclusion filter 69 if ( apply_filters( 'woocommerce_coming_soon_exclude', false ) ) { 70 return true; 71 } 72 73 // Check private link access 74 if ( get_option( 'woocommerce_private_link' ) === 'yes' ) { 75 $share_key = get_option( 'woocommerce_share_key' ); 76 77 // Check URL parameter 78 // phpcs:ignore WordPress.Security.NonceVerification.Recommended 79 if ( isset( $_GET['woo-share'] ) && $share_key === $_GET['woo-share'] ) { 80 return true; 81 } 82 83 // Check cookie 84 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 85 if ( isset( $_COOKIE['woo-share'] ) && $share_key === wp_unslash( $_COOKIE['woo-share'] ) ) { 86 return true; 87 } 88 } 89 90 // User is restricted by coming soon mode 91 return false; 22 92 } 23 93 -
wcboost-products-compare/trunk/includes/install.php
r3122349 r3371696 1 1 <?php 2 2 /** 3 * Install plugin3 * Handle plugin installation. 4 4 */ 5 5 6 namespace WCBoost\ProductsCompare; 6 7 -
wcboost-products-compare/trunk/includes/plugin.php
r3322266 r3371696 1 1 <?php 2 /** 3 * Main plugin class 4 */ 5 2 6 namespace WCBoost\ProductsCompare; 7 8 defined( 'ABSPATH' ) || exit; 3 9 4 10 /** -
wcboost-products-compare/trunk/includes/shortcodes.php
r3322266 r3371696 1 1 <?php 2 /** 3 * Products compare shortcodes 4 */ 5 2 6 namespace WCBoost\ProductsCompare; 3 7 8 defined( 'ABSPATH' ) || exit; 9 4 10 use WCBoost\ProductsCompare\Analytics\Data; 5 6 defined( 'ABSPATH' ) || exit;7 11 8 12 /** -
wcboost-products-compare/trunk/includes/widgets/products-compare.php
r3322266 r3371696 1 1 <?php 2 /** 3 * Classic widget for products compare. 4 */ 5 2 6 namespace WCBoost\ProductsCompare\Widget; 3 7 -
wcboost-products-compare/trunk/languages/wcboost-products-compare.pot
r3322266 r3371696 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WCBoost - Products Compare 1.0. 8\n"5 "Project-Id-Version: WCBoost - Products Compare 1.0.9\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wcboost-products-compare\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2025- 07-02T11:07:06+00:00\n"12 "POT-Creation-Date: 2025-10-02T09:48:21+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.10.0\n" … … 32 32 #. Author of the plugin 33 33 #: wcboost-products-compare.php 34 #: includes/customizer.php: 19634 #: includes/customizer.php:200 35 35 msgid "WCBoost" 36 36 msgstr "" … … 42 42 43 43 #. translators: %s Theme name 44 #: includes/admin/notices.php:9 144 #: includes/admin/notices.php:93 45 45 msgid "<strong>Your theme (%s) contains outdated copies of some template files of WBoost - Products Compare.</strong> These files may need updating to ensure they are compatible with the current version of WCBoost - Products Compare." 46 46 msgstr "" 47 47 48 #: includes/admin/settings.php:3 149 #: includes/customizer.php: 4650 #: includes/widgets/products-compare.php: 2651 #: includes/widgets/products-compare.php:3 348 #: includes/admin/settings.php:37 49 #: includes/customizer.php:50 50 #: includes/widgets/products-compare.php:30 51 #: includes/widgets/products-compare.php:37 52 52 msgid "Products Compare" 53 53 msgstr "" 54 54 55 #: includes/admin/settings.php: 3755 #: includes/admin/settings.php:43 56 56 msgid "Compare page" 57 57 msgstr "" 58 58 59 #: includes/admin/settings.php: 3859 #: includes/admin/settings.php:44 60 60 msgid "Page content: [wcboost_compare]" 61 61 msgstr "" 62 62 63 #: includes/admin/settings.php:5 063 #: includes/admin/settings.php:56 64 64 msgid "Added to compare behaviour" 65 65 msgstr "" 66 66 67 #: includes/admin/settings.php: 5567 #: includes/admin/settings.php:61 68 68 msgid "No additional action" 69 69 msgstr "" 70 70 71 #: includes/admin/settings.php: 5671 #: includes/admin/settings.php:62 72 72 msgid "Redirect to the compare page" 73 73 msgstr "" 74 74 75 #: includes/admin/settings.php: 5776 #: includes/admin/settings.php: 6977 #: includes/widgets/products-compare.php: 9775 #: includes/admin/settings.php:63 76 #: includes/admin/settings.php:75 77 #: includes/widgets/products-compare.php:101 78 78 msgid "Open the compare popup" 79 79 msgstr "" 80 80 81 #: includes/admin/settings.php:6 181 #: includes/admin/settings.php:67 82 82 msgid "Existing products behaviour" 83 83 msgstr "" 84 84 85 #: includes/admin/settings.php:6 285 #: includes/admin/settings.php:68 86 86 msgid "Select how the button work with products that are already in the compare list" 87 87 msgstr "" 88 88 89 #: includes/admin/settings.php: 6789 #: includes/admin/settings.php:73 90 90 msgid "Remove from the compare list" 91 91 msgstr "" 92 92 93 #: includes/admin/settings.php: 6893 #: includes/admin/settings.php:74 94 94 msgid "View the compare page" 95 95 msgstr "" 96 96 97 #: includes/admin/settings.php:7 097 #: includes/admin/settings.php:76 98 98 msgid "Hide the button" 99 99 msgstr "" 100 100 101 #: includes/admin/settings.php: 74101 #: includes/admin/settings.php:80 102 102 msgid "AJAX Loading" 103 103 msgstr "" 104 104 105 #: includes/admin/settings.php: 75105 #: includes/admin/settings.php:81 106 106 msgid "Load the list and buttons via AJAX to bypass the cache" 107 107 msgstr "" 108 108 109 #: includes/admin/settings.php:8 1109 #: includes/admin/settings.php:87 110 110 msgid "Comparision data tracking" 111 111 msgstr "" 112 112 113 #: includes/admin/settings.php:8 2113 #: includes/admin/settings.php:88 114 114 msgid "Monitor user comparison statistics." 115 115 msgstr "" 116 116 117 #: includes/admin/settings.php:8 3117 #: includes/admin/settings.php:89 118 118 msgid "This data gives insights into product performance, user interests, and is used to calculate similar products. Enabling this option may add additional meta data to products." 119 119 msgstr "" 120 120 121 121 #. translators: %s: product name 122 #: includes/ajax-handler.php:5 0123 #: includes/form-handler.php:4 5122 #: includes/ajax-handler.php:57 123 #: includes/form-handler.php:49 124 124 msgid "%s has been added to the compare list" 125 125 msgstr "" 126 126 127 #: includes/customizer.php:7 1127 #: includes/customizer.php:75 128 128 msgid "Button icon" 129 129 msgstr "" 130 130 131 #: includes/customizer.php:7 5131 #: includes/customizer.php:79 132 132 msgid "No icon" 133 133 msgstr "" 134 134 135 #: includes/customizer.php: 76135 #: includes/customizer.php:80 136 136 msgid "Arrows" 137 137 msgstr "" 138 138 139 #: includes/customizer.php: 77139 #: includes/customizer.php:81 140 140 msgid "Plus" 141 141 msgstr "" 142 142 143 #: includes/customizer.php: 78143 #: includes/customizer.php:82 144 144 msgid "Checkbox" 145 145 msgstr "" 146 146 147 #: includes/customizer.php: 79147 #: includes/customizer.php:83 148 148 msgid "Code compare" 149 149 msgstr "" 150 150 151 #: includes/customizer.php: 87152 #: includes/form-handler.php:5 2153 #: includes/helper.php:1 09151 #: includes/customizer.php:91 152 #: includes/form-handler.php:56 153 #: includes/helper.php:179 154 154 #: templates/loop/add-to-compare.php:28 155 155 #: templates/single-product/add-to-compare.php:28 … … 157 157 msgstr "" 158 158 159 #: includes/customizer.php: 96160 #: includes/helper.php:1 10159 #: includes/customizer.php:100 160 #: includes/helper.php:180 161 161 msgid "Remove compare" 162 162 msgstr "" 163 163 164 #: includes/customizer.php:10 5165 #: includes/helper.php:1 11164 #: includes/customizer.php:109 165 #: includes/helper.php:181 166 166 msgid "Browse compare" 167 167 msgstr "" 168 168 169 #: includes/customizer.php:11 4169 #: includes/customizer.php:118 170 170 msgid "Button text" 171 171 msgstr "" 172 172 173 #: includes/customizer.php:11 5173 #: includes/customizer.php:119 174 174 msgid "Button add" 175 175 msgstr "" 176 176 177 #: includes/customizer.php:12 4177 #: includes/customizer.php:128 178 178 msgid "Button remove" 179 179 msgstr "" 180 180 181 #: includes/customizer.php:13 3181 #: includes/customizer.php:137 182 182 msgid "Button view" 183 183 msgstr "" 184 184 185 #: includes/customizer.php:15 1185 #: includes/customizer.php:155 186 186 msgid "Compare Bar" 187 187 msgstr "" 188 188 189 #: includes/customizer.php:15 2189 #: includes/customizer.php:156 190 190 msgid "Display a bar of comparing products" 191 191 msgstr "" 192 192 193 #: includes/customizer.php:1 56193 #: includes/customizer.php:160 194 194 msgid "Disable" 195 195 msgstr "" 196 196 197 #: includes/customizer.php:1 57197 #: includes/customizer.php:161 198 198 msgid "Display at bottom" 199 199 msgstr "" 200 200 201 #: includes/customizer.php:17 4201 #: includes/customizer.php:178 202 202 msgid "Bar button behavior" 203 203 msgstr "" 204 204 205 #: includes/customizer.php:1 78205 #: includes/customizer.php:182 206 206 msgid "Open compare page" 207 207 msgstr "" 208 208 209 #: includes/customizer.php:1 79209 #: includes/customizer.php:183 210 210 msgid "Open the compage popup" 211 211 msgstr "" 212 212 213 #: includes/form-handler.php: 49213 #: includes/form-handler.php:53 214 214 msgid "Continue shopping" 215 215 msgstr "" 216 216 217 217 #. translators: %s: product name 218 #: includes/form-handler.php: 68218 #: includes/form-handler.php:72 219 219 msgid "%s was added to the compare list" 220 220 msgstr "" 221 221 222 222 #. translators: %s: product name 223 #: includes/form-handler.php:9 3223 #: includes/form-handler.php:97 224 224 msgid "%s is removed from the compare list." 225 225 msgstr "" 226 226 227 #: includes/form-handler.php:10 1227 #: includes/form-handler.php:105 228 228 msgid "Failed to remove the product from the compare list" 229 229 msgstr "" 230 230 231 #: includes/form-handler.php:1 28231 #: includes/form-handler.php:132 232 232 msgid "The compare list is emptied" 233 233 msgstr "" 234 234 235 235 #. translators: %s Product name 236 #: includes/frontend.php:2 07236 #: includes/frontend.php:213 237 237 msgid "Compare %s" 238 238 msgstr "" 239 239 240 240 #. translators: %s Product name 241 #: includes/frontend.php:2 27241 #: includes/frontend.php:233 242 242 msgid "Remove %s from the compare list" 243 243 msgstr "" 244 244 245 #: includes/frontend.php:233246 245 #: includes/frontend.php:239 246 #: includes/frontend.php:245 247 247 msgid "Open the compare list" 248 248 msgstr "" 249 249 250 #: includes/frontend.php:37 3250 #: includes/frontend.php:379 251 251 msgid "Clear list" 252 252 msgstr "" 253 253 254 #: includes/frontend.php:42 3255 #: includes/frontend.php:4 69254 #: includes/frontend.php:429 255 #: includes/frontend.php:475 256 256 msgid "Compare products" 257 257 msgstr "" 258 258 259 #: includes/frontend.php:4 36259 #: includes/frontend.php:442 260 260 msgid "Close" 261 261 msgstr "" 262 262 263 #: includes/frontend.php:4 67263 #: includes/frontend.php:473 264 264 msgid "View compared products" 265 265 msgstr "" 266 266 267 #: includes/frontend.php:5 14267 #: includes/frontend.php:520 268 268 msgid "Rating" 269 269 msgstr "" 270 270 271 #: includes/frontend.php:5 15271 #: includes/frontend.php:521 272 272 msgid "Price" 273 273 msgstr "" 274 274 275 #: includes/frontend.php:5 16275 #: includes/frontend.php:522 276 276 msgid "Availability" 277 277 msgstr "" 278 278 279 #: includes/frontend.php:5 17279 #: includes/frontend.php:523 280 280 msgid "SKU" 281 281 msgstr "" 282 282 283 #: includes/frontend.php:5 18283 #: includes/frontend.php:524 284 284 msgid "Dimensions" 285 285 msgstr "" 286 286 287 #: includes/frontend.php:5 19287 #: includes/frontend.php:525 288 288 msgid "Weight" 289 289 msgstr "" 290 290 291 #: includes/frontend.php:6 24291 #: includes/frontend.php:630 292 292 msgid "Remove this item" 293 293 msgstr "" 294 294 295 #: includes/frontend.php:66 0295 #: includes/frontend.php:666 296 296 msgid "In stock" 297 297 msgstr "" 298 298 299 #: includes/frontend.php:6 65300 #: includes/frontend.php:67 2301 #: includes/frontend.php:68 0299 #: includes/frontend.php:671 300 #: includes/frontend.php:678 301 #: includes/frontend.php:686 302 302 msgid "N/A" 303 303 msgstr "" 304 304 305 #: includes/install.php:7 1305 #: includes/install.php:72 306 306 msgctxt "Page slug" 307 307 msgid "compare" 308 308 msgstr "" 309 309 310 #: includes/install.php:7 3310 #: includes/install.php:74 311 311 msgctxt "Page title" 312 312 msgid "Compare" 313 313 msgstr "" 314 314 315 #: includes/install.php: 99315 #: includes/install.php:100 316 316 msgid "View documentation" 317 317 msgstr "" 318 318 319 #: includes/install.php: 99319 #: includes/install.php:100 320 320 msgid "Docs" 321 321 msgstr "" 322 322 323 #: includes/install.php:10 0323 #: includes/install.php:101 324 324 msgid "Visit community forums" 325 325 msgstr "" 326 326 327 #: includes/install.php:10 0327 #: includes/install.php:101 328 328 msgid "Community support" 329 329 msgstr "" 330 330 331 #: includes/plugin.php:4 1332 #: includes/plugin.php: 48331 #: includes/plugin.php:47 332 #: includes/plugin.php:54 333 333 msgid "Foul!" 334 334 msgstr "" 335 335 336 #: includes/widgets/products-compare.php: 36336 #: includes/widgets/products-compare.php:40 337 337 msgid "Displays the compare list" 338 338 msgstr "" 339 339 340 #: includes/widgets/products-compare.php:8 4340 #: includes/widgets/products-compare.php:88 341 341 msgid "Title:" 342 342 msgstr "" 343 343 344 #: includes/widgets/products-compare.php:9 0344 #: includes/widgets/products-compare.php:94 345 345 msgid "Hide if the compare list empty" 346 346 msgstr "" 347 347 348 #: includes/widgets/products-compare.php:9 4348 #: includes/widgets/products-compare.php:98 349 349 msgid "Compare button behaviour" 350 350 msgstr "" 351 351 352 #: includes/widgets/products-compare.php: 96352 #: includes/widgets/products-compare.php:100 353 353 msgid "Open the compare page" 354 354 msgstr "" -
wcboost-products-compare/trunk/readme.txt
r3322266 r3371696 3 3 Tags: woocommerce, compare, product, product compare, woocommerce compare 4 4 Tested up to: 6.8 5 Stable tag: 1.0. 85 Stable tag: 1.0.9 6 6 Requires PHP: 7.0 7 7 Requires at least: 4.5 8 WC requires at least: 3.0 .09 WC tested up to: 9.98 WC requires at least: 3.0 9 WC tested up to: 10.2 10 10 License: GPLv3 11 11 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 111 111 == Changelog == 112 112 113 = 1.0.9 = 114 * Fixed - Do not show the compare bar if the user is restricted by coming soon mode. 115 113 116 = 1.0.8 = 114 117 * New - Adds 'hide_empty_attributes' option to the shortcode. -
wcboost-products-compare/trunk/wcboost-products-compare.php
r3322266 r3371696 5 5 * Plugin URI: https://wcboost.com/plugin/woocommerce-products-compare/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash 6 6 * Author: WCBoost 7 * Version: 1.0. 87 * Version: 1.0.9 8 8 * Author URI: https://wcboost.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash 9 9 * Text Domain: wcboost-products-compare … … 20 20 } 21 21 22 define( 'WCBOOST_PRODUCTS_COMPARE_VERSION', '1.0. 8' );22 define( 'WCBOOST_PRODUCTS_COMPARE_VERSION', '1.0.9' ); 23 23 define( 'WCBOOST_PRODUCTS_COMPARE_FILE', __FILE__ ); 24 24 define( 'WCBOOST_PRODUCTS_COMPARE_FREE', plugin_basename( __FILE__ ) );
Note: See TracChangeset
for help on using the changeset viewer.