Skip to content

Commit

Permalink
feat: Add compatibility with woocommerce blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuellopess committed Apr 17, 2024
1 parent 1767f31 commit 4386625
Show file tree
Hide file tree
Showing 520 changed files with 77,699 additions and 31,103 deletions.
13 changes: 3 additions & 10 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,11 @@ charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[{*.yml,*.neon,*.js}]
indent_style = space
indent_size = 2

[{composer.json,composer.lock,package.json}]
indent_style = space
indent_size = 4

[{*.yml,*.neon,*.js,*.css}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[readme.txt]
indent_style = space
14 changes: 9 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
node_modules
.DS_Store
.vscode/settings.json
.idea
.idea/
.phpunit.result.cache

clover.xml
coverage

/.idea/
/.vscode/
/vendor/
/node_modules/

woocommerce-mercadopago.zip
.devcontainer/devcontainer.json
4 changes: 2 additions & 2 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules
vendor
**/*.min.js
node_modules
**/*.min.js
6 changes: 3 additions & 3 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"boss": true,
"boss": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
Expand All @@ -11,7 +11,7 @@
"trailing": true,
"undef": true,
"unused": true,
"esversion": 6,
"esversion": 11,
"browser": true,
"globals": {
"_": false,
Expand All @@ -22,4 +22,4 @@
"console": false,
"module": false
}
}
}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
# Websec hook is MANDATORY, DO NOT comment it.
- repo: https://github.com/mercadolibre/fury_websec-git-hooks
- repo: https://github.com/melisource/fury_websec-git-hooks
rev: v1.0.5
hooks:
- id: pre_commit_hook
Expand Down
19 changes: 19 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "ignore",
"insertPragma": false,
"jsxSingleQuote": false,
"printWidth": 120,
"proseWrap": "always",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false,
"vueIndentScriptAndStyle": false,
"embeddedLanguageFormatting": "off"
}
184 changes: 159 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,147 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.9.3] - 2023-08-10
## [7.3.5] - 2024-04-17
### Fixed:
- Checked field on checkout now validated.
- Rollback SDK dependency.

## [7.3.4] - 2024-04-15
### Fixed:
- Thankyou page redirect for PIX and Ticket Payments working again.
- Prevents type error on checkout screen due to amount values.
- Removed console error message when custom checkout is not enabled.

## [7.3.3] - 2024-04-11
### Changed:
- Our latest plugin update (version 7.3.2) aimed to optimize script loading during checkout using the woocommerce_before_checkout_form and woocommerce_blocks_enqueue_checkout_block_scripts_before hooks. However, to ensure compatibility with a wider range of themes, this functionality has been temporarily disabled. We're actively exploring solutions to achieve optimal script loading across all themes and will implement them in a future update.

## [7.3.2] - 2024-04-11
### Added:
- Added session_id to payment creation request header to improve approval rates.

### Changed:
- Checkout Credits component text has been adjusted.

### Fixed:
- Checkout scripts now load only at checkout time, improving overall store performance.
- Partial refunds made through Mercado Pago are now correctly recognized as partial refunds on the platform.
- The IP address issue for some PSE checkout payments in Colombia has been fixed.
- 3DS flow requests for stores running in a directory now work correctly and stores using the domain root still working.
- The Undefined Array Key Method error that occurred for some sellers when they had not configured the checkout pro method (modal or redirect) has been fixed.
- The pix copy-paste button has been fixed.

### Other improvements:
- General code improvements and optimizations.
- Updated dependencies (PHP SDK).

## [7.3.1] - 2024-03-25
### Changed
- Person type update for PSE
- Improve the layout of the admin buttons
- Adjusting the translation of checkout pro for Spanish-speaking countries

## [7.3.0] - 2024-03-20
### Added
- A warning has been added to inform you that activation was successful and that you now need to enter your credentials when activating plugins.
- We have implemented new display rules and improved the layout of the component that requests ratings for the plugin.
- We've added a link to frequently asked questions at the end of each gateway's configuration.
- We've implemented a new support component at the bottom of the plugin's configuration screen. Here you will find information on how to open a ticket.
### Changed
- We've changed the layout of the notice for filling in credentials.
- We've changed the title of the plugin on the administration screen.
- The payment methods have been renamed and are now sorted according to country.
- We have made adjustments to the hierarchy of titles on the administration screen, as well as to its content, including titles and supplementary texts.
- For step 1, we have replaced the secondary credential query button with a text-link.
### Fixed
- We've solve the problem when the getPaymentMethodsByGatewayOption function returned an stdClass instead of an array when using json_decode.

## [7.2.1] - 2024-02-15
### Added
- We have added a warning banner for when the language configured in worpress does not have the translation in our plugin.
### Changed
- Improvements have been made to the readme and changelog files so that the markdown makes more sense to our users.
- Now our plugin constructs the URLs for the assets using the absolute path instead of the relative path.
- Prevent block scripts from loading on admin screens and do not load block scripts in checkouts that do not use Checkout Blocks.
- We've reduced the size of the metadata sent in the payment.
### Fixed
- We've fixed the currency conversion calculation.

