Plugin Directory

Changeset 3814289


Ignore:
Timestamp:
11/20/2026 06:18:49 PM (less than one hour ago)
Author:
paycryptome
Message:

Release 0.5.0

Location:
paycrypto-me-for-woocommerce/trunk
Files:
3 added
32 edited

Legend:

Unmodified
Added
Removed
  • paycrypto-me-for-woocommerce/trunk/CHANGELOG.md

    r3803918 r3814289  
    44All notable changes to this project are documented in this file.
    55
    6 ## Unreleased
    7 
    8 No changes yet.
     6## 0.5.0
     7
     8### Added
     9
     10- Add two site-wide Danger Area checkboxes for deleting native WooCommerce logs and local Bitcoin payment records on uninstall. Both default to preserving data.
     11- Document payment data flows, retention, uninstall choices and suggested privacy policy wording.
    912
    1013## 0.4.3
  • paycrypto-me-for-woocommerce/trunk/assets/paycrypto-me-admin.css

    r3803918 r3814289  
    8787    font-style: italic;
    8888}
     89.paycrypto-danger-area {
     90    max-width: 800px;
     91}
     92
     93.paycrypto-danger-area fieldset {
     94    margin: 0;
     95    padding: 0;
     96    border: 0;
     97}
     98
     99.paycrypto-danger-area .paycrypto-danger-box + fieldset {
     100    margin-top: 1.5em;
     101}
     102
     103.paycrypto-danger-area legend {
     104    padding: 0;
     105    font-weight: 600;
     106}
     107
     108.paycrypto-danger-area .description {
     109    margin-inline-start: 0;
     110}
  • paycrypto-me-for-woocommerce/trunk/composer.json

    r3803918 r3814289  
    1616        }
    1717    ],
    18     "version": "0.4.3",
     18    "version": "0.5.0",
    1919    "config": {
    2020        "platform": {
  • paycrypto-me-for-woocommerce/trunk/composer.lock

    r3803918 r3814289  
    55        "This file is @generated automatically"
    66    ],
    7     "content-hash": "85ab4930b5e9f05be0752a0770d89093",
     7    "content-hash": "612c76c57264f01da1f8523bb158687f",
    88    "packages": [
    99        {
  • paycrypto-me-for-woocommerce/trunk/includes/abstract-class-wc-gateway-paycrypto-me.php

    r3803918 r3814289  
    302302                    'default' => __('Pay directly from your Bitcoin wallet. Place your order to view the QR code and payment instructions.', 'paycrypto-me-for-woocommerce'),
    303303                ),
     304                'hide_for_non_admin_users' => array(
     305                    'title' => __('Hide for Non-Admin Users', 'paycrypto-me-for-woocommerce'),
     306                    'label' => __('Show only for administrators.', 'paycrypto-me-for-woocommerce'),
     307                    'type' => 'checkbox',
     308                    'default' => 'no',
     309                    'description' => __('If enabled, only administrators will see the payment method on Checkout page.', 'paycrypto-me-for-woocommerce'),
     310                ),
     311                'debug_log' => array(
     312                    'title' => __('Debug', 'paycrypto-me-for-woocommerce'),
     313                    'label' => __('Enable debugging messages', 'paycrypto-me-for-woocommerce'),
     314                    'type' => 'checkbox',
     315                    'default' => 'no',
     316                    'description' => __('Debug logs will be saved to WooCommerce > Status > Logs.', 'paycrypto-me-for-woocommerce'),
     317                ),
    304318                'express_payment_section' => array(
    305319                    'type' => 'title',
    … …  
    347361            $this->init_form_fields_items(),
    348362            [
    349                 'hide_for_non_admin_users' => array(
    350                     'title' => __('Hide for Non-Admin Users', 'paycrypto-me-for-woocommerce'),
    351                     'label' => __('Show only for administrators.', 'paycrypto-me-for-woocommerce'),
    352                     'type' => 'checkbox',
    353                     'default' => 'no',
    354                     'description' => __('If enabled, only administrators will see the payment method on Checkout page.', 'paycrypto-me-for-woocommerce'),
    355                 ),
    356                 'debug_log' => array(
    357                     'title' => __('Debug', 'paycrypto-me-for-woocommerce'),
    358                     'label' => __('Enable debugging messages', 'paycrypto-me-for-woocommerce'),
    359                     'type' => 'checkbox',
    360                     'default' => 'no',
    361                     'description' => __('Debug logs will be saved to WooCommerce > Status > Logs.', 'paycrypto-me-for-woocommerce'),
    362                 ),
    363363                'paycrypto_me_donate' => array(
    364364                    'type' => 'title',
    … …  
    368368            ]
    369369        );
     370    }
     371
     372    public function process_admin_options()
     373    {
     374        $saved = parent::process_admin_options();
     375        $post = $this->get_post_data();
     376        $nonce = $post['paycrypto_me_cleanup_nonce'] ?? '';
     377        if (!is_string($nonce) || !$nonce || !current_user_can('manage_options')
     378            || !wp_verify_nonce($nonce, 'paycrypto_me_cleanup_' . $this->id)) {
     379            return $saved;
     380        }
     381
     382        // WooCommerce also returns false on a successful, unchanged gateway
     383        // save. Allow changing just these choices in that case.
     384        if ($this->has_settings_errors() || (!$saved && get_option($this->get_option_key()) !== $this->settings)) {
     385            return $saved;
     386        }
     387
     388        $choices = UninstallPreferences::choices($post['paycrypto_me_cleanup'] ?? []);
     389        $stored = array_map(static fn(bool $checked): string => $checked ? 'yes' : 'no', $choices);
     390        if ($stored === get_option(UninstallPreferences::OPTION, [])) {
     391            return $saved;
     392        }
     393        if (!update_option(UninstallPreferences::OPTION, $stored, false)) {
     394            \WC_Admin_Settings::add_error('The uninstall choices could not be saved. Reload the page to verify them.');
     395            return $saved;
     396        }
     397        return true;
     398    }
     399
     400    protected function has_settings_errors(): bool
     401    {
     402        return !empty($this->get_errors());
    370403    }
    371404
    … …  
    384417            // Keep this non-setting outside the form table without an empty generated heading.
    385418            return '</table>' . $data['description'] . '<table class="form-table">';
     419        }
     420        if ($key === 'paycrypto_danger_area') {
     421            ob_start();
     422            include __DIR__ . '/../templates/admin/uninstall-choices.php';
     423            return (string) ob_get_clean();
    386424        }
    387425        return parent::generate_title_html($key, $data);
  • paycrypto-me-for-woocommerce/trunk/includes/class-wc-gateway-paycrypto-me-lightning.php

    r3673246 r3814289  
    5959    public function process_admin_options()
    6060    {
     61        $this->config_validator = new LightningConfigValidator();
    6162        $this->sync_debug_log_from_post();
    6263
    6364        return parent::process_admin_options();
     65    }
     66
     67    protected function has_settings_errors(): bool
     68    {
     69        return parent::has_settings_errors() || $this->config_validator()->has_errors();
    6470    }
    6571
    … …  
    237243                'default' => '',
    238244            ],
     245            'paycrypto_danger_area' => [
     246                'type' => 'title',
     247                'title' => __('Danger Area', 'paycrypto-me-for-woocommerce'),
     248            ],
    239249        ];
    240250    }
  • paycrypto-me-for-woocommerce/trunk/includes/class-wc-gateway-paycrypto-me.php

    r3673246 r3814289  
    204204
    205205        $selected_network = isset($_POST['woocommerce_paycrypto_me_selected_network']) ? sanitize_text_field(wp_unslash($_POST['woocommerce_paycrypto_me_selected_network'])) : null;
     206        if (!isset($this->get_available_networks()[$selected_network])) {
     207            \WC_Admin_Settings::add_error('Select a Bitcoin network before saving.');
     208            return false;
     209        }
    206210        $network_identifier = isset($_POST['woocommerce_paycrypto_me_network_identifier']) ? sanitize_text_field(wp_unslash($_POST['woocommerce_paycrypto_me_network_identifier'])) : '';
    207211        $network_config = $this->get_network_config($selected_network);
  • paycrypto-me-for-woocommerce/trunk/includes/validators/class-lightning-config-validator.php

    r3673246 r3814289  
    2424class LightningConfigValidator
    2525{
     26    private bool $has_errors = false;
     27
     28    public function has_errors(): bool
     29    {
     30        return $this->has_errors;
     31    }
     32
     33    private function report_error(string $message): void
     34    {
     35        $this->has_errors = true;
     36        \WC_Admin_Settings::add_error($message);
     37    }
     38
    2639    public function is_lnd_rest_selected(array $post_data, string $node_type_field_key): bool
    2740    {
    … …  
    4861        $parts = wp_parse_url($url);
    4962        if (empty($parts['scheme']) || strtolower($parts['scheme']) !== 'https') {
    50             \WC_Admin_Settings::add_error(sprintf('%s must use HTTPS.', esc_html__('BTCPay Server URL', 'paycrypto-me-for-woocommerce')));
     63            $this->report_error(sprintf('%s must use HTTPS.', esc_html__('BTCPay Server URL', 'paycrypto-me-for-woocommerce')));
    5164            return '';
    5265        }
    … …  
    5770    private function add_unusable_url_error(string $field_label): void
    5871    {
    59         \WC_Admin_Settings::add_error(sprintf(
     72        $this->report_error(sprintf(
    6073            '%s is not a usable URL and was not saved. Include the scheme, e.g. https://example.com',
    6174            esc_html($field_label)
    … …  
    6780        $val = $this->sanitize_text_val($value);
    6881        if (!$is_lnd_rest_selected && $val !== '' && strlen($val) < 20) {
    69             \WC_Admin_Settings::add_error(sprintf('%1$s must be at least %2$d characters.', esc_html__('BTCPay API Key', 'paycrypto-me-for-woocommerce'), 20));
     82            $this->report_error(sprintf('%1$s must be at least %2$d characters.', esc_html__('BTCPay API Key', 'paycrypto-me-for-woocommerce'), 20));
    7083            return '';
    7184        }
    … …  
    88101        $val = $this->sanitize_text_val($value);
    89102        if (!$is_lnd_rest_selected && $val !== '' && strlen($val) < 16) {
    90             \WC_Admin_Settings::add_error('BTCPay webhook secret is shorter than the recommended 16 characters.');
     103            $this->report_error('BTCPay webhook secret is shorter than the recommended 16 characters.');
    91104        }
    92105        return $val;
    … …  
    106119        $parts = wp_parse_url($url);
    107120        if (empty($parts['scheme']) || strtolower($parts['scheme']) !== 'https') {
    108             \WC_Admin_Settings::add_error(sprintf('%s must use HTTPS.', esc_html__('lnd REST URL', 'paycrypto-me-for-woocommerce')));
     121            $this->report_error(sprintf('%s must use HTTPS.', esc_html__('lnd REST URL', 'paycrypto-me-for-woocommerce')));
    109122            return '';
    110123        }
    … …  
    118131        if ($is_lnd_rest_selected && $val !== '') {
    119132            if (strlen($val) < 100) {
    120                 \WC_Admin_Settings::add_error(sprintf('%1$s must be at least %2$d characters.', esc_html__('lnd Macaroon (hex)', 'paycrypto-me-for-woocommerce'), 100));
     133                $this->report_error(sprintf('%1$s must be at least %2$d characters.', esc_html__('lnd Macaroon (hex)', 'paycrypto-me-for-woocommerce'), 100));
    121134                return '';
    122135            }
    123136            if (!ctype_xdigit($val)) {
    124                 \WC_Admin_Settings::add_error('lnd Macaroon must be a valid hexadecimal string.');
     137                $this->report_error('lnd Macaroon must be a valid hexadecimal string.');
    125138                return '';
    126139            }
    … …  
    136149        }
    137150        if (strpos($val, '-----BEGIN CERTIFICATE-----') === false || strpos($val, '-----END CERTIFICATE-----') === false) {
    138             \WC_Admin_Settings::add_error('Invalid certificate format. Must be valid PEM format starting with -----BEGIN CERTIFICATE-----.');
     151            $this->report_error('Invalid certificate format. Must be valid PEM format starting with -----BEGIN CERTIFICATE-----.');
    139152            return '';
    140153        }
    … …  
    146159        $val = absint($value);
    147160        if ($val < 300) {
    148             \WC_Admin_Settings::add_error('Invoice Expiry must be at least 300 seconds (5 minutes).');
     161            $this->report_error('Invoice Expiry must be at least 300 seconds (5 minutes).');
    149162            return '3600';
    150163        }
    151164        if ($val > 86400) {
    152             \WC_Admin_Settings::add_error('Invoice Expiry cannot exceed 86400 seconds (24 hours).');
     165            $this->report_error('Invoice Expiry cannot exceed 86400 seconds (24 hours).');
    153166            return '3600';
    154167        }
  • paycrypto-me-for-woocommerce/trunk/languages/paycrypto-me-for-woocommerce-de_DE.po

    r3803918 r3814289  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: PayCrypto.Me for WooCommerce 0.4.3\n"
     5"Project-Id-Version: PayCrypto.Me for WooCommerce 0.5.0\n"
    66"Report-Msgid-Bugs-To: https://github.com/paycrypto-me/paycrypto-me-for-woocommerce/issues\n"
    77"POT-Creation-Date: 2026-08-30T15:22:58+00:00\n"
    … …  
    708708#~ msgid "Copy"
    709709#~ msgstr "Kopieren"
     710
     711#: templates/admin/uninstall-choices.php:8
     712msgid "These choices apply to both gateways when you delete the plugin from WordPress."
     713msgstr "Diese Einstellungen gelten für beide Zahlungsarten, wenn du das Plugin in WordPress löschst."
     714
     715#: templates/admin/uninstall-choices.php:11
     716msgid "Delete this plugin’s WooCommerce logs on uninstall."
     717msgstr "WooCommerce-Protokolle dieses Plugins bei der Deinstallation löschen."
     718
     719#: templates/admin/uninstall-choices.php:15
     720msgid "Delete this plugin’s payment records on uninstall."
     721msgstr "Zahlungsdaten dieses Plugins bei der Deinstallation löschen."
     722
     723#: templates/admin/uninstall-choices.php:17
     724msgid "Orders remain, but their Bitcoin payment details and wallet derivation history are erased. Reinstalling with the same extended public key can reuse previous receiving addresses."
     725msgstr "Bestellungen bleiben erhalten. Ihre Bitcoin-Zahlungsdetails und der Ableitungsverlauf der Wallet werden gelöscht. Bei einer erneuten Installation mit demselben erweiterten öffentlichen Schlüssel können frühere Empfangsadressen wiederverwendet werden."
  • paycrypto-me-for-woocommerce/trunk/languages/paycrypto-me-for-woocommerce-es_ES.po

    r3803918 r3814289  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: PayCrypto.Me for WooCommerce 0.4.3\n"
     5"Project-Id-Version: PayCrypto.Me for WooCommerce 0.5.0\n"
    66"Report-Msgid-Bugs-To: https://github.com/paycrypto-me/paycrypto-me-for-woocommerce/issues\n"
    77"POT-Creation-Date: 2026-08-30T15:22:58+00:00\n"
    … …  
    703703#~ msgid "Copy"
    704704#~ msgstr "Copiar"
     705
     706#: templates/admin/uninstall-choices.php:8
     707msgid "These choices apply to both gateways when you delete the plugin from WordPress."
     708msgstr "Estas opciones se aplican a ambas pasarelas cuando eliminas el plugin desde WordPress."
     709
     710#: templates/admin/uninstall-choices.php:11
     711msgid "Delete this plugin’s WooCommerce logs on uninstall."
     712msgstr "Borrar los registros de actividad de este plugin en WooCommerce al desinstalarlo."
     713
     714#: templates/admin/uninstall-choices.php:15
     715msgid "Delete this plugin’s payment records on uninstall."
     716msgstr "Borrar los registros de pagos de este plugin al desinstalarlo."
     717
     718#: templates/admin/uninstall-choices.php:17
     719msgid "Orders remain, but their Bitcoin payment details and wallet derivation history are erased. Reinstalling with the same extended public key can reuse previous receiving addresses."
     720msgstr "Los pedidos se conservan, pero se borran los datos de pago en Bitcoin y el historial de derivación de la cartera. Si vuelves a instalarlo con la misma clave pública extendida, pueden reutilizarse direcciones de recepción anteriores."
  • paycrypto-me-for-woocommerce/trunk/languages/paycrypto-me-for-woocommerce-fr_FR.po

    r3803918 r3814289  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: PayCrypto.Me for WooCommerce 0.4.3\n"
     5"Project-Id-Version: PayCrypto.Me for WooCommerce 0.5.0\n"
    66"Report-Msgid-Bugs-To: https://github.com/paycrypto-me/paycrypto-me-for-woocommerce/issues\n"
    77"POT-Creation-Date: 2026-08-30T15:22:58+00:00\n"
    … …  
    705705#~ msgid "Copy"
    706706#~ msgstr "Copier"
     707
     708#: templates/admin/uninstall-choices.php:8
     709msgid "These choices apply to both gateways when you delete the plugin from WordPress."
     710msgstr "Ces choix s’appliquent aux deux passerelles lorsque vous supprimez l’extension depuis WordPress."
     711
     712#: templates/admin/uninstall-choices.php:11
     713msgid "Delete this plugin’s WooCommerce logs on uninstall."
     714msgstr "Effacer les journaux WooCommerce de cette extension lors de sa désinstallation."
     715
     716#: templates/admin/uninstall-choices.php:15
     717msgid "Delete this plugin’s payment records on uninstall."
     718msgstr "Effacer les données de paiement de cette extension lors de sa désinstallation."
     719
     720#: templates/admin/uninstall-choices.php:17
     721msgid "Orders remain, but their Bitcoin payment details and wallet derivation history are erased. Reinstalling with the same extended public key can reuse previous receiving addresses."
     722msgstr "Les commandes sont conservées, mais leurs informations de paiement en bitcoins et l’historique de dérivation du portefeuille sont effacés. Une réinstallation avec la même clé publique étendue peut entraîner la réutilisation d’anciennes adresses de réception."
  • paycrypto-me-for-woocommerce/trunk/languages/paycrypto-me-for-woocommerce-it_IT.po

    r3803918 r3814289  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: PayCrypto.Me for WooCommerce 0.4.3\n"
     5"Project-Id-Version: PayCrypto.Me for WooCommerce 0.5.0\n"
    66"Report-Msgid-Bugs-To: https://github.com/paycrypto-me/paycrypto-me-for-woocommerce/issues\n"
    77"POT-Creation-Date: 2026-08-30T15:22:58+00:00\n"
    … …  
    701701#~ msgid "Copy"
    702702#~ msgstr "Copia"
     703
     704#: templates/admin/uninstall-choices.php:8
     705msgid "These choices apply to both gateways when you delete the plugin from WordPress."
     706msgstr "Queste scelte si applicano a entrambi i gateway quando elimini il plugin da WordPress."
     707
     708#: templates/admin/uninstall-choices.php:11
     709msgid "Delete this plugin’s WooCommerce logs on uninstall."
     710msgstr "Elimina i log WooCommerce di questo plugin alla disinstallazione."
     711
     712#: templates/admin/uninstall-choices.php:15
     713msgid "Delete this plugin’s payment records on uninstall."
     714msgstr "Elimina i dati di pagamento di questo plugin alla disinstallazione."
     715
     716#: templates/admin/uninstall-choices.php:17
     717msgid "Orders remain, but their Bitcoin payment details and wallet derivation history are erased. Reinstalling with the same extended public key can reuse previous receiving addresses."
     718msgstr "Gli ordini vengono conservati, ma i dettagli dei pagamenti in Bitcoin e la cronologia di derivazione del portafoglio vengono cancellati. Reinstallando il plugin con la stessa chiave pubblica estesa, potresti riutilizzare indirizzi di ricezione precedenti."
  • paycrypto-me-for-woocommerce/trunk/languages/paycrypto-me-for-woocommerce-pt_BR.po

    r3803918 r3814289  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: PayCrypto.Me for WooCommerce 0.4.3\n"
     5"Project-Id-Version: PayCrypto.Me for WooCommerce 0.5.0\n"
    66"Report-Msgid-Bugs-To: https://github.com/paycrypto-me/paycrypto-me-for-woocommerce/issues\n"
    77"POT-Creation-Date: 2026-08-30T15:22:58+00:00\n"
    … …  
    699699#~ msgid "Copy"
    700700#~ msgstr "Copiar"
     701
     702#: templates/admin/uninstall-choices.php:8
     703msgid "These choices apply to both gateways when you delete the plugin from WordPress."
     704msgstr "Estas escolhas se aplicam aos dois gateways quando você exclui o plugin pelo WordPress."
     705
     706#: templates/admin/uninstall-choices.php:11
     707msgid "Delete this plugin’s WooCommerce logs on uninstall."
     708msgstr "Apagar os logs deste plugin no WooCommerce ao desinstalar."
     709
     710#: templates/admin/uninstall-choices.php:15
     711msgid "Delete this plugin’s payment records on uninstall."
     712msgstr "Apagar os registros de pagamento deste plugin ao desinstalar."
     713
     714#: templates/admin/uninstall-choices.php:17
     715msgid "Orders remain, but their Bitcoin payment details and wallet derivation history are erased. Reinstalling with the same extended public key can reuse previous receiving addresses."
     716msgstr "Os pedidos são preservados, mas os detalhes de pagamento em Bitcoin e o histórico de derivação da carteira são apagados. Reinstalar com a mesma chave pública estendida pode causar a reutilização de endereços de recebimento."
  • paycrypto-me-for-woocommerce/trunk/languages/paycrypto-me-for-woocommerce-ru_RU.po

    r3803918 r3814289  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: PayCrypto.Me for WooCommerce 0.4.3\n"
     5"Project-Id-Version: PayCrypto.Me for WooCommerce 0.5.0\n"
    66"Report-Msgid-Bugs-To: https://github.com/paycrypto-me/paycrypto-me-for-woocommerce/issues\n"
    77"POT-Creation-Date: 2026-08-30T15:22:58+00:00\n"
    … …  
    700700#~ msgid "Copy"
    701701#~ msgstr "Копировать"
     702
     703#: templates/admin/uninstall-choices.php:8
     704msgid "These choices apply to both gateways when you delete the plugin from WordPress."
     705msgstr "Эти настройки применяются к обоим платёжным шлюзам при удалении плагина из WordPress."
     706
     707#: templates/admin/uninstall-choices.php:11
     708msgid "Delete this plugin’s WooCommerce logs on uninstall."
     709msgstr "Удалить журналы этого плагина в WooCommerce при его удалении."
     710
     711#: templates/admin/uninstall-choices.php:15
     712msgid "Delete this plugin’s payment records on uninstall."
     713msgstr "Удалить платёжные записи этого плагина при его удалении."
     714
     715#: templates/admin/uninstall-choices.php:17
     716msgid "Orders remain, but their Bitcoin payment details and wallet derivation history are erased. Reinstalling with the same extended public key can reuse previous receiving addresses."
     717msgstr "Заказы сохранятся, но сведения о платежах в биткоинах и история генерации адресов кошелька будут удалены. При повторной установке с тем же расширенным открытым ключом ранее использованные адреса могут быть сгенерированы снова."
  • paycrypto-me-for-woocommerce/trunk/languages/paycrypto-me-for-woocommerce-zh_CN.po

    r3803918 r3814289  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: PayCrypto.Me for WooCommerce 0.4.3\n"
     5"Project-Id-Version: PayCrypto.Me for WooCommerce 0.5.0\n"
    66"Report-Msgid-Bugs-To: https://github.com/paycrypto-me/paycrypto-me-for-woocommerce/issues\n"
    77"POT-Creation-Date: 2026-08-30T15:22:58+00:00\n"
    … …  
    645645#~ msgid "Copy"
    646646#~ msgstr "复制"
     647
     648#: templates/admin/uninstall-choices.php:8
     649msgid "These choices apply to both gateways when you delete the plugin from WordPress."
     650msgstr "在 WordPress 中删除插件时,这些选项对两个支付网关都生效。"
     651
     652#: templates/admin/uninstall-choices.php:11
     653msgid "Delete this plugin’s WooCommerce logs on uninstall."
     654msgstr "卸载时删除此插件的 WooCommerce 日志。"
     655
     656#: templates/admin/uninstall-choices.php:15
     657msgid "Delete this plugin’s payment records on uninstall."
     658msgstr "卸载时删除此插件的付款记录。"
     659
     660#: templates/admin/uninstall-choices.php:17
     661msgid "Orders remain, but their Bitcoin payment details and wallet derivation history are erased. Reinstalling with the same extended public key can reuse previous receiving addresses."
     662msgstr "订单会保留,但订单的比特币付款详情和钱包地址派生记录会被删除。如果使用相同的扩展公钥重新安装,可能会再次使用以前的收款地址。"
  • paycrypto-me-for-woocommerce/trunk/languages/paycrypto-me-for-woocommerce.pot

    r3803918 r3814289  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: PayCrypto.Me for WooCommerce 0.4.3\n"
     5"Project-Id-Version: PayCrypto.Me for WooCommerce 0.5.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/paycrypto-me-for-woocommerce\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    … …  
    574574msgid "This payment request has expired. Please place the order again or contact the store."
    575575msgstr ""
     576
     577#: templates/admin/uninstall-choices.php:8
     578msgid "These choices apply to both gateways when you delete the plugin from WordPress."
     579msgstr ""
     580
     581#: templates/admin/uninstall-choices.php:11
     582msgid "Delete this plugin’s WooCommerce logs on uninstall."
     583msgstr ""
     584
     585#: templates/admin/uninstall-choices.php:15
     586msgid "Delete this plugin’s payment records on uninstall."
     587msgstr ""
     588
     589#: templates/admin/uninstall-choices.php:17
     590msgid "Orders remain, but their Bitcoin payment details and wallet derivation history are erased. Reinstalling with the same extended public key can reuse previous receiving addresses."
     591msgstr ""
  • paycrypto-me-for-woocommerce/trunk/package.json

    r3803918 r3814289  
    11{
    22  "name": "paycrypto-me-for-woocommerce",
    3   "version": "0.4.3",
     3  "version": "0.5.0",
    44  "description": "PayCrypto.Me payment gateway for WooCommerce with Blocks support",
    55  "main": "assets/js/frontend/paycrypto-me-script.js",
  • paycrypto-me-for-woocommerce/trunk/paycrypto-me-for-woocommerce.php

    r3803918 r3814289  
    44 * Plugin URI: https://paycrypto.me/woocommerce/
    55 * Description: PayCrypto.Me for WooCommerce lets your store accept Bitcoin payments — On-Chain and Lightning Network — directly into wallets and nodes you control.
    6  * Version: 0.4.3
     6 * Version: 0.5.0
    77 * Requires at least: 6.5
    88 * Requires PHP: 8.1
    … …  
    6868    class WC_PayCryptoMe
    6969    {
    70         public const VERSION = '0.4.3';
     70        public const VERSION = '0.5.0';
    7171
    7272        public const URL_SUPPORT = 'mailto:contact@paycrypto.me';
  • paycrypto-me-for-woocommerce/trunk/readme.txt

    r3803918 r3814289  
    99WC requires at least: 6.5
    1010WC tested up to: 10.9
    11 Stable tag: 0.4.3
     11Stable tag: 0.5.0
    1212License: GPL-3.0-or-later
    1313License URI: https://www.gnu.org/licenses/gpl-3.0.html
    … …  
    3434- **QR code everywhere it matters** — a scannable payment QR (with copy-to-clipboard and "Open in wallet" deep link) on the Thank You page, in My Account → Orders, and on the admin order screen, so both you and the customer always see the same payment details.
    3535- **Non-custodial by design** — the plugin never takes possession of funds; it only derives addresses and requests invoices from infrastructure you own.
    36 - **Debug logging** — every payment attempt is logged through the native WooCommerce logger (WooCommerce → Status → Logs, source `paycrypto_me`), so troubleshooting a stuck order doesn't require guesswork.
     36- **Debug logging** — payment diagnostics are available through the native WooCommerce logger (WooCommerce → Status → Logs, source `paycrypto_me`), so troubleshooting a stuck order doesn't require guesswork.
    3737- **Translation-ready** — text domain `paycrypto-me-for-woocommerce`, with complete translations included for Portuguese (Brazil), Spanish, French, German, Italian, Russian and Chinese (Simplified).
    3838- **Developer-friendly** — before/after payment hooks, filters over the invoice arguments sent to BTCPay/lnd, and a filter over the final payment data, so custom logic can hook in without touching plugin code.
    … …  
    4444- **Automatic payment confirmation.** Today, order status is moved forward manually once you've verified the payment yourself (e.g. in your node or block explorer). Automatic confirmation via BTCPay webhooks / lnd polling is planned for the Pro add-on.
    4545- **On-chain confirmation tracking and transaction history.** The base stores the receiving address and derivation context; the Pro add-on owns blockchain polling, transaction records and confirmation-specific data in its own tables.
    46 - **Fiat → sats conversion.** Lightning invoices are currently created as zero-amount (the wallet reads the amount from the invoice itself once the add-on populates it); automatic conversion of the order's fiat total into an exact BTC/sats amount is also planned for the Pro add-on.
     46- **Fiat → sats conversion.** The base plugin sends the order total and currency to BTCPay Server. With lnd it requests an invoice without a fixed amount. Automatic conversion by the plugin is planned for the Pro add-on.
    4747
    4848Bitcoin is currently the only supported cryptocurrency (on-chain and Lightning) — this keeps the codebase small and well-tested rather than spreading support thin across many chains.
    … …  
    9999Switch the On-Chain gateway's network to testnet and place a test order, or use your Lightning node's own testing/regtest setup if it supports one — the plugin itself only exposes mainnet/testnet for On-Chain.
    100100
    101 = Where are payment logs stored? =
    102 Through the native WooCommerce logger, source `paycrypto_me`. Access them via WooCommerce → Status → Logs.
     101= Where can I find payment logs, and what happens to them when I uninstall the plugin? =
     102Open WooCommerce → Status → Logs and look for the source `paycrypto_me`. WooCommerce manages log retention. By default, deleting the plugin leaves those logs in place. To remove its native WooCommerce logs on deletion, select the log checkbox in either gateway’s Danger Area and save.
    103103
    104104= Does the order status update automatically once the customer pays? =
    … …  
    113113== Privacy ==
    114114
    115 This plugin stores the following data needed to process Bitcoin payments:
    116 
    117 - Your wallet's account-level extended public key (xPub/yPub/zPub or testnet tPub/upub/vpub) or single receiving address, and every address
    118   derived from it, in dedicated database tables (`{prefix}paycrypto_me_bitcoin_wallet_xpubkeys`,
    119   `{prefix}paycrypto_me_bitcoin_derivation_indexes`, `{prefix}paycrypto_me_bitcoin_transactions_data`).
    120   The extended public key is stored in readable form because the plugin needs it to derive addresses
    121   and reconnect the same wallet to its previous derivation indexes. It cannot authorize spending,
    122   but it is privacy-sensitive because it can reveal that wallet account's addresses and activity.
    123 - Lightning node connection details you provide (BTCPay Server or lnd URL, API key/macaroon, optional TLS certificate) in the gateway settings (`wp_options`), and every created invoice in `{prefix}paycrypto_me_lightning_invoices`.
    124 - No customer personal data beyond what WooCommerce already stores with the order — the plugin only attaches the payment address/invoice details as order meta.
    125 
    126 None of this data leaves your WordPress installation: the plugin only talks to your own wallet-derivation logic and to the BTCPay Server/lnd node you configure, never to a third-party API.
    127 
    128 **On uninstall, both gateways' settings are deleted** — including the Lightning node credentials (API key, macaroon, TLS certificate), so those secrets are not left behind in your database.
    129 
    130 **The payment record tables are deliberately kept** (`{prefix}paycrypto_me_bitcoin_wallet_xpubkeys`,
    131 `{prefix}paycrypto_me_bitcoin_derivation_indexes`, `{prefix}paycrypto_me_bitcoin_transactions_data`,
    132 `{prefix}paycrypto_me_lightning_invoices`), so the payment history of past orders stays intact for
    133 accounting and reconciliation after the plugin is removed. Keeping the wallet and derivation-index
    134 records also prevents a later reinstall from starting the same wallet at an old index and reusing
    135 payment addresses. Because this retains the privacy-sensitive extended public key, protect database
    136 backups and drop these tables manually only when you no longer need the history and do not intend to
    137 resume derivation from that wallet through this plugin.
     115= What information does the store keep? =
     116
     117The plugin links each Bitcoin payment to its WooCommerce order ID so the store can show payment instructions, handle checkout retries and reconcile orders. Someone with access to the order can associate these records with the customer.
     118
     119- **On-chain:** The store keeps the receiving address with the order. For an HD wallet, dedicated tables also keep the account-level extended public key, network and derivation indexes so future orders can use fresh addresses. The extended public key is readable and can reveal the wallet account's addresses and activity.
     120- **Lightning:** The store keeps the node type, invoice ID, payment request, status, expiry and amount in satoshis when supplied. The gateway settings hold the node URL, authentication credentials and optional TLS certificate.
     121- **Orders and logs:** WooCommerce order metadata contains payment instructions, including the wallet link. Payment logs can include the order ID, amounts, currencies, network, a shortened payment identifier and diagnostic errors. Restrict access to orders, logs, database copies and backups.
     122
     123= Who receives payment information? =
     124
     125The plugin generates on-chain addresses and payment QR images on the WordPress server. The on-chain QR and wallet link contain the receiving address, an order reference, the billing first name when provided, and the Bitcoin amount when supplied. Opening the link or scanning the code gives those details to the wallet application. When the customer pays, the receiving address and transaction amount become public on the Bitcoin blockchain. The order reference and billing name are wallet instructions and are separate from the blockchain transaction. Reusing a fixed address makes payments to the same store easier to link.
     126
     127For Lightning, the plugin contacts the endpoint chosen by the store when testing the connection and when creating or retrieving an invoice. BTCPay Server receives the order ID, order total, currency, invoice description (empty by default) and checkout settings including expiry. lnd receives the expiry and a memo (empty by default), plus an amount if supplied by an extension. A hosted node provider can access the requests its service receives. Extensions can change invoice fields. The base plugin sends no payment telemetry to PayCrypto.Me.
     128
     129= How long are records kept, and how can a customer make a request? =
     130
     131In either gateway’s **Danger Area**, choose what WordPress should erase when you delete the plugin. Both checkboxes start unchecked, including after upgrading. The choices are shared by both gateways on the same site. You can change them until uninstall. Saving, updating or deactivating the plugin keeps the records.
     132
     133- **Neither selected:** The store keeps the payment tables, order payment details and logs. WooCommerce continues to apply its own log retention settings.
     134- **Logs only:** Removes entries with source `paycrypto_me` in the native WooCommerce log database and matching files (including rotations) in the configured log directory. Payment records remain. External log destinations, archived directories and backups have their own retention arrangements. On multisite, a shared log directory can be cleaned only if all sites using it authorize log cleanup.
     135- **Payment records only:** Removes this plugin's payment metadata from classic and HPOS order storage and drops its four tables: `{prefix}paycrypto_me_bitcoin_wallet_xpubkeys`, `{prefix}paycrypto_me_bitcoin_derivation_indexes`, `{prefix}paycrypto_me_bitcoin_transactions_data` and `{prefix}paycrypto_me_lightning_invoices`. Logs remain.
     136- **Both selected:** Applies both cleanups.
     137
     138Uninstall always removes gateway settings, including stored Lightning credentials. Orders, totals, payment method and order notes (including payment initiation and status notes) remain. **Deleting derivation history can cause address reuse if you reinstall with the same extended public key.** Retained payment tables have no automatic expiry. Invoice expiry is a payment deadline. Deleting local records leaves invoices at the node, wallet records, backups and confirmed blockchain transactions outside the scope of the cleanup.
     139
     140Customers should direct privacy requests to the store using the contact in its privacy policy. The plugin does not register a WordPress personal-data exporter or eraser for its payment tables. When handling a request, the store should check the relevant order IDs against those tables and account for copies held by its providers.
     141
     142= Suggested wording for the store's privacy policy =
     143
     144Adapt the paragraph below for the payment methods you offer. Fill in the provider and processing location if you use a hosted node, the applicable retention periods or criteria, and a monitored contact. Explain the legal basis and rights applicable to your store and customers before publishing.
     145
     146“When you choose Bitcoin, we link the payment address or Lightning invoice to your order to provide payment instructions and reconcile your payment. For on-chain payments, opening the wallet link or scanning the QR code shares payment details, including your billing first name if supplied and your order reference, with your wallet. The receiving address and amount of a confirmed transaction are public on the Bitcoin blockchain. For Lightning payments, we request an invoice from [node operator and location]. We retain order-linked payment records for [period or criteria] and payment logs for [period]. To ask about your payment data or exercise your privacy rights, contact [store privacy contact].”
    138147
    139148== Changelog ==
     149
     150= 0.5.0 =
     151* Add separate opt-ins for deleting WooCommerce logs and local Bitcoin payment records on uninstall. Expand privacy and retention disclosures.
    140152
    141153= 0.4.3 =
    … …  
    210222== Upgrade Notice ==
    211223
     224= 0.5.0 =
     225Existing records are preserved by default. Review the two optional uninstall choices in either gateway’s Danger Area.
     226
    212227= 0.4.3 =
    213228Refreshed branding and a compact optional donation section with a new Bitcoin donation address. Customer payment processing is unchanged.
  • paycrypto-me-for-woocommerce/trunk/uninstall.php

    r3671936 r3814289  
    11<?php
    2 /**
    3  * PayCrypto.Me Gateway for WooCommerce — Uninstall handler
    4  *
    5  * Deletes the gateway settings, which hold secrets in plain text (lnd_macaroon_hex — admin-level
    6  * control of the node — btcpay_api_key, lnd_certificate) that would otherwise remain in the
    7  * database indefinitely after uninstall.
    8  *
    9  * The 4 custom tables are deliberately KEPT: they are the store's payment records (derived
    10  * addresses, derivation indexes, Lightning invoices) and remain needed for accounting and
    11  * reconciliation of past orders long after the plugin is removed. Dropping them would destroy
    12  * financial history that exists nowhere else. `paycrypto_me_db_version` is kept for the same
    13  * reason — it describes the schema we are leaving in place, so a later reinstall upgrades from
    14  * the correct state instead of assuming a clean install.
    15  *
    16  * @package WooCommerce\PayCryptoMe
    17  */
     2/** @package WooCommerce\PayCryptoMe */
    183
    19 if (!defined('WP_UNINSTALL_PLUGIN')) {
    20     exit;
    21 }
     4defined('WP_UNINSTALL_PLUGIN') || exit;
    225
    23 delete_option('woocommerce_paycrypto_me_settings');
    24 delete_option('woocommerce_paycrypto_me_lightning_settings');
     6// WordPress runs uninstall.php with the plugin inactive. Neither WooCommerce
     7// nor the Composer bootstrap is required to remove settings and payment data.
     8require_once __DIR__ . '/includes/services/class-uninstall-preferences.php';
     9require_once __DIR__ . '/includes/services/class-uninstall-cleanup.php';
     10require_once __DIR__ . '/includes/services/class-db-installer.php';
     11require_once __DIR__ . '/includes/services/class-paycrypto-me-bitcoin-gateway-activate.php';
     12require_once __DIR__ . '/includes/services/class-paycrypto-me-lightning-gateway-activate.php';
    2513
    26 // Stale admin-notice buffer and the failed-upgrade/health-check throttles, not payment records.
    27 delete_option('paycrypto_me_db_activation_errors');
    28 delete_transient('paycrypto_me_db_upgrade_retry');
    29 delete_transient('paycrypto_me_db_health_check');
     14\PayCryptoMe\WooCommerce\UninstallCleanup::run();
  • paycrypto-me-for-woocommerce/trunk/vendor/autoload.php

    r3803918 r3814289  
    2020require_once __DIR__ . '/composer/autoload_real.php';
    2121
    22 return ComposerAutoloaderInit85ab4930b5e9f05be0752a0770d89093::getLoader();
     22return ComposerAutoloaderInit612c76c57264f01da1f8523bb158687f::getLoader();
  • paycrypto-me-for-woocommerce/trunk/vendor/composer/autoload_classmap.php

    r3685729 r3814289  
    677677    'PayCryptoMe\\WooCommerce\\ProcessorStrategiesFactory' => $baseDir . '/includes/strategies/class-processor-strategies-factory.php',
    678678    'PayCryptoMe\\WooCommerce\\QrCodeService' => $baseDir . '/includes/services/class-qr-code-service.php',
     679    'PayCryptoMe\\WooCommerce\\UninstallCleanup' => $baseDir . '/includes/services/class-uninstall-cleanup.php',
     680    'PayCryptoMe\\WooCommerce\\UninstallPreferences' => $baseDir . '/includes/services/class-uninstall-preferences.php',
    679681    'PayCryptoMe\\WooCommerce\\WC_Gateway_PayCryptoMe' => $baseDir . '/includes/class-wc-gateway-paycrypto-me.php',
    680682    'PayCryptoMe\\WooCommerce\\WC_Gateway_PayCryptoMe_Blocks' => $baseDir . '/includes/blocks/class-wc-gateway-paycrypto-me-blocks.php',
  • paycrypto-me-for-woocommerce/trunk/vendor/composer/autoload_real.php

    r3803918 r3814289  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit85ab4930b5e9f05be0752a0770d89093
     5class ComposerAutoloaderInit612c76c57264f01da1f8523bb158687f
    66{
    77    private static $loader;
    … …  
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit85ab4930b5e9f05be0752a0770d89093', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit612c76c57264f01da1f8523bb158687f', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit85ab4930b5e9f05be0752a0770d89093', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit612c76c57264f01da1f8523bb158687f', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit85ab4930b5e9f05be0752a0770d89093::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInit612c76c57264f01da1f8523bb158687f::getInitializer($loader));
    3333
    3434        $loader->register(true);
    3535
    36         $filesToLoad = \Composer\Autoload\ComposerStaticInit85ab4930b5e9f05be0752a0770d89093::$files;
     36        $filesToLoad = \Composer\Autoload\ComposerStaticInit612c76c57264f01da1f8523bb158687f::$files;
    3737        $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
    3838            if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • paycrypto-me-for-woocommerce/trunk/vendor/composer/autoload_static.php

    r3803918 r3814289  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit85ab4930b5e9f05be0752a0770d89093
     7class ComposerStaticInit612c76c57264f01da1f8523bb158687f
    88{
    99    public static $files = array (
    … …  
    771771        'PayCryptoMe\\WooCommerce\\ProcessorStrategiesFactory' => __DIR__ . '/../..' . '/includes/strategies/class-processor-strategies-factory.php',
    772772        'PayCryptoMe\\WooCommerce\\QrCodeService' => __DIR__ . '/../..' . '/includes/services/class-qr-code-service.php',
     773        'PayCryptoMe\\WooCommerce\\UninstallCleanup' => __DIR__ . '/../..' . '/includes/services/class-uninstall-cleanup.php',
     774        'PayCryptoMe\\WooCommerce\\UninstallPreferences' => __DIR__ . '/../..' . '/includes/services/class-uninstall-preferences.php',
    773775        'PayCryptoMe\\WooCommerce\\WC_Gateway_PayCryptoMe' => __DIR__ . '/../..' . '/includes/class-wc-gateway-paycrypto-me.php',
    774776        'PayCryptoMe\\WooCommerce\\WC_Gateway_PayCryptoMe_Blocks' => __DIR__ . '/../..' . '/includes/blocks/class-wc-gateway-paycrypto-me-blocks.php',
    … …  
    786788    {
    787789        return \Closure::bind(function () use ($loader) {
    788             $loader->prefixLengthsPsr4 = ComposerStaticInit85ab4930b5e9f05be0752a0770d89093::$prefixLengthsPsr4;
    789             $loader->prefixDirsPsr4 = ComposerStaticInit85ab4930b5e9f05be0752a0770d89093::$prefixDirsPsr4;
    790             $loader->prefixesPsr0 = ComposerStaticInit85ab4930b5e9f05be0752a0770d89093::$prefixesPsr0;
    791             $loader->classMap = ComposerStaticInit85ab4930b5e9f05be0752a0770d89093::$classMap;
     790            $loader->prefixLengthsPsr4 = ComposerStaticInit612c76c57264f01da1f8523bb158687f::$prefixLengthsPsr4;
     791            $loader->prefixDirsPsr4 = ComposerStaticInit612c76c57264f01da1f8523bb158687f::$prefixDirsPsr4;
     792            $loader->prefixesPsr0 = ComposerStaticInit612c76c57264f01da1f8523bb158687f::$prefixesPsr0;
     793            $loader->classMap = ComposerStaticInit612c76c57264f01da1f8523bb158687f::$classMap;
    792794
    793795        }, null, ClassLoader::class);
  • paycrypto-me-for-woocommerce/trunk/vendor/composer/installed.php

    r3803918 r3814289  
    22    'root' => array(
    33        'name' => 'paycrypto-me/paycrypto-me-for-woocommerce',
    4         'pretty_version' => '0.4.3',
    5         'version' => '0.4.3.0',
     4        'pretty_version' => '0.5.0',
     5        'version' => '0.5.0.0',
    66        'reference' => null,
    77        'type' => 'wordpress-plugin',
    … …  
    108108        ),
    109109        'paycrypto-me/paycrypto-me-for-woocommerce' => array(
    110             'pretty_version' => '0.4.3',
    111             'version' => '0.4.3.0',
     110            'pretty_version' => '0.5.0',
     111            'version' => '0.5.0.0',
    112112            'reference' => null,
    113113            'type' => 'wordpress-plugin',
Note: See TracChangeset for help on using the changeset viewer.