mcdeth
Forum Replies Created
-
Forum: Plugins
In reply to: [Payment Gateway for PayPal on WooCommerce] feature requestawesome, thank you
Forum: Plugins
In reply to: [Payment Gateway for PayPal on WooCommerce] Problem with order idthank you
Forum: Plugins
In reply to: [Klarna for WooCommerce] webhook fails to create bug reportAlso, once everthing enabled I couldn’t see express checkout button anyway, turns out it was because client id was missing (Even though normal payment worked always without it, so its very easy to miss, worth adding a notice).
Another good thing would be to verify length of client id (I thought it’s k*** number for a moment)
- This reply was modified 2 months, 2 weeks ago by mcdeth.
Forum: Plugins
In reply to: [Payment Gateway for PayPal on WooCommerce] Problem with order idHi, thanks for prompt reply. I’ve submitted log file. Please note it’s regarding order id 53238 and 53237. The cart amount varies because it loses language and it looks for currency meta field on other product, but it might be issue on my side.
I’d suggest checking the current language through the plugin API instead of relying only on cookies. That makes the logic safer for WPML and other multilingual plugins. In Polylang, cookies can also be disabled, so reading the language directly from a cookie is not always reliable.
function easy_get_current_language_slug() {
// Polylang
if ( function_exists( 'pll_current_language' ) ) {
$lang = pll_current_language( 'slug' );
if ( ! empty( $lang ) && is_string( $lang ) ) {
return sanitize_key( $lang );
}
}
// WPML
$lang = apply_filters( 'wpml_current_language', null );
if ( ! empty( $lang ) && is_string( $lang ) ) {
return sanitize_key( $lang );
}
// Fallback
return '';
}In my case, the PayPal plugin passes the locale correctly, but the direct card payment on the website does not. That flow uses
fetch()and sends the request to:/wc-api/PPCP_Paypal_Checkout_For_Woocommerce_Button_Manager/?ppcp_action=create_orderBecause of that, the language is not always resolved correctly during order creation.
Perfect, thank you
Thank you, that solves the problem. One more question, are coupons created from redeemed points bonded to account or anyone can use it?
Hi Jose, thanks for prompt reply.
It’s because your plugin is lightweight and has good bot protection, I could use it with newsletter sign up. Currently I’m checking turnstile and pass if its success, but if it’s a fail I have to send user to newsletter page, bit ugly
Forum: Plugins
In reply to: [Permalink Manager Lite] Function _load_textdomain_just_in_time was calledThanks for the prompt reply. Yes, indeed, it’s the Pro version on the client’s website. Unfortunately, I won’t be able to test the free version – setting up the environment would take too much time and it’s bit more cosmetical bug for me. I just wanted to clean up the debug log. This is what I got from codex:
In permalink-manager.php the plugin calls run_permalink_manager() immediately when the file loads (line 388). That instantiates Permalink_Manager_Class, which (a) registers get_options_and_globals() on plugins_loaded and (b) instantiates all helper classes, including Permalink_Manager_Pro_Functions (lines 50–109, 115–134).
When plugins_loaded fires, get_options_and_globals() runs (lines 146–162). It calls apply_filters( 'permalink_manager_alerts', array() ), so every alert callback runs before init.
One of those callbacks is Permalink_Manager_Pro_Functions::pro_alerts() (see permalink-manager-pro-functions.php (line 268)). That method calls self::get_expiration_date() (lines 166–237), which uses multiple __() translations (e.g., lines 186, 191, 196, 200, 205, 211, 216, 221).
Because those __() calls fire on plugins_loaded (i.e., before init and before localize_me() loads the text domain at init), WordPress’ just‑in‑time translation loader kicks in early and triggers the “Translation loading for the permalink-manager domain was triggered too early” notice.
To avoid the notice, either (1) defer the alert building until init (e.g., move get_options_and_globals() to init or gate the permalink_manager_alerts filter until then), or (2) ensure the text domain is loaded before those translations run (e.g., call load_plugin_textdomain( 'permalink-manager', ... ) earlier, or avoid translation functions until init).I hope it helps and it’s not a false positive. It has helped me so far find five other sources.
Also there’s a lot of
[01-Jan-2026 10:29:48 UTC] PHP Warning: Undefined array key "path" in /wp-includes/l10n.php on line 1226triggered by wployalty. below is the fix
/**
* Guard against scripts registered with empty/invalid src but with translations,
* which triggers notices in load_script_textdomain() when parsing paths.
*/
function wlt_guard_script_translations_without_path() {
global $wp_scripts;
if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
return;
}
foreach ( $wp_scripts->registered as $handle => $script ) {
if ( empty( $script->textdomain ) ) {
continue;
}
$src = $script->src;
// Skip translation loading if src is missing or parse_url can't find a path.
$parsed = is_string( $src ) && $src !== '' ? wp_parse_url( $src ) : null;
if ( ! is_array( $parsed ) || ! isset( $parsed['path'] ) || $parsed['path'] === null ) {
$script->textdomain = '';
$script->translations_path = '';
}
}
}
add_action( 'wp_print_scripts', 'wlt_guard_script_translations_without_path', 1 );
add_action( 'admin_print_scripts', 'wlt_guard_script_translations_without_path', 1 );Forum: Plugins
In reply to: [Redis Object Cache] Error establishing a Redis connection
db1:keys=683597,expires=4252,avg_ttl=2128419180
evicted_keys:580307
keyspace_hits:15333759
keyspace_misses:2508765
total_connections_received:17820
instantaneous_ops_per_sec:0
rejected_connections:0
used_memory:534246600
used_memory_human:509.50M
used_memory_rss:586928128
used_memory_rss_human:559.74M
used_memory_peak:641976912
used_memory_peak_human:612.24M
used_memory_peak_perc:83.22%
used_memory_overhead:36761840
used_memory_startup:876304
used_memory_dataset:497484760
used_memory_dataset_perc:93.27%
used_memory_lua:39936
used_memory_vm_eval:39936
used_memory_lua_human:39.00K
used_memory_scripts_eval:760
used_memory_vm_functions:33792
used_memory_vm_total:73728
used_memory_vm_total_human:72.00K
used_memory_functions:200
used_memory_scripts:960
used_memory_scripts_human:960B
maxmemory:536870912
maxmemory_human:512.00M
maxmemory_policy:allkeys-lru
mem_fragmentation_ratio:1.10dlatego 5*? dobry deal
Forum: Plugins
In reply to: [Redis Object Cache] Error establishing a Redis connectionNo, sometimes I get an ‘error establishing connection’, but only in this specific shop. The other shops using Redis on the same server work perfectly fine. I’ll be checking for possible memory leaks… In the meantime, would increasing or decreasing the RAM be beneficial?
Here are logs, I dont see such spikes in other shops
View post on imgur.com
Forum: Plugins
In reply to: [Redis Object Cache] Error establishing a Redis connectionThanks for prompt reply, these are PHP errors:
[01-Dec-2025 20:44:03 UTC] RedisException: read error on connection to /run/redis_s01/redis.sock in /usr/www/users/s01/wp-content/object-cache.php:1934
#0 /usr/www/users/s01/wp-content/object-cache.php(1934): Redis->get()
[01-Dec-2025 20:44:03 UTC] RedisException: read error on connection to /run/redis_s01/redis.sock in /usr/www/users/s01/wp-content/object-cache.php:1934
#0 /usr/www/users/s01/wp-content/object-cache.php(1934): Redis->get()
[01-Dec-2025 20:44:03 UTC] RedisException: read error on connection to /run/redis_s01/redis.sock in /usr/www/users/s01/wp-content/object-cache.php:1934
#0 /usr/www/users/s01/wp-content/object-cache.php(1934): Redis->get()I changed these settings from 1 to 3 for now:
define( 'WP_REDIS_TIMEOUT', 3 );
define( 'WP_REDIS_READ_TIMEOUT', 3 );Rescanning template is where I failed, thank you
- This reply was modified 5 months, 4 weeks ago by mcdeth.