diff --git a/common/class-woo-refund-and-exchange-lite-common.php b/common/class-woo-refund-and-exchange-lite-common.php index cfda4eb..60857d7 100755 --- a/common/class-woo-refund-and-exchange-lite-common.php +++ b/common/class-woo-refund-and-exchange-lite-common.php @@ -141,9 +141,9 @@ public function wps_rma_order_return_attach_files() { $file_security = pathinfo( $file_name, PATHINFO_EXTENSION ); if ( 'png' == $file_security || 'jpg' == $file_security || 'jpeg' == $file_security ) { $source_path = sanitize_text_field( wp_unslash( $_FILES['wps_rma_return_request_files']['tmp_name'][ $i ] ) ); - $target_path = $directory . '/' . $order_id . '-' . sanitize_file_name($file_name); + $target_path = $directory . '/' . $order_id . '-' . sanitize_file_name( $file_name ); - $filename[] = $order_id . '-' . sanitize_file_name($file_name); + $filename[] = $order_id . '-' . sanitize_file_name( $file_name ); move_uploaded_file( $source_path, $target_path ); } } @@ -197,6 +197,9 @@ public function wps_rma_save_return_request() { } $products1 = $_POST; $response = wps_rma_save_return_request_callback( $order_id, $refund_method, $products1 ); + if ( true == $response['flag'] ) { + do_action( 'wps_rma_do_shiprocket_integration', $order_id, $products1 ); + } echo wp_json_encode( $response ); wp_die(); } diff --git a/languages/woo-refund-and-exchange-lite-en_US.mo b/languages/woo-refund-and-exchange-lite-en_US.mo index 71ff940..d3f7d2e 100644 Binary files a/languages/woo-refund-and-exchange-lite-en_US.mo and b/languages/woo-refund-and-exchange-lite-en_US.mo differ diff --git a/languages/woo-refund-and-exchange-lite-en_US.po b/languages/woo-refund-and-exchange-lite-en_US.po index 27ffb9f..25969a7 100644 --- a/languages/woo-refund-and-exchange-lite-en_US.po +++ b/languages/woo-refund-and-exchange-lite-en_US.po @@ -1,8 +1,8 @@ msgid "" msgstr "" -"Project-Id-Version: Return Refund and Exchange for WooCommerce 4.1.0\n" -"POT-Creation-Date: 2023-01-18 19:57+0530\n" -"PO-Revision-Date: 2023-01-18 19:59+0530\n" +"Project-Id-Version: Return Refund and Exchange for WooCommerce 4.1.1\n" +"POT-Creation-Date: 2023-03-16 09:49+0530\n" +"PO-Revision-Date: 2023-03-16 09:51+0530\n" "Last-Translator: \n" "Language-Team: WP Swings\n" "Language: en_US\n" @@ -258,7 +258,7 @@ msgstr "" #: admin/partials/email_template/woo-refund-and-exchange-lite-refund-request-accept-email.php:40 #: admin/partials/woo-refund-and-exchange-lite-return-meta.php:44 #: common/partials/email_template/woo-refund-and-exchange-lite-refund-request-email.php:47 -#: public/partials/wps-rma-refund-request-form.php:188 +#: public/partials/wps-rma-refund-request-form.php:197 msgid "Price" msgstr "" @@ -731,30 +731,30 @@ msgstr "" msgid "Attached File type is not supported" msgstr "" -#: common/class-woo-refund-and-exchange-lite-common.php:218 +#: common/class-woo-refund-and-exchange-lite-common.php:221 #, php-format msgid "Refund Requested (%s)" msgstr "" -#: common/class-woo-refund-and-exchange-lite-common.php:229 +#: common/class-woo-refund-and-exchange-lite-common.php:232 #, php-format msgid "Refund Approved (%s)" msgstr "" -#: common/class-woo-refund-and-exchange-lite-common.php:240 +#: common/class-woo-refund-and-exchange-lite-common.php:243 #, php-format msgid "Refund Cancelled (%s)" msgstr "" -#: common/class-woo-refund-and-exchange-lite-common.php:259 +#: common/class-woo-refund-and-exchange-lite-common.php:262 msgid "Refund Requested" msgstr "" -#: common/class-woo-refund-and-exchange-lite-common.php:260 +#: common/class-woo-refund-and-exchange-lite-common.php:263 msgid "Refund Approved" msgstr "" -#: common/class-woo-refund-and-exchange-lite-common.php:261 +#: common/class-woo-refund-and-exchange-lite-common.php:264 msgid "Refund Cancelled" msgstr "" @@ -1175,68 +1175,68 @@ msgstr "" msgid "Order's Product Refund Request Form" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:193 -#: public/partials/wps-rma-refund-request-form.php:229 -#: public/partials/wps-rma-refund-request-form.php:258 +#: public/partials/wps-rma-refund-request-form.php:202 +#: public/partials/wps-rma-refund-request-form.php:238 +#: public/partials/wps-rma-refund-request-form.php:267 msgid "(incl. tax)" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:197 -#: public/partials/wps-rma-refund-request-form.php:233 -#: public/partials/wps-rma-refund-request-form.php:262 +#: public/partials/wps-rma-refund-request-form.php:206 +#: public/partials/wps-rma-refund-request-form.php:242 +#: public/partials/wps-rma-refund-request-form.php:271 msgid "(excl. tax)" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:252 +#: public/partials/wps-rma-refund-request-form.php:261 msgid "Total Refund Amount" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:289 +#: public/partials/wps-rma-refund-request-form.php:298 msgid "Bank Account Details" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:293 +#: public/partials/wps-rma-refund-request-form.php:302 msgid "Please Enter the bank details for manual refund" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:303 +#: public/partials/wps-rma-refund-request-form.php:312 msgid "Subject of Refund Request" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:320 +#: public/partials/wps-rma-refund-request-form.php:329 msgid "Other" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:324 +#: public/partials/wps-rma-refund-request-form.php:333 msgid "Write your refund reason" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:335 +#: public/partials/wps-rma-refund-request-form.php:344 msgid "Description for Refund Reason" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:344 +#: public/partials/wps-rma-refund-request-form.php:353 msgid "Write your description for a refund" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:367 +#: public/partials/wps-rma-refund-request-form.php:376 msgid "Attach Files" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:375 +#: public/partials/wps-rma-refund-request-form.php:384 msgid "Add More" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:376 +#: public/partials/wps-rma-refund-request-form.php:385 #: public/partials/wps-rma-view-order-msg.php:50 msgid "Only png, jpg and jpeg extension file is approved" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:384 +#: public/partials/wps-rma-refund-request-form.php:393 msgid "Submit Request" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:416 +#: public/partials/wps-rma-refund-request-form.php:425 msgid "Refund Request Can't make on this order" msgstr "" diff --git a/languages/woo-refund-and-exchange-lite.pot b/languages/woo-refund-and-exchange-lite.pot index f111377..3cf86d0 100644 --- a/languages/woo-refund-and-exchange-lite.pot +++ b/languages/woo-refund-and-exchange-lite.pot @@ -1,8 +1,8 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Return Refund and Exchange for WooCommerce 4.1.0\n" -"POT-Creation-Date: 2023-01-18 19:57+0530\n" +"Project-Id-Version: Return Refund and Exchange for WooCommerce 4.1.1\n" +"POT-Creation-Date: 2023-03-16 09:49+0530\n" "PO-Revision-Date: 2022-07-05 13:57+0530\n" "Last-Translator: \n" "Language-Team: WP Swings\n" @@ -259,7 +259,7 @@ msgstr "" #: admin/partials/email_template/woo-refund-and-exchange-lite-refund-request-accept-email.php:40 #: admin/partials/woo-refund-and-exchange-lite-return-meta.php:44 #: common/partials/email_template/woo-refund-and-exchange-lite-refund-request-email.php:47 -#: public/partials/wps-rma-refund-request-form.php:188 +#: public/partials/wps-rma-refund-request-form.php:197 msgid "Price" msgstr "" @@ -732,30 +732,30 @@ msgstr "" msgid "Attached File type is not supported" msgstr "" -#: common/class-woo-refund-and-exchange-lite-common.php:218 +#: common/class-woo-refund-and-exchange-lite-common.php:221 #, php-format msgid "Refund Requested (%s)" msgstr "" -#: common/class-woo-refund-and-exchange-lite-common.php:229 +#: common/class-woo-refund-and-exchange-lite-common.php:232 #, php-format msgid "Refund Approved (%s)" msgstr "" -#: common/class-woo-refund-and-exchange-lite-common.php:240 +#: common/class-woo-refund-and-exchange-lite-common.php:243 #, php-format msgid "Refund Cancelled (%s)" msgstr "" -#: common/class-woo-refund-and-exchange-lite-common.php:259 +#: common/class-woo-refund-and-exchange-lite-common.php:262 msgid "Refund Requested" msgstr "" -#: common/class-woo-refund-and-exchange-lite-common.php:260 +#: common/class-woo-refund-and-exchange-lite-common.php:263 msgid "Refund Approved" msgstr "" -#: common/class-woo-refund-and-exchange-lite-common.php:261 +#: common/class-woo-refund-and-exchange-lite-common.php:264 msgid "Refund Cancelled" msgstr "" @@ -1176,68 +1176,68 @@ msgstr "" msgid "Order's Product Refund Request Form" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:193 -#: public/partials/wps-rma-refund-request-form.php:229 -#: public/partials/wps-rma-refund-request-form.php:258 +#: public/partials/wps-rma-refund-request-form.php:202 +#: public/partials/wps-rma-refund-request-form.php:238 +#: public/partials/wps-rma-refund-request-form.php:267 msgid "(incl. tax)" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:197 -#: public/partials/wps-rma-refund-request-form.php:233 -#: public/partials/wps-rma-refund-request-form.php:262 +#: public/partials/wps-rma-refund-request-form.php:206 +#: public/partials/wps-rma-refund-request-form.php:242 +#: public/partials/wps-rma-refund-request-form.php:271 msgid "(excl. tax)" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:252 +#: public/partials/wps-rma-refund-request-form.php:261 msgid "Total Refund Amount" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:289 +#: public/partials/wps-rma-refund-request-form.php:298 msgid "Bank Account Details" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:293 +#: public/partials/wps-rma-refund-request-form.php:302 msgid "Please Enter the bank details for manual refund" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:303 +#: public/partials/wps-rma-refund-request-form.php:312 msgid "Subject of Refund Request" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:320 +#: public/partials/wps-rma-refund-request-form.php:329 msgid "Other" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:324 +#: public/partials/wps-rma-refund-request-form.php:333 msgid "Write your refund reason" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:335 +#: public/partials/wps-rma-refund-request-form.php:344 msgid "Description for Refund Reason" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:344 +#: public/partials/wps-rma-refund-request-form.php:353 msgid "Write your description for a refund" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:367 +#: public/partials/wps-rma-refund-request-form.php:376 msgid "Attach Files" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:375 +#: public/partials/wps-rma-refund-request-form.php:384 msgid "Add More" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:376 +#: public/partials/wps-rma-refund-request-form.php:385 #: public/partials/wps-rma-view-order-msg.php:50 msgid "Only png, jpg and jpeg extension file is approved" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:384 +#: public/partials/wps-rma-refund-request-form.php:393 msgid "Submit Request" msgstr "" -#: public/partials/wps-rma-refund-request-form.php:416 +#: public/partials/wps-rma-refund-request-form.php:425 msgid "Refund Request Can't make on this order" msgstr "" diff --git a/public/partials/wps-rma-refund-request-form.php b/public/partials/wps-rma-refund-request-form.php index cf7630f..8919bba 100755 --- a/public/partials/wps-rma-refund-request-form.php +++ b/public/partials/wps-rma-refund-request-form.php @@ -93,7 +93,7 @@ has_status( // Purchases note on the order. apply_filters( 'woocommerce_purchase_note_order_statuses', array( 'completed', 'processing' ) ) @@ -123,7 +123,16 @@ $thumbnail = wp_get_attachment_image( $product->get_image_id(), 'thumbnail' ); $coupon_discount = get_option( 'wps_rma_refund_deduct_coupon', 'no' ); if ( 'on' === $coupon_discount ) { - $tax_inc = $item->get_total() + $item->get_subtotal_tax(); + $total_tax = $item->get_taxes(); + if ( isset( $total_tax['total'][1] ) ) { + + $final_total_tax = $total_tax['total'][1]; + $tax_inc = $item->get_total() + $final_total_tax; + + } else { + + $tax_inc = $item->get_total() + $item->get_subtotal_tax(); + } $tax_exc = $item->get_total() - $item->get_subtotal_tax(); } else { $tax_inc = $item->get_subtotal() + $item->get_subtotal_tax(); diff --git a/readme.txt b/readme.txt index bec962d..8372c54 100755 --- a/readme.txt +++ b/readme.txt @@ -2,11 +2,11 @@ Contributors: wpswings Donate link: https://wpswings.com/ Tags: return, rma plugin, product return system, woocommerce, warranty -Requires at least: 5.1.0 +Requires at least: 5.5.0 Tested up to: 6.1.1 -WC requires at least: 5.1.0 -WC tested up to: 7.3.0 -Stable tag: 4.1.0 +WC requires at least: 5.5.0 +WC tested up to: 7.5.0 +Stable tag: 4.1.1 Requires PHP: 7.2 or Higher License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -127,7 +127,9 @@ For WooCommerce store owners who want to succeed in the multivendor marketplace If you need support or have any questions then kindly use our online chat window [**here**](https://wpswings.com/?utm_source=wpswings-official&utm_medium=rma-org-page&utm_campaign=wpswings-official) or connect with us then [**Generate a Ticket**](https://wpswings.com/submit-query/?utm_source=wpswings-generate-ticket&utm_medium=rma-org-page&utm_campaign=generate-ticket) -Create and Revamp your eCommerce store with [**WooCommerce Services**](https://wpswings.com/woocommerce-services/?utm_source=wpswings-rma-services&utm_medium=rma-org-page&utm_campaign=woocommerce-services) +> If our documentation doesn’t contain the solution to your problem, you can visit the [ **WP Swings Forum Community**](https://forums.wpswings.com/?utm_source=wpswings-rma-forums&utm_medium=rma-org-page&utm_campaign=forum) + +>Create and Revamp your eCommerce store with [**WooCommerce Services**](https://wpswings.com/woocommerce-services/?utm_source=wpswings-rma-services&utm_medium=rma-org-page&utm_campaign=woocommerce-services) == Installation == @@ -217,6 +219,12 @@ Please visit [**WP Swings Knowledge Base**](https://support.wpswings.com/wordpre == Changelog == += 4.1.1 - Released on 16 March 2023 = +* New: Compatibility with the Latest WC (6.1.1) and WP (7.5.0) +* Fix: RMA Policies for Tax Handling +* Fix: Price on Refund Form based on the Coupon Functionality + + = 4.1.0 - Released on 20 January 2023 = * New: Compatibility with the Latest WC and WP * New: Added Custom CSS Setting @@ -356,8 +364,10 @@ Please visit [**WP Swings Knowledge Base**](https://support.wpswings.com/wordpre == Upgrade Notice == -= 4.1.0 - Released on 20 January 2023 = -* New: Compatibility with the Latest WC and WP -* New: Added Custom CSS Setting -* Fix: File Uploading name formatting issue -* Enhancement: File upload Add more button hide when limit exceeded \ No newline at end of file += 4.1.1 - Released on 16 March 2023 = +* New: Compatibility with the Latest WC (6.1.1) and WP (7.5.0) +* Fix: RMA Policies for Tax Handling +* Fix: Price on Refund Form based on the Coupon Functionality + + + diff --git a/woocommerce-refund-and-exchange-lite.php b/woocommerce-refund-and-exchange-lite.php index 9260848..2784c08 100755 --- a/woocommerce-refund-and-exchange-lite.php +++ b/woocommerce-refund-and-exchange-lite.php @@ -15,16 +15,16 @@ * Plugin Name: Return Refund and Exchange for WooCommerce * Plugin URI: https://wordpress.org/plugins/woo-refund-and-exchange-lite/ * Description: Return Refund and Exchange for WooCommerce allows users to submit product refund. The plugin provides a dedicated mailing system that would help to communicate better between store owner and customers.This is lite version of WooCommerce Refund And Exchange. Elevate your e-commerce store by exploring more on WP Swings - * Version: 4.1.0 + * Version: 4.1.1 * Author: WP Swings * Author URI: https://wpswings.com/?utm_source=wpswings-rma-official&utm_medium=rma-org-page&utm_campaign=official * Text Domain: woo-refund-and-exchange-lite * Domain Path: /languages * - * Requires at least: 5.1.0 + * Requires at least: 5.5.0 * Tested up to: 6.1.1 - * WC requires at least: 5.1.0 - * WC tested up to: 7.3.0 + * WC requires at least: 5.5.0 + * WC tested up to: 7.5.0 * * License: GNU General Public License v3.0 * License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -60,7 +60,7 @@ * @since 1.0.0 */ function define_woo_refund_and_exchange_lite_constants() { - woo_refund_and_exchange_lite_constants( 'WOO_REFUND_AND_EXCHANGE_LITE_VERSION', '4.1.0' ); + woo_refund_and_exchange_lite_constants( 'WOO_REFUND_AND_EXCHANGE_LITE_VERSION', '4.1.1' ); woo_refund_and_exchange_lite_constants( 'WOO_REFUND_AND_EXCHANGE_LITE_DIR_PATH', plugin_dir_path( __FILE__ ) ); woo_refund_and_exchange_lite_constants( 'WOO_REFUND_AND_EXCHANGE_LITE_DIR_URL', plugin_dir_url( __FILE__ ) ); woo_refund_and_exchange_lite_constants( 'WOO_REFUND_AND_EXCHANGE_LITE_SERVER_URL', 'https://wpswings.com' );