Skip to content

Commit

Permalink
Release v6.5.0 (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
GiovanniCavallari authored Dec 22, 2022
1 parent 84c8c52 commit 04aeb7d
Show file tree
Hide file tree
Showing 77 changed files with 9,355 additions and 6,452 deletions.
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:
# Websec hook is MANDATORY, DO NOT comment it.
- repo: https://github.com/mercadolibre/fury_websec-git-hooks
rev: v1.0.5
hooks:
- id: pre_commit_hook
stages: [commit]
- id: post_commit_hook
stages: [post-commit]
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ 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.5.0] - 2022-12-22

### Added
- Added Mercado Credits payment method
- Added user permissions needed (administrator or editor) for security

### Changed
- Documented use of a 3rd Party or external service
- Improved Checkout Pro layout

### Fixed
- Removed nonce validation from checkouts to use WC nonce validation

## [6.4.1] - 2022-12-14

### Added
Expand Down
58 changes: 58 additions & 0 deletions assets/css/credits/example-info.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,21 @@
border-radius: 8px;
font-family: Proxima Nova, Helvetica Neue, Helvetica, Arial, sans-serif;
color: #646970;
}

.credits-info-preview-container {
display: flex;
justify-content: flex-start;
padding: 24px;
flex-direction: row;
align-items: flex-start;
max-width: 512px;
max-height: 742px;
background: #FFFFFF;
box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.1);
border-radius: 8px;
font-family: Proxima Nova, Helvetica Neue, Helvetica, Arial, sans-serif;
color: #646970;
}

.credits-info-example-buttons-container {
Expand Down Expand Up @@ -53,6 +67,28 @@
width: 20px;
}

.credits-info-example-image-container {
width: 100%;
height: auto;
display: flex;
flex-direction: column;
margin: 0;
}

.credits-info-example-image {
display: flex;
align-items: center;
justify-content: center;
height: auto;
background: #F5F5F5;
border-radius: 6px;
flex-direction: column;
flex: auto;
max-height: 480px;
padding: 30px;
margin: 0 60px;
}

.credits-info-example-gif-container {
width: 100%;
height: auto;
Expand All @@ -75,6 +111,7 @@
padding: 30px;
}

.credits-info-example-image>img,
.credits-info-example-gif>img {
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -136,11 +173,31 @@
padding: 20px 0 30px;
}

.credits-info-example-preview-pill {
padding: 3px 8px 2px;
background-color: rgba(71, 154, 209, 0.1);
border: none;
color: rgba(0, 158, 227, 1);
text-align: center;
text-decoration: none;
display: inline-block;
margin: 4px 2px;
border-radius: 46px;
width: fit-content;
align-self: flex-end;
margin: 0 0 24px 0 !important;
}

.credits-info-example-preview-footer {
padding: 20px 0 0 0;
}

