Changeset 3281053
- Timestamp:
- 04/24/2025 02:18:40 PM (10 months ago)
- Location:
- checkout-files-upload-woocommerce/trunk
- Files:
-
- 3 edited
-
checkout-files-upload-woocommerce.php (modified) (7 diffs)
-
includes/class-alg-wc-checkout-files-upload.php (modified) (7 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
checkout-files-upload-woocommerce/trunk/checkout-files-upload-woocommerce.php
r3143042 r3281053 4 4 Plugin URI: https://wpwham.com/products/checkout-files-upload-for-woocommerce/ 5 5 Description: Let your customers upload files on (or after) WooCommerce checkout. 6 Version: 2.2. 06 Version: 2.2.1 7 7 Author: WP Wham 8 Author URI: https://wpwham.com 8 Author URI: https://wpwham.com/ 9 9 Text Domain: checkout-files-upload-woocommerce 10 10 Domain Path: /langs 11 Copyright: © 2018-2024 WP Wham 12 WC tested up to: 9.2 11 Copyright: © 2018-2025 WP Wham 13 12 License: GNU General Public License v3.0 14 13 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 39 38 40 39 if ( ! defined( 'WPWHAM_CHECKOUT_FILES_UPLOAD_VERSION' ) ) { 41 define( 'WPWHAM_CHECKOUT_FILES_UPLOAD_VERSION', '2.2. 0' );40 define( 'WPWHAM_CHECKOUT_FILES_UPLOAD_VERSION', '2.2.1' ); 42 41 } 43 42 if ( ! defined( 'WPWHAM_CHECKOUT_FILES_UPLOAD_DBVERSION' ) ) { … … 68 67 * 69 68 * @class Alg_WC_Checkout_Files_Upload 70 * @version 2.2. 069 * @version 2.2.1 71 70 * @since 1.0.0 72 71 */ … … 82 81 * @since 1.0.0 83 82 */ 84 public $version = '2.2. 0';83 public $version = '2.2.1'; 85 84 86 85 /** … … 110 109 * Alg_WC_Checkout_Files_Upload Constructor. 111 110 * 112 * @version 2. 1.0111 * @version 2.2.1 113 112 * @since 1.0.0 114 113 * @access public … … 117 116 118 117 // Set up localisation 119 load_plugin_textdomain( 'checkout-files-upload-woocommerce', false, dirname( plugin_basename( __FILE__ ) ) . '/langs/');118 add_action( 'init', array( $this, 'load_localization' ) ); 120 119 121 120 // Include required files … … 146 145 } 147 146 147 } 148 149 /** 150 * @since 2.2.1 151 */ 152 public function load_localization() { 153 load_plugin_textdomain( 'checkout-files-upload-woocommerce', false, dirname( plugin_basename( __FILE__ ) ) . '/langs/' ); 148 154 } 149 155 -
checkout-files-upload-woocommerce/trunk/includes/class-alg-wc-checkout-files-upload.php
r3143042 r3281053 3 3 * Checkout Files Upload 4 4 * 5 * @version 2.2. 05 * @version 2.2.1 6 6 * @since 1.0.0 7 7 * @author Algoritmika Ltd. … … 58 58 * language_shortcode. 59 59 * 60 * @version 1.4.560 * @version 2.2.1 61 61 * @since 1.4.5 62 62 */ … … 65 65 if ( isset( $atts['lang_text'] ) && isset( $atts['not_lang_text'] ) && ! empty( $atts['lang'] ) ) { 66 66 return ( ! defined( 'ICL_LANGUAGE_CODE' ) || ! in_array( strtolower( ICL_LANGUAGE_CODE ), array_map( 'trim', explode( ',', strtolower( $atts['lang'] ) ) ) ) ) ? 67 $atts['not_lang_text'] : $atts['lang_text'];67 esc_html( $atts['not_lang_text'] ) : esc_html( $atts['lang_text'] ); 68 68 } 69 69 // E.g.: `[alg_wc_cfu_translate lang="EN,DE"]Translation for EN and DE[/alg_wc_cfu_translate][alg_wc_cfu_translate not_lang="EN,DE"]Translation for other languages[/alg_wc_cfu_translate]` … … 71 71 ( ! empty( $atts['lang'] ) && ( ! defined( 'ICL_LANGUAGE_CODE' ) || ! in_array( strtolower( ICL_LANGUAGE_CODE ), array_map( 'trim', explode( ',', strtolower( $atts['lang'] ) ) ) ) ) ) || 72 72 ( ! empty( $atts['not_lang'] ) && defined( 'ICL_LANGUAGE_CODE' ) && in_array( strtolower( ICL_LANGUAGE_CODE ), array_map( 'trim', explode( ',', strtolower( $atts['not_lang'] ) ) ) ) ) 73 ) ? '' : $content;73 ) ? '' : esc_html( $content ); 74 74 } 75 75 … … 680 680 * validate_on_checkout. 681 681 * 682 * @version 2. 1.0682 * @version 2.2.1 683 683 * @since 1.0.0 684 684 */ … … 691 691 $local_session_started = true; 692 692 } 693 693 694 $checkout_content = get_post_field( 'post_content', get_option( 'woocommerce_checkout_page_id' ) ); 695 $has_shortcode = has_shortcode( $checkout_content, 'wpwham_checkout_files_uploader' ); 696 694 697 $total_number = apply_filters( 'alg_wc_checkout_files_upload_option', 1, 'total_number' ); 695 698 for ( $i = 1; $i <= $total_number; $i++ ) { … … 697 700 'yes' === get_option( 'alg_checkout_files_upload_enabled_' . $i, 'yes' ) && 698 701 $this->is_visible( $i ) && 699 'disable' != get_option( 'alg_checkout_files_upload_hook_' . $i, 'woocommerce_before_checkout_form' ) 702 ( 703 get_option( 'alg_checkout_files_upload_hook_' . $i, 'woocommerce_before_checkout_form' ) !== 'disable' || 704 $has_shortcode 705 ) 700 706 ) { 701 707 -
checkout-files-upload-woocommerce/trunk/readme.txt
r3143042 r3281053 3 3 Tags: woocommerce, checkout files upload, checkout, woo commerce 4 4 Requires at least: 4.4 5 Tested up to: 6. 66 Stable tag: 2.2. 05 Tested up to: 6.8 6 Stable tag: 2.2.1 7 7 License: GNU General Public License v3.0 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 76 76 77 77 == Changelog == 78 79 = 2.2.1 - 2025-04-24 = 80 * FIX: "file required" not working if uploader placed outside of main checkout form via shortcode (#89416). 81 * FIX: PHP notice. 82 * FIX: escape text in translation shortcodes. 78 83 79 84 = 2.2.0 - 2024-08-28 =
Note: See TracChangeset
for help on using the changeset viewer.