Changeset 3814679
- Timestamp:
- 11/21/2026 01:30:47 AM (less than one hour ago)
- Location:
- thentic-pay/trunk
- Files:
-
- 5 edited
-
assets/thentic-blocks.js (modified) (3 diffs)
-
class-thentic-blocks.php (modified) (2 diffs)
-
class-thentic-gateway.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
-
thentic-pay.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
thentic-pay/trunk/assets/thentic-blocks.js
r3570360 r3814679 12 12 var chainTokens = settings.chainTokens || {}; 13 13 var chains = Object.keys(chainTokens); 14 var hideSelectors = settings.hideSelectors === true; 14 15 15 16 // Label … … 92 93 { style: { marginTop: '12px' } }, 93 94 createElement('p', { style: { fontSize: '14px', color: '#666', marginBottom: '12px' } }, description), 94 createElement(95 !hideSelectors ? createElement( 95 96 'div', 96 97 { style: { display: 'flex', gap: '12px', flexWrap: 'wrap', marginBottom: '10px' } }, … … 129 130 ) 130 131 ) 131 ) ,132 ) : null, 132 133 createElement( 133 134 'p', -
thentic-pay/trunk/class-thentic-blocks.php
r3765020 r3814679 24 24 plugin_dir_url(__FILE__) . 'assets/thentic-blocks.js', 25 25 ['wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities'], 26 '1.0.1 0',26 '1.0.11', 27 27 true 28 28 ); … … 37 37 'icon' => plugin_dir_url(__FILE__) . 'assets/thentic_logo.png', 38 38 'chainTokens' => $chain_tokens, 39 'hideSelectors' => ($this->settings['hide_token_network_selection'] ?? 'no') === 'yes', 39 40 'supports' => ['products'], 40 41 ]; -
thentic-pay/trunk/class-thentic-gateway.php
r3570360 r3814679 86 86 'merchant_id' => ['title' => 'Thentic Merchant ID', 'type' => 'text', 'description' => 'Your merchant ID from thentic.tech/pay', 'placeholder' => 'e.g. my-store-123', 'desc_tip' => true], 87 87 'wallet_address' => ['title' => 'Recipient Wallet Address', 'type' => 'text', 'description' => 'Your EVM-compatible wallet address (0x..., 42 characters).', 'placeholder' => '0x...', 'desc_tip' => true], 88 'hide_token_network_selection' => ['title' => 'Simplified Checkout', 'type' => 'checkbox', 'label' => 'Hide network and token selectors and use the first enabled network and its first enabled token', 'default' => 'no', 'description' => 'Customers will not choose a network or token. Thentic Pay will use the first enabled network and its first enabled token from the settings below.'], 88 89 'include_commission' => ['title' => 'Include 1% Commission', 'type' => 'checkbox', 'label' => 'Add 1% Thentic Pay commission on top of order total', 'default' => 'no'], 89 90 'chains_tokens_header' => ['title' => 'Supported Chains & Tokens', 'type' => 'title', 'description' => 'Choose which blockchains and stablecoins your customers can pay with.'], … … 113 114 } 114 115 116 public function get_default_chain_token() { 117 $active = $this->get_active_chain_tokens(); 118 $chain = !empty($active) ? array_key_first($active) : ''; 119 return [ 120 'chain' => $chain, 121 'token' => ($chain && !empty($active[$chain])) ? $active[$chain][0] : '', 122 ]; 123 } 124 115 125 // ─── Currency Conversion ───────────────────────────────────────────────── 116 126 /** … … 175 185 } 176 186 187 $hide_selectors = $this->get_option('hide_token_network_selection', 'no') === 'yes'; 177 188 echo '<div class="thentic-pay-fields">'; 178 echo '<div class="thentic-field-row" >';189 echo '<div class="thentic-field-row"' . ($hide_selectors ? ' style="display:none"' : '') . '>'; 179 190 180 191 echo '<div class="thentic-field-group">'; … … 210 221 $token = isset($_POST['thentic_token']) ? sanitize_text_field(wp_unslash($_POST['thentic_token'])) : ''; 211 222 // phpcs:enable WordPress.Security.NonceVerification.Missing 223 224 if ($this->get_option('hide_token_network_selection', 'no') === 'yes') { 225 $defaults = $this->get_default_chain_token(); 226 $chain = $defaults['chain']; 227 $token = $defaults['token']; 228 } 212 229 213 230 if (empty($chain)) { … … 256 273 $selected_token = isset($_POST['thentic_token']) ? sanitize_text_field(wp_unslash($_POST['thentic_token'])) : 'USDT'; 257 274 // phpcs:enable WordPress.Security.NonceVerification.Missing 275 276 if ($this->get_option('hide_token_network_selection', 'no') === 'yes') { 277 $defaults = $this->get_default_chain_token(); 278 $selected_chain = $defaults['chain']; 279 $selected_token = $defaults['token']; 280 } 281 $active = $this->get_active_chain_tokens(); 282 if (!isset($active[$selected_chain]) || !in_array($selected_token, $active[$selected_chain], true)) { 283 wc_add_notice(__('Invalid payment network or token configuration.', 'thentic-pay'), 'error'); 284 return; 285 } 258 286 259 287 if (empty($merchant_id) || empty($wallet_address)) { -
thentic-pay/trunk/readme.txt
r3765020 r3814679 5 5 Tested up to: 7.0 6 6 Requires PHP: 7.4 7 Stable tag: 1.0.1 07 Stable tag: 1.0.11 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 97 97 == Changelog == 98 98 99 = 1.0.11 = 100 * Added optional simplified checkout that hides network and token selection while submitting the first enabled network and token. 101 99 102 = 1.0.10 = 100 103 * Fixed oversized payment method icon on WooCommerce checkout pages. -
thentic-pay/trunk/thentic-pay.php
r3765020 r3814679 4 4 * Plugin URI: https://thentic.tech/woocommerce 5 5 * Description: Accept crypto payments directly to your wallet. 30+ tokens across 12 blockchains. No KYC. No custodian. Works with WooCommerce. Powered by Thentic Pay. 6 * Version: 1.0.1 06 * Version: 1.0.11 7 7 * Author: Thentic Pay 8 8 * Author URI: https://thentic.tech … … 28 28 29 29 // ── Reset stale settings on plugin update ──────────────────────────────────── 30 define('THENTIC_PAY_VERSION', '1.0.1 0');30 define('THENTIC_PAY_VERSION', '1.0.11'); 31 31 add_action('plugins_loaded', 'thentic_maybe_update_settings'); 32 32 function thentic_maybe_update_settings() {
Note:
See TracChangeset
for help on using the changeset viewer.