@media screen and (max-width: 768px) {
.credits-info-example-container {
max-height: 720px;
}

.credits-info-example-image-container,
.credits-info-example-gif-container {
margin: 0;
padding: 0;
Expand All @@ -157,6 +214,7 @@
margin-bottom: 16px;
}

.credits-info-preview-container,
.credits-info-example-container {
display: flex;
padding: 24px;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/credits/example-info.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/mp-plugins-components.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/mp-plugins-components.min.css

Large diffs are not rendered by default.

Binary file added assets/images/blue-phone-installments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/blue-phone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/blue-protection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/blue-wallet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/cho-pro-redirect-v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/credits/MLA_checkout_preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/credits/MLB_checkout_preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/credits/MLM_checkout_preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/credits/checkout_preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
113 changes: 113 additions & 0 deletions assets/js/credits_config_mercadopago.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/*jshint multistr: true */

const payment_mercado_pago_basic = {
initScreen: function () {
if (!this.hasConfigurations()) {
this.removeElements();
return;
}
this.setInputMaxLength();
this.setTitleDescriptionStyle();
this.setHide();
this.makeCollapsibleAdvancedConfig();
},
hasConfigurations: function () {
const settings_table = document.querySelector("table.form-table");
return settings_table.hasChildNodes();
},
removeElements: function () {
const settings_table = document.querySelector("table.form-table");
settings_table.previousElementSibling.remove();
settings_table.previousElementSibling.remove();
settings_table.nextElementSibling.remove();
},
setTitleDescriptionStyle: function () {
//update form_fields label
var label = document.querySelectorAll("th.titledesc");
for (var j = 0; j < label.length; j++) {
label[j].id = "mp_field_text";
if (
label[j] &&
label[j].children[0] &&
label[j].children[0].children[0]
) {
label[j].children[0].children[0].style.position = "relative";
label[j].children[0].children[0].style.fontSize = "22px";
}
}
},
setInputMaxLength: function () {
// Add max length to title input
let titleInput = document.querySelectorAll(".limit-title-max-length");
titleInput.forEach((element) => {
element.setAttribute("maxlength", "65");
});
},
setHide: function () {
document.querySelector(".wc-admin-breadcrumb").style.display = "none";
if (document.querySelector(".mp-header-logo") !== null) {
document.querySelector(".mp-header-logo").style.display = "none";
} else {
var pElement = document.querySelectorAll("#mainform > p");
pElement[0] !== undefined ? (pElement[0].style.display = "none") : null;
}

var h2s = document.querySelectorAll("h2");
h2s[4] !== undefined ? (h2s[4].style.display = "none") : null;

document.querySelectorAll(".hidden-field-mp-desc").forEach((element) => {
element.closest("tr").style.display = "none";
});
},
makeCollapsibleOptions: function (id_plus, id_less) {
return (
'<span class="mp-btn-collapsible" id="' +
id_plus +
'" style="display:block">+</span>\
<span class="mp-btn-collapsible" id="' +
id_less +
'" style="display:none">-</span>'
);
},
makeCollapsibleAdvancedConfig: function () {
//collpase Configuración Avanzada
var collapse_title_2 = document.querySelector(
"#woocommerce_woo-mercado-pago-credits_checkout_payments_advanced_title"
);
var collapse_table_2 = document.querySelector(
"#woocommerce_woo-mercado-pago-credits_checkout_payments_advanced_description"
).nextElementSibling;
var collapse_description_2 = document.querySelector(
"#woocommerce_woo-mercado-pago-credits_checkout_payments_advanced_description"
);
collapse_table_2.style.display = "none";
collapse_description_2.style.display = "none";
collapse_title_2.style.cursor = "pointer";

collapse_title_2.innerHTML += this.makeCollapsibleOptions(
"header_plus_2",
"header_less_2"
);

var header_plus_2 = document.querySelector("#header_plus_2");
var header_less_2 = document.querySelector("#header_less_2");

collapse_title_2.onclick = function () {
if (collapse_table_2.style.display === "none") {
collapse_table_2.style.display = "block";
collapse_description_2.style.display = "block";
header_less_2.style.display = "block";
header_plus_2.style.display = "none";
} else {
collapse_table_2.style.display = "none";
collapse_description_2.style.display = "none";
header_less_2.style.display = "none";
header_plus_2.style.display = "block";
}
};
},
};

window.addEventListener("load", function () {
payment_mercado_pago_basic.initScreen();
});
1 change: 1 addition & 0 deletions assets/js/credits_config_mercadopago.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/mp-plugins-components.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/mp-plugins-components.min.js

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions changelog.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
CHANGELOG:
== Changelog ==
= v6.5.0 (22/12/2022) =
* Features
- Added Mercado Credits payment method
- Added user permissions needed (administrator or editor) for security

* Changes
- Documented use of a 3rd Party or external service
- Improved Checkout Pro layout

* Bug fixes
- Removed nonce validation from checkouts to use WC nonce validation

= v6.4.1 (14/12/2022) =
* Features
- Added bank interest disclaimer
Expand Down
Binary file modified i18n/languages/woocommerce-mercadopago-es_AR.mo
Binary file not shown.
Loading

0 comments on commit 04aeb7d

Please sign in to comment.