WordPress theme block background
WordPress theme block background
WordPress theme block background
You can use the woocommerce_order_status_changed action to find a failed order transition, and syslog to write your log, assuming the function is not disabled in your PHP configuration. add_action( ‘woocommerce_order_status_changed’, function ( $order_id, $old_status, $new_status ) { if ( ‘failed’ !== $new_status ) { return; } $order = wc_get_order( $order_id ); if ( ! $order … Read more
Plugin to access awstats or ~/access-logs
How to chill out WordPress ajax requests? (Rate limiting)
You load files on init, and your loaded file hooks something to init. At the point the file loads init has already happened, you’re adding the action too late. Just load the files outside of a function and make sure anything in those files are hooked to the proper action.
It appears that REST API doesn’t support all the meta_query parameters that WP_Query does. Only the basic meta queries with some comparison operators are supported. Therefore we need to make one of workarounds to get what we want: Add some REST API Filter to our theme/plugin add_filter(‘rest_{post_type}_query’, function($args, $request) { $params = $request->get_params(); if(isset($params[‘meta_compare’])) { … Read more
Although a little clunky I’ve found a passable solution to this problem using mod_security. To implement this, enable modsecurity in Apache (presumably with a2enmod security). Then edit the config file. On my Ubuntu based systems this is at /etc/modsecurity/modsecurity.conf and as follows: Ensure SecRequestBodyAccess is On (and I assume SecRuleEngine to DetectionOnly). You may also … Read more
There is no single correct way to achieve this. The work to do this lies outside of WordPress itself. The general process requires the following steps. Point the new domains/subdomains to your WordPress site. I’d recommend using A records as CNAMES have gotchas for new players. Never use a CNAME on example.com (but you can … Read more
that wordpress.org page was probably written by someone that do not get security. Escaping is done to make sure that your output, when is part of an HTML page, is displayed to the user as you intend it to be which means converting thing like “<” to the appropriate HTML entity. Yes, if you do … Read more
I am using the CookieYes Consent Management plugin. When cookies were accepted, jQuery loaded otherwise I got the error. By accepting cookies in various categories, I was able to narrow down which cookie loaded jQuery. In my case it was a Mailchimp plugin. I made this a ‘necessary’ cookie and now all is well! Thanks … Read more