Skip to content

Commit

Permalink
v3.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
algoritmika committed Jan 7, 2025
1 parent 92c0286 commit 0ccbd24
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 60 deletions.
4 changes: 2 additions & 2 deletions eu-vat-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: EU/UK VAT Validation Manager for WooCommerce
Plugin URI: https://wpfactory.com/item/eu-vat-for-woocommerce/
Description: Manage EU VAT in WooCommerce. Beautifully.
Version: 3.2.2
Version: 3.2.3
Author: WPFactory
Author URI: https://wpfactory.com/
Text Domain: eu-vat-for-woocommerce
Expand Down Expand Up @@ -68,7 +68,7 @@ final class Alg_WC_EU_VAT {
* @var string
* @since 1.0.0
*/
public $version = '3.2.2';
public $version = '3.2.3';

/**
* core object.
Expand Down
61 changes: 24 additions & 37 deletions includes/class-alg-wc-eu-vat-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* EU VAT for WooCommerce - Core Class
*
* @version 3.2.2
* @version 3.2.3
* @since 1.0.0
*
* @author WPFactory
Expand Down Expand Up @@ -1024,57 +1024,44 @@ function eu_vat_wp_footer() {
/**
* eu_vat_admin_footer.
*
* @version 2.12.12
* @version 3.2.3
* @since 1.7.0
*/
function eu_vat_admin_footer() {

$nonce = wp_create_nonce('alg-wc-eu-vat-ajax-nonce');
$nonce = wp_create_nonce( 'alg-wc-eu-vat-ajax-nonce' );
?>
<script type="text/javascript">
jQuery('body').on('click', '.exempt_vat_from_admin', function() {
jQuery( '#woocommerce-order-items' ).block({
message: null,
overlayCSS: {
background: '#fff',
opacity: 0.6
}
});
jQuery( 'body' ).on( 'click', '.exempt_vat_from_admin', function () {
jQuery( '#woocommerce-order-items' ).block( {
message: null,
overlayCSS: {
background: '#fff',
opacity: 0.6
}
} );

var order_id = jQuery(this).data('order_id');
var status = jQuery(this).data('status');
var order_id = jQuery( this ).data( 'order_id' );
var status = jQuery( this ).data( 'status' );
var data = {
action: 'exempt_vat_from_admin',
order_id: order_id,
status: status,
'nonce': '<?php echo $nonce; ?>'
};
jQuery.ajax({
action: 'exempt_vat_from_admin',
order_id: order_id,
status: status,
'nonce': '<?php echo $nonce; ?>'
};
jQuery.ajax( {
url: woocommerce_admin_meta_boxes.ajax_url,
data: data,
type: 'POST',
success: function( response ) {
success: function ( response ) {
jQuery( '#woocommerce-order-items' ).unblock();
if( response == 'yes' || response == 'never' ){
jQuery('.calculate-action').click();
if ( 'yes' == response || 'never' == response ) {
jQuery( '.calculate-action' ).click();
}
}
});
});
} );
} );
</script>
<?php
if ( 'yes' === get_option( 'alg_wc_eu_vat_enable_checkout_block_field', 'no' ) ) {
if ( version_compare( get_option( 'woocommerce_version', null ), '8.9.1', '>=' ) ) { ?>
<style>
#order_data .order_data_column_container .order_data_column div.address p:nth-child(4), #order_data .order_data_column_container .order_data_column div.edit_address p.form-field._billing_eu_vat_number_field {
display:none !important;
}

</style>
<?php
}
}

}

/**
Expand Down
40 changes: 20 additions & 20 deletions langs/eu-vat-for-woocommerce.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
#: includes/admin/class-alg-wc-eu-vat-admin.php:356
#: includes/class-alg-wc-eu-vat-core.php:419
#: includes/class-alg-wc-eu-vat-core.php:420
#: includes/class-alg-wc-eu-vat-core.php:1440
#: includes/class-alg-wc-eu-vat-core.php:1442
#: includes/class-alg-wc-eu-vat-core.php:1559
#: includes/class-alg-wc-eu-vat-core.php:1636
#: includes/class-alg-wc-eu-vat-core.php:1668
#: includes/class-alg-wc-eu-vat-core.php:1427
#: includes/class-alg-wc-eu-vat-core.php:1429
#: includes/class-alg-wc-eu-vat-core.php:1546
#: includes/class-alg-wc-eu-vat-core.php:1623
#: includes/class-alg-wc-eu-vat-core.php:1655
#: includes/settings/class-alg-wc-eu-vat-settings-general.php:69
#: includes/settings/class-alg-wc-eu-vat-settings-general.php:76
msgid "EU VAT Number"
Expand Down Expand Up @@ -196,7 +196,7 @@ msgid "VAT is valid."
msgstr ""

#: includes/class-alg-wc-eu-vat-ajax.php:59
#: includes/class-alg-wc-eu-vat-core.php:2144
#: includes/class-alg-wc-eu-vat-core.php:2131
#: includes/settings/class-alg-wc-eu-vat-settings-validation.php:269
msgid "VAT is not valid."
msgstr ""
Expand All @@ -216,7 +216,7 @@ msgid "Different shipping & billing countries."
msgstr ""

#: includes/class-alg-wc-eu-vat-ajax.php:63
#: includes/class-alg-wc-eu-vat-core.php:2080
#: includes/class-alg-wc-eu-vat-core.php:2067
msgid " VAT is valid, but registered to %company_name%."
msgstr ""

Expand All @@ -231,40 +231,40 @@ msgid "(optional)"
msgstr ""

#: includes/class-alg-wc-eu-vat-ajax.php:140
#: includes/class-alg-wc-eu-vat-core.php:1813
#: includes/class-alg-wc-eu-vat-core.php:1800
#, php-format
msgid "Error: Country by IP does not match (%s)"
msgstr ""

#: includes/class-alg-wc-eu-vat-core.php:470
#: includes/class-alg-wc-eu-vat-core.php:634
#: includes/class-alg-wc-eu-vat-core.php:1997
#: includes/class-alg-wc-eu-vat-core.php:2093
#: includes/class-alg-wc-eu-vat-core.php:1984
#: includes/class-alg-wc-eu-vat-core.php:2080
#: includes/settings/class-alg-wc-eu-vat-settings-validation.php:70
msgid "<strong>EU VAT Number</strong> is not valid."
msgstr ""

#: includes/class-alg-wc-eu-vat-core.php:603
#: includes/class-alg-wc-eu-vat-core.php:2046
#: includes/class-alg-wc-eu-vat-core.php:2033
msgid ""
"Success (checkout): VAT ID valid. Matched with prevalidated VAT numbers."
msgstr ""

#: includes/class-alg-wc-eu-vat-core.php:629
#: includes/class-alg-wc-eu-vat-core.php:2101
#: includes/class-alg-wc-eu-vat-core.php:2088
msgid "Error: VAT is not valid (checkout)"
msgstr ""

#: includes/class-alg-wc-eu-vat-core.php:697
msgid "VAT SHIFTED"
msgstr ""

#: includes/class-alg-wc-eu-vat-core.php:1241
#: includes/class-alg-wc-eu-vat-core.php:1228
#: includes/settings/class-alg-wc-eu-vat-settings-general.php:129
msgid "You didn't set your VAT ID. Are you sure you want to continue?"
msgstr ""

#: includes/class-alg-wc-eu-vat-core.php:1241
#: includes/class-alg-wc-eu-vat-core.php:1228
#: includes/settings/class-alg-wc-eu-vat-settings-general.php:136
#: includes/settings/class-alg-wc-eu-vat-settings-general.php:144
#: includes/settings/class-alg-wc-eu-vat-settings-general.php:164
Expand All @@ -286,29 +286,29 @@ msgstr ""
msgid "Yes"
msgstr ""

#: includes/class-alg-wc-eu-vat-core.php:1241
#: includes/class-alg-wc-eu-vat-core.php:1228
msgid "No"
msgstr ""

#: includes/class-alg-wc-eu-vat-core.php:1357
#: includes/class-alg-wc-eu-vat-core.php:1344
#: includes/settings/class-alg-wc-eu-vat-settings-general.php:202
msgid "I don't have a VAT ID"
msgstr ""

#: includes/class-alg-wc-eu-vat-core.php:1377
#: includes/class-alg-wc-eu-vat-core.php:1364
#: includes/settings/class-alg-wc-eu-vat-settings-general.php:217
msgid "I have a valid VAT but not exempted"
msgstr ""

#: includes/class-alg-wc-eu-vat-core.php:1632
#: includes/class-alg-wc-eu-vat-core.php:1619
msgid "Customer Decide"
msgstr ""

#: includes/class-alg-wc-eu-vat-core.php:2181
#: includes/class-alg-wc-eu-vat-core.php:2168
msgid "Keep VAT for this product"
msgstr ""

#: includes/class-alg-wc-eu-vat-core.php:2182
#: includes/class-alg-wc-eu-vat-core.php:2169
msgid ""
"Enable this to ensure VAT is charged on this product, even if the customer "
"provides a valid VAT number."
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: wpcodefactory, omardabbas, karzin, anbinder, algoritmika, kousikmu
Tags: EU VAT, UK VAT, tax, vat validation, VAT
Requires at least: 6.1
Tested up to: 6.7
Stable tag: 3.2.2
Stable tag: 3.2.3
License: GNU General Public License v3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -290,6 +290,9 @@ Once activated, access the plugin's settings by navigating to the “WPFactory

== Changelog ==

= 3.2.3 - 07/01/2025 =
* Fix - When the "Admin > Checkout block field" option was enabled, the EU VAT field was hidden on the admin order edit page.

= 3.2.2 - 31/12/2024 =
* Fix - Show field for selected user roles only.

Expand Down

0 comments on commit 0ccbd24

Please sign in to comment.