Plugin Directory

Changeset 3446170


Ignore:
Timestamp:
01/24/2026 03:14:38 PM (4 weeks ago)
Author:
cyferweb
Message:

fix: Improvements, bugs and compatibility

Location:
cyfer-automatic-discount-per-payment-method
Files:
34 added
9 edited

Legend:

Unmodified
Added
Removed
  • cyfer-automatic-discount-per-payment-method/trunk/CHANGELOG.md

    r3336665 r3446170  
    11# Changelog - Cyfer Desconto Automático por Método de Pagamento
    22
    3 ## [1.0.0] - Lançamento Inicial
     3## [1.0.1] - Improvements and Compatibility
     4* Compatibility with HPOS
     5* Compatibility with WordPress 6.9
     6* Compatibility with WooCommerce 10
     7* Bug fixes
    48
    5 ### Adicionado
    6 - Desconto automático por método de pagamento
    7 - Interface administrativa completa
    8 - Configuração de percentual de desconto
    9 - Exclusão de categorias
    10 - Opção para ignorar com cupom
    11 - Texto personalizado para desconto
     9## [1.0.0] - Initial Release
     10* Desconto automático por método de pagamento
     11* Interface administrativa completa
     12* Configuração de percentual de desconto
     13* Exclusão de categorias
     14* Opção para ignorar com cupom
     15* Texto personalizado para desconto
  • cyfer-automatic-discount-per-payment-method/trunk/admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php

    r3336665 r3446170  
    9797            $this->version,
    9898            false
     99        );
     100
     101        // Localiza strings traduzidas para JavaScript
     102        wp_localize_script(
     103            $this->plugin_name,
     104            'cyfer_desconto_admin_i18n',
     105            array(
     106                'select_categories_placeholder' => __('Select excluded categories', 'cyfer-automatic-discount-per-payment-method'),
     107                'no_categories_found' => __('No categories found', 'cyfer-automatic-discount-per-payment-method'),
     108                'discount_percentage_description' => __('Define the discount percentage that will be applied when the selected payment method is used.', 'cyfer-automatic-discount-per-payment-method'),
     109                'payment_methods_description' => __('Select which payment methods should grant the automatic discount.', 'cyfer-automatic-discount-per-payment-method'),
     110                'excluded_categories_description' => __('Select the product categories that should NOT receive the automatic discount.', 'cyfer-automatic-discount-per-payment-method'),
     111                'ignore_with_coupon_description' => __('If checked, the automatic discount will not be applied when there is a discount coupon in the cart.', 'cyfer-automatic-discount-per-payment-method'),
     112            )
    99113        );
    100114    }
  • cyfer-automatic-discount-per-payment-method/trunk/admin/css/cyfer-desconto-automatico-por-metodo-de-pagamento-admin.css

    r3336665 r3446170  
    123123    border: 1px solid #ddd;
    124124    border-radius: 3px;
    125     padding: 2px 6px;
     125    padding: 0px 26px;
    126126}
    127127
  • cyfer-automatic-discount-per-payment-method/trunk/admin/js/cyfer-desconto-automatico-por-metodo-de-pagamento-admin.js

    r3336665 r3446170  
    33    $('.wrap-cyfer-desconto-automatico-por-metodo-de-pagamento form').addClass('cyfer_desconto-settings-wrap');
    44
     5    // Obtém strings traduzidas (fallback para strings padrão se não disponível)
     6    var i18n = (typeof cyfer_desconto_admin_i18n !== 'undefined') ? cyfer_desconto_admin_i18n : {
     7        select_categories_placeholder: 'Select excluded categories',
     8        no_categories_found: 'No categories found',
     9        discount_percentage_description: 'Define the discount percentage that will be applied when the selected payment method is used.',
     10        payment_methods_description: 'Select which payment methods should grant the automatic discount.',
     11        excluded_categories_description: 'Select the product categories that should NOT receive the automatic discount.',
     12        ignore_with_coupon_description: 'If checked, the automatic discount will not be applied when there is a discount coupon in the cart.'
     13    };
     14
    515    // Inicializa o Select2 para seleção de categorias
    616    $('.cyfer_desconto-categories-select').select2({
    717        width: '100%',
    8         placeholder: 'Selecione as categorias excluídas',
     18        placeholder: i18n.select_categories_placeholder,
    919        allowClear: true,
    1020        language: {
    1121            noResults: function() {
    12                 return "Nenhuma categoria encontrada";
     22                return i18n.no_categories_found;
    1323            }
    1424        }
     
    1828    $('input[name="cyfer_desconto_settings[discount_percentage]"]').after(
    1929        '<p class="description">' +
    20         'Defina o percentual de desconto que será aplicado quando o método de pagamento selecionado for utilizado.' +
     30        i18n.discount_percentage_description +
    2131        '</p>'
    2232    );
     
    2434    $('input[name="cyfer_desconto_settings[payment_methods][]"]').first().closest('td').append(
    2535        '<p class="description">' +
    26         'Selecione quais métodos de pagamento devem conceder o desconto automático.' +
     36        i18n.payment_methods_description +
    2737        '</p>'
    2838    );
     
    3040    $('.cyfer_desconto-categories-select').after(
    3141        '<p class="description">' +
    32         'Selecione as categorias de produtos que NÃO devem receber o desconto automático.' +
     42        i18n.excluded_categories_description +
    3343        '</p>'
    3444    );
     
    3646    $('input[name="cyfer_desconto_settings[ignore_with_coupon]"]').after(
    3747        '<p class="description">' +
    38         'Se marcado, o desconto automático não será aplicado quando houver um cupom de desconto no carrinho.' +
     48        i18n.ignore_with_coupon_description +
    3949        '</p>'
    4050    );
  • cyfer-automatic-discount-per-payment-method/trunk/admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-donate.php

    r3336665 r3446170  
    4242        <p><?php esc_html_e('Rate the plugin with 5 stars and help the project grow!', 'cyfer-automatic-discount-per-payment-method'); ?></p>
    4343        <div class="spd-button-group">
    44             <a href="https://wordpress.org/support/plugin/cyfer-desconto-automatico-por-metodo-de-pagamento/reviews/" target="_blank" class="button">⭐ <?php esc_html_e('Rate Plugin', 'cyfer-automatic-discount-per-payment-method'); ?></a>
     44            <a href="https://wordpress.org/support/plugin/cyfer-automatic-discount-per-payment-method/reviews/#new-post" target="_blank" class="button">⭐ <?php esc_html_e('Rate Plugin', 'cyfer-automatic-discount-per-payment-method'); ?></a>
    4545            <a href="https://github.com/fernandocyfer/automatic-discount-pp-method" target="_blank" class="button">🌐 <?php esc_html_e('Visit GitHub', 'cyfer-automatic-discount-per-payment-method'); ?></a>
    4646        </div>
  • cyfer-automatic-discount-per-payment-method/trunk/admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php

    r3336665 r3446170  
    3232        <h3>💎 <?php esc_html_e('Priority Support', 'cyfer-automatic-discount-per-payment-method'); ?></h3>
    3333        <p><?php esc_html_e('Get faster response times and dedicated support by contributing to the project.', 'cyfer-automatic-discount-per-payment-method'); ?></p>
    34         <a href="?page=<?php echo esc_attr($this->plugin_name); ?>&tab=donate" class="button button-primary"><?php esc_html_e('Support Development', 'cyfer-automatic-discount-per-payment-method'); ?></a>
     34        <a href="https://buymeacoffee.com/cyfer" target="_blank" class="button button-primary"><?php esc_html_e('Support Development', 'cyfer-automatic-discount-per-payment-method'); ?></a>
    3535    </div>
    3636
  • cyfer-automatic-discount-per-payment-method/trunk/cyfer-automatic-discount-per-payment-method.php

    r3336665 r3446170  
    33 *
    44 * @link              https://github.com/fernandocyfer/Dynamic-Payment-Discounts
    5  * @since             1.0.0
     5 * @since             1.0.1
    66 * @package           Cyfer_Desconto_Automatico_Por_Metodo_De_Pagamento
    77 *
     
    1010 * Plugin URI:        https://github.com/fernandocyfer/Dynamic-Payment-Discounts
    1111 * Description:       Aplica descontos automáticos baseados no método de pagamento selecionado no WooCommerce.
    12  * Version:           1.0.0
     12 * Version:           1.0.1
    1313 * Author:            Cyfer Development
    1414 * Author URI:        https://www.cyfer.com.br/
     
    2121 * Requires PHP:      7.0
    2222 * WC requires at least: 5.0
    23  * WC tested up to:   8.0
     23 * WC tested up to:   10.0
    2424 */
    2525
     
    3232 * Currently plugin version.
    3333 */
    34 define('CYFER_DESCONTO_AUTOMATICO_POR_METODO_DE_PAGAMENTO_VERSION', '1.0.0');
     34define('CYFER_DESCONTO_AUTOMATICO_POR_METODO_DE_PAGAMENTO_VERSION', '1.0.1');
    3535define('CYFER_DESCONTO_AUTOMATICO_POR_METODO_DE_PAGAMENTO_PLUGIN_FILE', __FILE__ );
    3636define('CYFER_DESCONTO_AUTOMATICO_POR_METODO_DE_PAGAMENTO_PLUGIN_DIR', plugin_dir_path(__FILE__));
     
    7070}
    7171
     72// Declara compatibilidade com High-Performance Order Storage (HPOS)
     73add_action( 'before_woocommerce_init', function() {
     74    if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
     75        \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     76    }
     77} );
     78
    7279// Verifica se o WooCommerce está ativo
    7380function cyfer_desconto_check_woocommerce() {
  • cyfer-automatic-discount-per-payment-method/trunk/languages/cyfer-automatic-discount-per-payment-method-pt_BR.po

    r3336665 r3446170  
    187187msgstr "Obtenha tempos de resposta mais rápidos e suporte dedicado contribuindo para o projeto."
    188188
    189 #: cyfer-desconto-automatico-por-metodo-de-pagamento.php:84
    190 msgid "Cyfer Desconto Automático requer o WooCommerce ativo para funcionar."
     189#: cyfer-automatic-discount-per-payment-method.php:95
     190msgid "Cyfer Automatic Discount requires WooCommerce to be active to work."
    191191msgstr "Cyfer Desconto Automático requer o WooCommerce ativo para funcionar."
    192192
     
    197197#: public/class-cyfer-desconto-automatico-por-metodo-de-pagamento-public.php:130
    198198msgid "Discount %s%%"
    199 msgstr "Desconto %s%%"
     199msgstr "Desconto %s%%"
     200
     201#: admin/js/cyfer-desconto-automatico-por-metodo-de-pagamento-admin.js
     202msgid "Select excluded categories"
     203msgstr "Selecione as categorias excluídas"
     204
     205#: admin/js/cyfer-desconto-automatico-por-metodo-de-pagamento-admin.js
     206msgid "No categories found"
     207msgstr "Nenhuma categoria encontrada"
     208
     209#: admin/js/cyfer-desconto-automatico-por-metodo-de-pagamento-admin.js
     210msgid "Define the discount percentage that will be applied when the selected payment method is used."
     211msgstr "Defina o percentual de desconto que será aplicado quando o método de pagamento selecionado for utilizado."
     212
     213#: admin/js/cyfer-desconto-automatico-por-metodo-de-pagamento-admin.js
     214msgid "Select which payment methods should grant the automatic discount."
     215msgstr "Selecione quais métodos de pagamento devem conceder o desconto automático."
     216
     217#: admin/js/cyfer-desconto-automatico-por-metodo-de-pagamento-admin.js
     218msgid "Select the product categories that should NOT receive the automatic discount."
     219msgstr "Selecione as categorias de produtos que NÃO devem receber o desconto automático."
     220
     221#: admin/js/cyfer-desconto-automatico-por-metodo-de-pagamento-admin.js
     222msgid "If checked, the automatic discount will not be applied when there is a discount coupon in the cart."
     223msgstr "Se marcado, o desconto automático não será aplicado quando houver um cupom de desconto no carrinho."
     224
     225#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-display.php
     226msgid "Salvar Alterações"
     227msgstr "Salvar Alterações"
     228
     229#: admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php
     230msgid "Automatic Discount Per Payment Method"
     231msgstr "Desconto Automático por Método de Pagamento"
     232
     233#: admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php
     234msgid "Smart discounts based on payment method."
     235msgstr "Descontos inteligentes baseados no método de pagamento."
     236
     237#: admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php
     238msgid "General Settings"
     239msgstr "Configurações Gerais"
     240
     241#: admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php
     242msgid "Enable Plugin"
     243msgstr "Ativar Plugin"
     244
     245#: admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php
     246msgid "Discount Percentage (%)"
     247msgstr "Percentual de Desconto (%)"
     248
     249#: admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php
     250msgid "Payment Methods"
     251msgstr "Métodos de Pagamento"
     252
     253#: admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php
     254msgid "Excluded Categories"
     255msgstr "Categorias Excluídas"
     256
     257#: admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php
     258msgid "Ignore with Coupon"
     259msgstr "Ignorar com Cupom"
     260
     261#: admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php
     262msgid "Discount Text"
     263msgstr "Texto do Desconto"
     264
     265#: admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php
     266msgid "Settings"
     267msgstr "Configurações"
     268
     269#: admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php
     270msgid "Help"
     271msgstr "Ajuda"
     272
     273#: admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php
     274msgid "Support"
     275msgstr "Apoiar"
     276
     277#: admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php
     278msgid "Configure the Automatic Discount Per Payment Method options."
     279msgstr "Configure as opções do Desconto Automático por Método de Pagamento."
     280
     281#: admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php
     282msgid "Enable plugin"
     283msgstr "Ativar plugin"
     284
     285#: admin/class-cyfer-desconto-automatico-por-metodo-de-pagamento-admin.php
     286msgid "Customize the text that appears in the cart. Use %s% for the discount percentage."
     287msgstr "Personalize o texto que aparece no carrinho. Use %s% para o percentual de desconto."
     288
     289#: public/class-cyfer-desconto-automatico-por-metodo-de-pagamento-public.php
     290msgid "WooCommerce is not available"
     291msgstr "WooCommerce não está disponível"
     292
     293#: public/class-cyfer-desconto-automatico-por-metodo-de-pagamento-public.php
     294msgid "Payment method not provided"
     295msgstr "Método de pagamento não fornecido"
     296
     297#: public/class-cyfer-desconto-automatico-por-metodo-de-pagamento-public.php
     298msgid "Invalid payment method"
     299msgstr "Método de pagamento inválido"
     300
     301#: public/class-cyfer-desconto-automatico-por-metodo-de-pagamento-public.php
     302msgid "Internal error: "
     303msgstr "Erro interno: "
     304
     305#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-donate.php
     306msgid "Thank you for using Automatic Discount!"
     307msgstr "Obrigado por usar o Desconto Automático!"
     308
     309#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-donate.php
     310msgid "You now have access to all the free plugin features to customize discounts by payment method."
     311msgstr "Você agora tem acesso a todos os recursos gratuitos do plugin para personalizar descontos por método de pagamento."
     312
     313#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-donate.php
     314msgid "Payment Discounts"
     315msgstr "Descontos por Pagamento"
     316
     317#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-donate.php
     318msgid "Configure automatic discounts based on the payment method chosen by the customer."
     319msgstr "Configure descontos automáticos baseados no método de pagamento escolhido pelo cliente."
     320
     321#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-donate.php
     322msgid "If you find this plugin useful, consider supporting its development:"
     323msgstr "Se você achar este plugin útil, considere apoiar seu desenvolvimento:"
     324
     325#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-donate.php
     326msgid "Priority support"
     327msgstr "Suporte prioritário"
     328
     329#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-donate.php
     330msgid "Early access to updates"
     331msgstr "Acesso antecipado a atualizações"
     332
     333#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-donate.php
     334msgid "Feature requests"
     335msgstr "Solicitações de recursos"
     336
     337#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-donate.php
     338msgid "Help Us Grow"
     339msgstr "Ajude-nos a Crescer"
     340
     341#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-donate.php
     342msgid "Rate the plugin with 5 stars and help the project grow!"
     343msgstr "Avalie o plugin com 5 estrelas e ajude o projeto a crescer!"
     344
     345#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-donate.php
     346msgid "Rate Plugin"
     347msgstr "Avaliar Plugin"
     348
     349#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-donate.php
     350msgid "Visit GitHub"
     351msgstr "Visitar GitHub"
     352
     353#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-donate.php
     354msgid "Developed with %1$s by %2$s"
     355msgstr "Desenvolvido com %1$s por %2$s"
     356
     357#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     358msgid "Help and Support"
     359msgstr "Ajuda e Suporte"
     360
     361#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     362msgid "Find answers to your questions and get specialized support."
     363msgstr "Encontre respostas para suas perguntas e obtenha suporte especializado."
     364
     365#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     366msgid "Documentation"
     367msgstr "Documentação"
     368
     369#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     370msgid "Learn how to configure and use the plugin effectively."
     371msgstr "Aprenda como configurar e usar o plugin de forma eficaz."
     372
     373#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     374msgid "View Documentation"
     375msgstr "Ver Documentação"
     376
     377#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     378msgid "Report Issues"
     379msgstr "Reportar Problemas"
     380
     381#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     382msgid "Found a bug or have a suggestion? Let us know!"
     383msgstr "Encontrou um bug ou tem uma sugestão? Nos avise!"
     384
     385#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     386msgid "Report Issue"
     387msgstr "Reportar Problema"
     388
     389#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     390msgid "Get faster response times and dedicated support by contributing to the project."
     391msgstr "Obtenha tempos de resposta mais rápidos e suporte dedicado contribuindo para o projeto."
     392
     393#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     394msgid "Frequently Asked Questions"
     395msgstr "Perguntas Frequentes"
     396
     397#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     398msgid "Does the plugin work with all payment methods?"
     399msgstr "O plugin funciona com todos os métodos de pagamento?"
     400
     401#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     402msgid "Yes, the plugin works with all active payment methods in your WooCommerce store."
     403msgstr "Sim, o plugin funciona com todos os métodos de pagamento ativos em sua loja WooCommerce."
     404
     405#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     406msgid "Can I exclude categories from the discount?"
     407msgstr "Posso excluir categorias do desconto?"
     408
     409#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     410msgid "Does the discount work with coupons?"
     411msgstr "O desconto funciona com cupons?"
     412
     413#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     414msgid "By default, the discount is ignored when a coupon is applied. You can change this in the plugin settings."
     415msgstr "Por padrão, o desconto é ignorado quando um cupom é aplicado. Você pode alterar isso nas configurações do plugin."
     416
     417#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     418msgid "Is the plugin compatible with the latest WordPress version?"
     419msgstr "O plugin é compatível com a versão mais recente do WordPress?"
     420
     421#: admin/partials/cyfer-desconto-automatico-por-metodo-de-pagamento-support.php
     422msgid "Yes, the plugin is tested and compatible with the latest versions of WordPress and WooCommerce."
     423msgstr "Sim, o plugin é testado e compatível com as versões mais recentes do WordPress e WooCommerce."
  • cyfer-automatic-discount-per-payment-method/trunk/readme.txt

    r3336665 r3446170  
    44Tags: payment, discount, payment method, discount per payment, woocommerce
    55Requires at least: 5.0
    6 Tested up to: 6.8
     6Tested up to: 6.9
    77Requires PHP: 7.0
    8 Stable tag: 1.0.0
     8Stable tag: 1.0.1
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.