Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4.0 Adicionando produtos com assinatura e novo método de pagamento #47

Merged
merged 26 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
78aae56
docs: Update README.txt with new stable WP version and stable 1.3.2
emanuellopess Mar 5, 2024
03d0987
refactor: Substitution of curl to wp_remote_request
GuilhermeLinkNacional Mar 19, 2024
6bdd825
docs: Updating README and CHANGELOG
GuilhermeLinkNacional Mar 19, 2024
84e0622
docs: Ajuste em CHANGELOG
GuilhermeLinkNacional Mar 19, 2024
8b5ab3c
feat: Adding MultiPayments option to payment options #21
GuilhermeLinkNacional Mar 20, 2024
2b86722
feat: Adding invoice share button (Incomplete) #28
GuilhermeLinkNacional Mar 20, 2024
d12ec25
feat: Adding modal to share invoice #28
GuilhermeLinkNacional Mar 21, 2024
68a452a
refactor: Removing facebook share button
GuilhermeLinkNacional Mar 21, 2024
d5b835d
feat: Adding subscription option to products (Incomplete) #23
GuilhermeLinkNacional Mar 22, 2024
d627fec
feat: Adding subscription option to products (Incomplete) #23
GuilhermeLinkNacional Mar 25, 2024
c938829
feat: Adding subscription option to products #23
GuilhermeLinkNacional Mar 26, 2024
e7e4a41
feat: Add page to display only subscription #23
GuilhermeLinkNacional Mar 26, 2024
678d110
refactor: Editing function to enable creation of invoice with product…
GuilhermeLinkNacional Mar 26, 2024
25848ec
feat: Add checkbox to create new product invoices
GuilhermeLinkNacional Mar 27, 2024
a4690e6
feat: feat: Adding button to cancel subscription #23
GuilhermeLinkNacional Mar 27, 2024
7983deb
refactor: Changing logic of button of cancel subscription #23
GuilhermeLinkNacional Mar 27, 2024
2b9084f
feat: Adding option to create subscription manually
GuilhermeLinkNacional Apr 1, 2024
db5042c
refactor: Changing variable escapes and removing errors
GuilhermeLinkNacional Apr 1, 2024
04a7d23
refactor: Changing variable escapes and adding nonce validation to re…
GuilhermeLinkNacional Apr 2, 2024
d8b1c80
refactor: Changing variable escapes and adding nonce validation to re…
GuilhermeLinkNacional Apr 3, 2024
c74b424
refactor: Changing variable escapes and adding nonce validation to re…
GuilhermeLinkNacional Apr 4, 2024
1168470
Refactoring: Removing unused functions
GuilhermeLinkNacional Apr 4, 2024
ef537c8
feat: Including changes to checkbox functionalities and subscription …
GuilhermeLinkNacional Apr 4, 2024
3200d4c
docs: Updating version
GuilhermeLinkNacional Apr 4, 2024
53f5312
refactor: Adding sanitization for variables
GuilhermeLinkNacional Apr 22, 2024
4c27046
docs: Updating CHANGELOG and README
GuilhermeLinkNacional Apr 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 1.4.0 - 04/04/2024
GuilhermeLinkNacional marked this conversation as resolved.
Show resolved Hide resolved
- Adjust escape variables and request methods to enhance security;
- Add modal for sharing invoice link;
- Add products with recurring subscriptions;
- Add multiple payment methods option.

### 1.3.2 - 14/02/2024
- Substitution of echo to esc_html_e or esc_attr_e, adjust to comply with wordpress regulations

Expand All @@ -15,7 +21,7 @@
- Adjust to get logo with curl, adjust to work in directory installed wordpress.

### 1.2.0 - 18/10/23
- Add PDF generation for invoices
- Add PDF generation for invoices.

### v1.1.4 - 07/06/23
- Fix invoices table error when the invoice order is deleted.
Expand Down
10 changes: 8 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: linknacional
Donate link: https://www.linknacional.com/wordpress/plugins/
Tags: woocommerce, invoice, payment
Requires at least: 5.7
Tested up to: 6.3
Stable tag: 1.3.1
Tested up to: 6.4
GuilhermeLinkNacional marked this conversation as resolved.
Show resolved Hide resolved
Stable tag: 1.4.0
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -64,6 +64,12 @@ The Invoice Payment for WooCommerce plugin is now live and working.

== Changelog ==

= 1.4.0 =
GuilhermeLinkNacional marked this conversation as resolved.
Show resolved Hide resolved
* Adjust escape variables and request methods to enhance security
* Add modal for sharing invoice link
* Add products with recurring subscriptions
* Add multiple payment methods option

= 1.3.2 =
* Substitution of echo to esc_html_e or esc_attr_e, adjust to comply with wordpress regulations

Expand Down
2,043 changes: 1,395 additions & 648 deletions admin/class-wc-invoice-payment-admin.php

Large diffs are not rendered by default.

13 changes: 11 additions & 2 deletions admin/class-wc-invoice-payment-pdf-templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,16 @@ public function __construct($plugin_name, $version) {
public function get_templates_list(): array {
$templates_json_paths = glob("{$this->templates_root_dir}/*/template.json");

return array_map(function (string $template_json_path): array {
$template_info = json_decode(file_get_contents($template_json_path));
WP_Filesystem();

// Verifica se o sistema de arquivos foi inicializado corretamente
global $wp_filesystem;
if (!$wp_filesystem) {
return array(); // Retorna um array vazio se não foi possível inicializar o sistema de arquivos
}

return array_map(function (string $template_json_path) use ($wp_filesystem): array {
$template_info = json_decode($wp_filesystem->get_contents($template_json_path));
$template_id = basename(dirname($template_json_path));
$template_preview_url = WC_PAYMENT_INVOICE_ROOT_URL . "includes/templates/$template_id/preview.webp";

Expand All @@ -66,4 +74,5 @@ public function get_templates_list(): array {
);
}, $templates_json_paths);
}

}
Loading