## [7.2.0] - 2024-02-01
### Added
- Introducing Mercado PSE as a new payment method for our users in Colombia.
- Enhanced user experience with the inclusion of informative error messages in case of payment rejection.
### Changed
- Improved layout of the button for consulting reasons for refusal on the order details screen
### Fixed
- Addressed an issue where error messages were not displaying during the submission process, affecting custom, credit, and ticket transactions. Now, users can expect a smoother and more transparent payment experience.
- Error message did not appear in submit, custom credit and ticket.
- Enables the sending of alphanumeric data to the field, holder's document.

## [7.1.1] - 2024-01-15
### Fixed
- Resolved issue where the cart inaccurately displayed discount and commission information.
- Addressed TypeError occurring when attempting to open orders in the admin panel.

## [7.1.0] - 2024-01-11
### Added
- Added compatibility with Woocommerce Blocks, providing a seamless integration for an enriched user experience. Explore the possibilities with [WooCommerce Blocks Documentation](https://woo.com/document/woocommerce-blocks/) for detailed information and advanced features.
### Fixed:
- Resolved an issue preventing the modification of checkout names.
- Resolved an issue that prevented checkout pro in modal mode from working

## [7.0.6] - 2023-12-11
### Fixed
- Addressed a bug where the store discount code was erroneously applied twice. This fix ensures a smoother checkout experience by resolving the double discount issue.

## [7.0.5] - 2023-12-08
### Fixed
- Resolved issues related to discounts and commission calculations, ensuring accurate and reliable results.
- Resolved implementation of instance logs for Seller and Order classes, providing comprehensive tracking and transparency into their respective functionalities.

### Changed
- Enhanced the return value of Metadata getSettings for improved clarity and usability.
- Improved validation of 3D Secure (3DS) fields to facilitate smoother payment processing.
- Conducted a comprehensive review and refinement of checkout items calculation methods to optimize performance and accuracy.

## [7.0.4] - 2023-12-06
### Changed
- Enhanced the notification_url for improved functionality.
- Improved the sanitization of checkout URLs for a more secure experience.
- Updated the initial hook from wc_loaded to plugins_loaded for better integration.

### Fixed
- Ensured the consistent rendering of Pix QR codes on the thank-you page.
- Removed unnecessary sanitization from get_checkout_order_received_url for smoother processing.

## [7.0.3] - 2023-12-05
### Fixed
- Addressed and resolved the issue with Checkout PRO Modal dependency loading for improved efficiency and smoother functionality.

## [7.0.2] - 2023-12-05
### Fixed
- Credits are now enabled by default, streamlining the search for available countries.
- Resolved status sync rendering issues, ensuring seamless compatibility.

## [7.0.1] - 2023-12-05
### Fixed
- Corrected the issue related to shipping rate values not displaying correctly on transparent checkouts. Now, the accurate shipping rates will be transparently presented for a more seamless checkout experience.

## [7.0.0] - 2023-12-04
### Changed
- Conducted a comprehensive overhaul of the entire plugin, implementing full refactoring for improved code quality and maintainability. Our code has fewer branches, which increases maintainability. This refactoring is designed to improve the quality of feature releases and provide developer users with a greater understanding of the code.
- Elevated the functionality and user experience of the additional information node within the plugin by enriching the payment metadata with additional details, strategically aimed at boosting the payment approval rate.
### Fixed
- Consolidated logging behavior in STEP 2 by ensuring that logs are recorded only when the corresponding toggle in the admin( STEP 2 ) is activated. Previously, the plugin recorded logs irrespective of the toggle's status, but with this fix, the toggle now functions correctly.
### Added
- Integrating 3DS 2.0 (3-D Secure Authentication 2.0) technology. This advancement enables the authentication of transactions involving credit and debit cards in e-commerce scenarios, ensuring that the person making the purchase is genuinely the cardholder or has authorized access to the cardholder's accounts for completing the payment. To learn more about integrating 3DS with Mercado Pago, visit the [Mercado Pago DevSite](https://www.mercadopago.com.br/developers/pt/docs/checkout-api/how-tos/integrate-3ds).

## [6.9.3] - 2023-07-13
### Fixed
- Updated the link to obtain credentials on the developer site
- Resolved warning related to the missing return type of the function AbstractCollection::getIterator()
### Changed
- Improved default activation of Credits Gateway
- Removed sending of product details to Payment Gateway

## [6.9.2] - 2023-06-23
### Fixed
Expand Down Expand Up @@ -66,12 +200,12 @@ fix pix renderization

### Added
- Add new fields in update-metadata
- Cho Pro will add the fields: ```installments, transaction_details, total_paid_amount, transaction_amount, last_four_digits, e o payment_type```
- Cho Custom will add the fields: ```payment_type e last_four_digits```
- In future release, all metadata field prefixed with "mp_" will be removed
- Cho Pro will add the fields: ```installments, transaction_details, total_paid_amount, transaction_amount, last_four_digits, e o payment_type```
- Cho Custom will add the fields: ```payment_type e last_four_digits```
- In future release, all metadata field prefixed with "mp_" will be removed

- Add security js client and retrive session id from MP_DEVICE_SESSION_ID
- this improvement will increase the credit card approval rate
- Add security js client and retrive session id from MP_DEVICE_SESSION_ID
- this improvement will increase the credit card approval rate

### Changed
- Interest attached to the order total
Expand Down Expand Up @@ -589,27 +723,27 @@ fix pix renderization

- Updated plugin name from "WooCommerce Mercado Pago" to "Mercado Pago payments for WooCommerce".
- [PLUG-459]
- Fixed credential issue when the plugin is upgraded from version 3.x.x to 4xx. Unable to save empty credential.
- Fixed issue to validate credential when checkout is active. The same problem occurs when removing the enabled checkout credential.
- Fixed error: Undefined index: MLA in WC_WooMercadoPago_Credentials.php on line 163.
- Fixed error: Call to a member function analytics_save_settings() in WC_WooMercadoPago_Hook_Abstract.php on line 68. Has affected users that cleared the credential and filled new credential production.
- Fixed load of WC_WooMercadoPago_Module.php file.
- Fixed error Uncaught Error: Call to a member function homologValidate().
- Fixed error Undefined index: section in WC_WooMercadoPago_PaymentAbstract.php on line 303. Affected users who did not have homologous accounts
- Fixed issue to validate credential when checkout is active. The same problem occurs when removing the enabled checkout credential.
- Fixed issue to calculate commission and discount.
- Fixed issue on methadata.
- Fixed Layout of checkout custom input.
- Fixed translation of Modo Producción, Habilitá and definí
- Fixed credential issue when the plugin is upgraded from version 3.x.x to 4xx. Unable to save empty credential.
- Fixed issue to validate credential when checkout is active. The same problem occurs when removing the enabled checkout credential.
- Fixed error: Undefined index: MLA in WC_WooMercadoPago_Credentials.php on line 163.
- Fixed error: Call to a member function analytics_save_settings() in WC_WooMercadoPago_Hook_Abstract.php on line 68. Has affected users that cleared the credential and filled new credential production.
- Fixed load of WC_WooMercadoPago_Module.php file.
- Fixed error Uncaught Error: Call to a member function homologValidate().
- Fixed error Undefined index: section in WC_WooMercadoPago_PaymentAbstract.php on line 303. Affected users who did not have homologous accounts
- Fixed issue to validate credential when checkout is active. The same problem occurs when removing the enabled checkout credential.
- Fixed issue to calculate commission and discount.
- Fixed issue on methadata.
- Fixed Layout of checkout custom input.
- Fixed translation of Modo Producción, Habilitá and definí
- [PLUG-459-2] Refactored Javascript code for custom checkout Debit and credit card. Performance improvement, reduced number of SDK calls. Fixed validation errors. Javascript code refactored to the order review page. Removed select from mexico payment method.
- [PLUG-462]
- Fixed Uncaught Error call to a member function update_status() in WC_WooMercadoPago_Notification_Abstract.php. Handle Mercado Pago Notification Failures and Exceptions.
- Fixed Uncaught Error call to a member function update_status() in WC_WooMercadoPago_Notification_Abstract.php. Handle Mercado Pago Notification Failures and Exceptions.
- Fixed Uncaught Error call to a member function update_status() in WC_WooMercadoPago_Notification_Abstract.php. Handle Mercado Pago Notification Failures and Exceptions.
- Fixed Uncaught Error call to a member function update_status() in WC_WooMercadoPago_Notification_Abstract.php. Handle Mercado Pago Notification Failures and Exceptions.
- [PLUG-463]
- Remove Mercado Creditos from Custom CHO OFF.
- Fix PT-BR debit card translation on admin.
- Fix PT-BR debit card translation on checkout.
- Remove "One Step Checkout" from CHO Custom Off.
- Remove Mercado Creditos from Custom CHO OFF.
- Fix PT-BR debit card translation on admin.
- Fix PT-BR debit card translation on checkout.
- Remove "One Step Checkout" from CHO Custom Off.
- [PLUG-466] Removed feature and support to Mercado Envios shipping. Before install the plugin verify if your store has another method of shipping configured.
- [PLUG-470] Fixed issue to check if WooCommerce plugin is installed
- [PLUG-455] Curl Validation.
Expand Down
Loading

0 comments on commit 4386625

Please sign in to comment.