Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
32 changes: 15 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,44 +28,42 @@ jobs:
dev: no

# Add plugin files to a root directory
- name: Make plugin root directory
run: "mkdir $PLUGIN_NAME && mv -t ./$PLUGIN_NAME ./Admin ./Includes ./resource *.php && cp -r ./vendor ./${{env.PLUGIN_NAME}}/vendor && find ./${{env.PLUGIN_NAME}} -type f -exec chmod 0644 {} + && find ./${{env.PLUGIN_NAME}} -type d -exec chmod 0755 {} + && ls -lah"
- name: Prepare plugin folder
run: |
mkdir -p dist
mkdir -p build
mv ./Admin ./Includes ./resource *.php *.txt ./build
cp -r vendor build/vendor
find ./build -type f -exec chmod 0644 {} +
find ./build -type d -exec chmod 0755 {} +

# Compact plugin as .zip
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
type: 'zip'
path: '${{ env.PLUGIN_NAME }}'
directory: '.'
path: '.'
directory: 'build'
filename: '${{ env.PLUGIN_NAME }}.zip'
exclusions: '*.git* /*node_modules/* .editorconfig'

# File upload to server
- name: Upload .zip to server
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-lptgoDz"
SOURCE: ./${{ env.PLUGIN_NAME }}.zip
EXLUDE: "/.git, /.github, LICENSE.txt, README.md, README.txt, /${{ env.PLUGIN_NAME }}"
REMOTE_HOST: ${{ secrets.SSH_HOST }}
REMOTE_USER: ${{ secrets.SSH_USER }}
TARGET: ${{secrets.DOWNLOAD_FOLDER}}${{ env.PLUGIN_NAME }}.zip
- name: Move .zip to custom location
run: |
mv ./build/${{ env.PLUGIN_NAME }}.zip ./dist/

# Update version tag
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: '3.1.0'
custom_tag: '3.1.1'

# Generate new release
- name: Generate new Release
uses: ncipollo/release-action@v1
with:
artifacts: "${{ env.PLUGIN_NAME }}.zip"
artifacts: "dist/${{ env.PLUGIN_NAME }}.zip"
token: ${{ secrets.GITHUB_TOKEN }}
commit: "main"
draft: true
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 3.1.1 - 23/04/2025
* Atualização do script Paypal.

# 3.1.0 - 12/03/2025
* Conversão de moeda durante o processamento de pagamento Paypal.

Expand Down
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,35 @@ Pronto! Você realizou sua primeira doação via plugin do multimoedas.

## Changelog

### 3.1.1 - 23/04/2025
* Atualização do script Paypal.

### 3.1.0 - 12/03/2025
* Conversão de moeda durante o processamento de pagamento Paypal.

### 3.0.3 - 29/11/2024
* Add new currency Swiss Franc(CHF)

### 3.0.2 - 26/09/2024
* Adição de tratamento para valores com decimal.

### 3.0.1 - 27/08/2024
* Correção e melhoria visual na exibição do plugin

### 3.0.0 - 16/08/2024
* Adição de suporte ao formulario GiveWP 3.0.0
* Correção de bugs
* Limpeza no código

### 2.7.0 - 13/06/2024
* Adição de suporte a peso mexicano;
* Adição de notificação para plugins instalados e inativos da Link Nacional.

### 2.6.0 - 23/12/2023
* Adição de changelogs;
* Adição de suporte a moeda Rial Saudito;
* Atualização de API de consulta de cotações.

### v2.5.2
- Atualização de endpoint de atualizações;
- Correção de notices de ativação do plugin;
Expand Down
25 changes: 13 additions & 12 deletions give-currency.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

/**
* Plugin Name: Give - Multi-Moedas
* Plugin URI: https://www.linknacional.com.br/wordpress/givewp/multimoeda/
* Description: Adiciona opções de escolha de moedas aos formulários do GiveWP.
* Version: 3.1.0
* Version: 3.1.1
* Author: Link Nacional
* Requires Plugins: give
* Author URI: https://www.linknacional.com.br
Expand All @@ -12,7 +13,7 @@
*/

// Exit if accessed directly. ABSPATH is attribute in wp-admin - plugin.php
if ( ! defined('ABSPATH')) {
if (! defined('ABSPATH')) {
exit;
}

Expand All @@ -21,37 +22,37 @@

use Lkn\GiveMultimoedas\Includes\GiveMultiCurrency;

if ( ! defined('GIVE_MULTI_CURRENCY_VERSION')) {
define('GIVE_MULTI_CURRENCY_VERSION', '3.1.0');
if (! defined('GIVE_MULTI_CURRENCY_VERSION')) {
define('GIVE_MULTI_CURRENCY_VERSION', '3.1.1');
}

// Set it to latest.
if ( ! defined('GIVE_MULTI_CURRENCY_MIN_GIVE_VERSION')) {
if (! defined('GIVE_MULTI_CURRENCY_MIN_GIVE_VERSION')) {
define('GIVE_MULTI_CURRENCY_MIN_GIVE_VERSION', '2.19.2');
}

if ( ! defined('GIVE_MULTI_CURRENCY_FILE')) {
if (! defined('GIVE_MULTI_CURRENCY_FILE')) {
define('GIVE_MULTI_CURRENCY_FILE', __FILE__);
}

if ( ! defined('GIVE_MULTI_CURRENCY_SLUG')) {
if (! defined('GIVE_MULTI_CURRENCY_SLUG')) {
define('GIVE_MULTI_CURRENCY_SLUG', 'give-multi-currency');
}

if ( ! defined('GIVE_MULTI_CURRENCY_DIR')) {
if (! defined('GIVE_MULTI_CURRENCY_DIR')) {
define('GIVE_MULTI_CURRENCY_DIR', plugin_dir_path(GIVE_MULTI_CURRENCY_FILE));
}

if ( ! defined('GIVE_MULTI_CURRENCY_URL')) {
if (! defined('GIVE_MULTI_CURRENCY_URL')) {
define('GIVE_MULTI_CURRENCY_URL', plugin_dir_url(GIVE_MULTI_CURRENCY_FILE));
}

if ( ! defined('GIVE_MULTI_CURRENCY_BASENAME')) {
if (! defined('GIVE_MULTI_CURRENCY_BASENAME')) {
define('GIVE_MULTI_CURRENCY_BASENAME', plugin_basename(GIVE_MULTI_CURRENCY_FILE));
}

function Give_Multi_Currency() {
function Give_Multi_Currency()
{
return new GiveMultiCurrency();
}
Give_Multi_Currency();

2 changes: 1 addition & 1 deletion resource/payPalCommerceGateway.js

Large diffs are not rendered by default.

Loading