rosbiffer
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Display total sales on frontendI’ve added this snippet which works. What would be the easiest way to add a category filter to it?
// function that runs when shortcode is called function report_total_sales() { global $wpdb; $order_totals = apply_filters( 'woocommerce_reports_sales_overview_order_totals', $wpdb->get_row( " SELECT SUM(meta.meta_value) AS total_sales, COUNT(posts.ID) AS total_orders FROM {$wpdb->posts} AS posts LEFT JOIN {$wpdb->postmeta} AS meta ON posts.ID = meta.post_id WHERE meta.meta_key = '_order_total' AND posts.post_type = 'shop_order' AND posts.post_status IN ( '" . implode( "','", array( 'wc-completed', 'wc-processing', 'wc-on-hold' ) ) . "' ) " ) ); return absint( $order_totals->total_sales); } // register shortcode add_shortcode('total_sales', 'report_total_sales');
Forum: Fixing WordPress
In reply to: WordPress or my host?Thanks for that. No issues in the last 30+ hours so looks like the host was at fault.
Forum: Plugins
In reply to: [W3 Total Cache] Site not loadingI deactivated the plugin via admin and it seems that is what stopped the site loading at all. Eventually I had to rename the plug in the plugins folder to get admin to load. Then I renamed the folder back and it worked again and allowed me to reactivate the plugin.
So the question is if I want to temporarily disable to plugin to check if it clashing with anything how do I do it?
The errors only appear on Firefox so I’m going to ignore them – I haven’t found if they affect functionality or not.
I only asked in case you’d seen it before.
I use Tsohost in the UK for hosting. They’ve just told me (with regard to another question I asked on here about caching) “We are afraid that there is no way to use read/write on the Memcached server using the hosting package as it is still a shared one, despite having your own PHP resources that are not shared between you and the other customers.” So I guess that answers that one too.
Thanks again for engaging.
Unfortunately not. My host is seemingly telling me that whilst they are both installed and running I can’t use them. Not sure I understand but am no expert as you can tell!
I have memcached and redis installed on my host’s server. I’m using W3 total cache. If I select either memcached or redis for the cache method I just get a can’t connect message. Even this command from root: $fp = fsockopen(“127.0.0.1”, 11211); say’s can’t connect so just wondering if there’s something in AIOWS that might stop it? (long shot!)
(Obviously do need help but apparently am not going to get any…)
Could this same plugin be stopping my access to the memcahced and redis servers on my hosting?
Thanks for the reply but unfortunately it’s way above my ability level. I’ve just disabled the feature for now…
Wow, not quite the helpful answer I was hoping for…
Thanks. The string in issue is https://mysite.com/wp-content/plugins/raffle-ticket-generator-platinium/includes/image.php?t_number=7459-747Sim-2020-101&img_src=https://mysite.com/wp-content/plugins/raffle-ticket-generator-gold/tickets/an_image_file.png
How would I add that as an exception?
I have a similar issue – did you solve it?
Forum: Plugins
In reply to: [WP Job Manager] Edit multiple job expiry datesSo no way of bulk setting the expiry date?
Forum: Plugins
In reply to: [W3 Total Cache] Uncaught SyntaxError: Invalid or unexpected tokenWhat I mean is, if I leave that blank is nothing minified?
Forum: Plugins
In reply to: [W3 Total Cache] Uncaught SyntaxError: Invalid or unexpected tokenWith this new version in manual mode do I have to add all js and css files manually for it to work?
Forum: Plugins
In reply to: [W3 Total Cache] Uncaught SyntaxError: Invalid or unexpected tokenI’ve just tried switching to manual mode and then under CSS Minify selecting Minify only (not combine) and it gets rid of the error. Then switching back to Combine and minify and the error is still not there. Very odd. Am I supposed to add style sheets manually under CSS file management?
- This reply was modified 4 years ago by rosbiffer.