Sean Donovan
Forum Replies Created
-
Brought my site down too, yesch… If only a fraction of the seven thousand sites had auto-update on means they are all white page of death.
Forum: Themes and Templates
In reply to: [Mystique] Fix for Mystique under PHP 8.1As an aside – if you only have one author on the blog, you can get rid of the blog author link on every post by modifying “content.php”, line 31 by commenting out the PHP that generates the link:
<p class="author alignleft"><?php //_e( 'Posted by', 'mystique' ); ?> <?php //the_author_posts_link(); ?></p>
Forum: Networking WordPress
In reply to: Can’t Login to My Second Website (Multisite)Same problem – subdomain dashboards worked, but logging into a secondsite domain dashboard did not, got cookie errors.
Changed to false in wp-config.php:
define(‘SUBDOMAIN_INSTALL’, false);
And the dashboard of all of them now work.
It is a quirk of the way the SSL certificate works via Cloudflare (as elaborated on above, WordPress doesn’t know it is running SSL) and that I use a SI-Contact shortcode in a custom theme which loads the contact form on every page.
Done
Forum: Reviews
In reply to: [Timely All-in-One Events Calendar] Updates Break EverythingI have been using the Google calendar for a month now and haven’t look back. After I disabled this plugin, I was using Google Webmaster Tools and noticed that the number of pages/links on my site dropped by over 50,000. In other words, the Google bot was indexing a crap load of calendar links. I was glad to get rid of the useless pages.
Forum: Plugins
In reply to: [WooCommerce] Paypal payments are failing with alt email addressYah, that worked for me too. The IPN was reporting:
Validation error: PayPal IPN response from a different email address () Order status changed from pending to on-hold.
Oops.
Forum: Plugins
In reply to: [W3 Total Cache] Cache not clearing. Get white screen insteadI think the most recent version of W3 Total Cache fixed this problem.
Forum: Plugins
In reply to: [WooCommerce] payment methods by product category@qrafts – I added code that does what you want to the post you referenced.
Forum: Plugins
In reply to: [WooCommerce] Restrict payment options based on productA simple filter to disable a user-specified payment gateway when a product with a user-specified category is added to the shopping cart
/* * A simple filter to disable a user-specified payment gateway when a product with a user-specified category is added to the shopping cart * - Note: If multiple products are added and only one has a matching category, it will remove the payment gateway * Requires: * payment_NAME : One of the five hardcoded Woocommerce standard types of payment gateways - paypal, cod, bacs, cheque or mijireh_checkout * category_ID : The ID of the category for which the gateway above will be removed. Get the ID by clicking on the category under Products -> Categories and reading the "tag_ID" in the address bar * i.e. https://ubuntu.humble.lan/wp-admin/edit-tags.php?action=edit&taxonomy=product_cat&tag_ID=20&post_type=product <-- the tag_ID is 20 * Coded by sean _ at _ techonfoot.com * Thanks to boxoft - https://stackoverflow.com/questions/15303031/woocommerce-get-category-for-product-page * Usual free code disclaimer - use at your own risk * This code was tested against Woocommerce 2.0.8 and WordPress 3.5.1 */ function filter_gateways($gateways){ $payment_NAME = 'paypal'; // <--------------- change this $category_ID = '20'; // <----------- and this global $woocommerce; foreach ($woocommerce->cart->cart_contents as $key => $values ) { // Get the terms, i.e. category list using the ID of the product $terms = get_the_terms( $values['product_id'], 'product_cat' ); // Because a product can have multiple categories, we need to iterate through the list of the products category for a match foreach ($terms as $term) { // 20 is the ID of the category for which we want to remove the payment gateway if($term->term_id == $category_ID){ unset($gateways[$payment_NAME]); // If you want to remove another payment gateway, add it here i.e. unset($gateways['cod']); break; } break; } } return $gateways; } add_filter('woocommerce_available_payment_gateways','filter_gateways');
Add it to your theme’s functions.php
I will turn it into a plugin for a few $$$ if anybody is interested.
Forum: Plugins
In reply to: [W3 Total Cache] Latest version of the plugin makes apache crashLikely due to a recently introduced database caching bug that leaves a growing number of files behind (tens of thousands of them) in the cache directory.
See https://www.ads-software.com/support/topic/cache-not-clearing-get-white-screen-instead?replies=8
to clear the cache manually if the plugin can not.
Sean.
Forum: Plugins
In reply to: [W3 Total Cache] Cache not clearing. Get white screen insteadLol, that won’t work because there are way too many file to clear the cache which times out PHP…
I’ve been clearing the cache via an SSH bash script:
#!/bin/bash echo "Running clear command" rm -rf /home/<complete directory to your blog/>/blog/wp-content/cache/* echo "Cleared"
and replace “<complete directory to your blog>” with the exact directory, i.e. /home/myusername/http/wp-content/cache/*
Few shared hosts give you access to the command line though.
(FYI – Running a bash script via PHP, although possible, will likely fail too)
GL.
Forum: Plugins
In reply to: [W3 Total Cache] Cache not clearing. Get white screen insteadNo, W3TC needs the config folder
Forum: Plugins
In reply to: [W3 Total Cache] Cache not clearing. Get white screen insteadEither through FTP by deleting everything under the cache and w3tc directory or through SSH.
FTP will take hours if the cache is large as it has to recurse into the directory.
Best is probably to ask your host to do it, as it’s in their best interest not to have a huge number of useless files floating around.
Forum: Plugins
In reply to: [W3 Total Cache] Cache not clearing. Get white screen insteadLikely because your cache is humungous – https://www.ads-software.com/support/topic/wp-contentcache-folder-at-20-gb
W3 database caching creates an enormous mess.