Harm10
Forum Replies Created
-
@emma24 Thanks for your reply. I think the support forum is only accessible if you register. I think registering to report issues on the WP forum should be enough to get some support?
Anyway I do not think that an exact example of my script is relevant. Lots of added actions and/or filters use is_admin() to block any unwanted actions when an admin page is displayed. Similar you would like to skip an action (like writing some meta data in the header of the content page) when the login screen is shown. Also interpreting the content of $wp_query for whatever reason is irrelevant when the login screen is displayed.
Did I detail my issue better in this way?https://www.imghippo.com/i/yte9071Fuk.png
Shows the image when WP_DEBUG is true.
Then I change it to FALSE via config.php and switch on PHP error reporting via added action and code like this:if ($my_wp_debug && !WP_DEBUG) { // Turn on debug error_reporting(E_ALL); ini_set('display_errors', 0); $file_name = $file_name ? $file_name : 'debug'; $log_path = WP_CONTENT_DIR . '/' . $file_name .'.log'; ini_set('log_errors', 1); ini_set('error_log', $log_path); }I have switched on some error_log commands to show that PHP is logging and to what file:
[09-Jan-2025 16:41:43 UTC] site 4: display_errors = 0
[09-Jan-2025 16:41:43 UTC] site 4: log_errors = 1
[09-Jan-2025 16:41:43 UTC] site 4: error_log = /home/deb20385n4/domains/remarkwebdesign.nl/public_html/sitetest/wpbase/testmulti/wp-content/debug.log
[09-Jan-2025 16:41:43 UTC] site 4: error_reporting = 32767Admin page looks like this:
https://www.imghippo.com/i/WQt2432lpM.png
Log viewer shows this when WP_DEBUG is false and PHP logging is on.
https://www.imghippo.com/i/JMpa8977ck.png
I can PHP log writing in the debug.log.
Do you have enough information?
Forum: Plugins
In reply to: [Cart Weight for WooCommerce] o[‘woo-cart-weight’] is undefinedI think you mean something like this: https://www.imghippo.com/i/1736444597289
Sorry there are 3 separate links:https://www.imghippo.com/i/iRSD8241pg.png
https://www.imghippo.com/i/hjvP5849KNU.png
https://www.imghippo.com/i/LJyD8581Stc.png
(I have never used these kind of platforms)- This reply was modified 1 year, 5 months ago by Harm10.
Forum: Plugins
In reply to: [Cart Weight for WooCommerce] o[‘woo-cart-weight’] is undefinedHow? “here”is not a link? And what do you mean by image hosting service?
- This reply was modified 1 year, 5 months ago by Harm10.
Forum: Plugins
In reply to: [Cart Weight for WooCommerce] o[‘woo-cart-weight’] is undefinedI have 3 images for you but how do I insert them here?
1. Cart display when entering cart.
2. Cart display when refreshing browser page
3. Cart display when doing Ctrl-F5 (clear cache)Maybe I can paste the html part from inspect when the shortcode does not work?
Forum: Plugins
In reply to: [Cart Weight for WooCommerce] o[‘woo-cart-weight’] is undefined@kozyraola That is not possible. This is a staging environment to check WP 6.7.1 problems with loading text domains. As said I only see it on this multi site. It definitely looks like some caching thing.
Is WP multi site doing that differently from single site?
I could temporarily open up one of the sub sites but I do not want to post the URL here.
Perhaps I can give you some debug data or run some test PHP script for you?@emma24 Thank you. I have submitted a request.
I have written several PHP scripts that should do something or not depending on what screen/loop is shown to the user. In this case I manipulate the debug settings when I am on specific loop types.
An exclusion you see a lot in these kinds of scripts is to skip the function entirely when is_admin() and is_login() is true. Both cases should not trigger a lot of custom scripts.
Testing my LoginPress staging environment I found that processes got executed when the login screen of LoginPress was shown. Investigation showed that is_login() is false.
I can imagine that you do not want to “hack” into the WP code so perhaps your own is_LP_login() function?Forum: Plugins
In reply to: [WooCommerce] $product populated new version different?Thanks for the additional information.
@emma24 Thanks for the additional explanation. I want to submit an enhancement request like an option to set to show the LoginPress screen whenever a new dashboard is selected. Where can I best submit that?
@emma24 Thanks for your explanation that it should work.
I tried it again and found that if I specify the full wp-admin url of the site that has LoginPress activated I get the LoginPress login screen.
But if I first log in regularly on the main site within the multi site and then switch to the dashboard I do not get the login screen. Perhaps this is because I am already logged in on the main site?
Shouldn’t LoginPress detect this and ask again to log in? After all the userid/password settings can be different per sub site?Forum: Plugins
In reply to: [WooCommerce] $product populated new version different?Thank you for your reply.
The point I want to get across is: how should hobby web designers/developers like me be aware that either the sequence of actions or the population of global variables is changed for version to version?
Not only for WP but also WC?I did not get a respons on my suggestion for adding meta tag functionality to WC? Will this be put on some enhancement list?
Forum: Plugins
In reply to: [WooCommerce] $product populated new version different?Again thanks for your suggestion.
I would like to point out that either WP or WC did change something in the sequence of events as before WP 6.7.1 and WC 9.5.1 $product was populated when action wp_head was fired!
Can someone please respond on that?I tried the first suggestion with woocommerce_after_single_product_summary but that fires too late.
The second one merely changes the sequence slightly but does not take care of populating $product in time?Currently I have found a solution by getting the product info myself via
$product = wc_get_product( get_the_ID() );Maybe it would be a good addition to WC to offer some functionality in WC for adding meta tags? I am a hobby developer but surely other users of WC would like something like this too?
Forum: Plugins
In reply to: [WooCommerce] $product populated new version different?Thanks for your info. But if I want to add meta tags to the header then this action will be fired in time?
Thank you in advance!