amityweb
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] WooCommerce unused function stylesheets all still loadedThank you, although it is my opinion these should be auto-removed if not in use, for those who have not the experience to do such work as part of an optimisation process themselves. It would lower optimisation and makes no sense to keep them as default if not used.
Thanks
Forum: Plugins
In reply to: [WooCommerce] WooCommerce unused function stylesheets all still loadedThis script seems to have worked and not seen any negative effects on the site yet:
/*----------------------------------------- REMOVE UNNEEDED STYLESHEETS -----------------------------------------*/ function custom_remove_stylesheets() { global $wp_styles; $enqueued_styles = array(); $remove_styles = array( 'classic-theme-styles', 'wc-blocks-', ); foreach( $wp_styles->queue as $handle ) { if(stripos_array($handle, $remove_styles) !== false) { wp_dequeue_style( $handle ); } } } add_action( 'wp_print_styles', 'custom_remove_stylesheets' ); function stripos_array($haystack, $needles) { foreach($needles as $needle) { if(($res = stripos($haystack, $needle)) !== false) { return $res; } } return false; }
Credit to Tryth on here for use of their stripos_array function. https://stackoverflow.com/questions/27816105/php-in-array-wildcard-match
Hi. Is there a solution for this yet? When we go to our login page (which is changed using iThemes security) it actually shows the admin login form and not your password protect. And also wp-login.php works but it should not.
Thanks
@scmsteve I think you’re right because after I posted that I had an issue I realised my variations table plugin is modified and pulled out of the updates check. So my plugin has not been updated and I have a task set to look into what the modifications are so I can apply it to the updated one.
I don’t usually modify plugins but sometimes you have to. And the risk is this happening!
Try disabling woo-variations-table-grid, it’s mentioned in the error. I’m not at my computer anymore to try.
@devtrials learn WP CLI because for issues like this its amazing. This is the rollback command:
wp plugin update woocommerce --version=7.8.2
Same here, downgraded and OK now.
I wonder if its related to another plugin or theme as this only happened on one website we have, but we have other WooCommerce sites that upgraded OK. Any of you have any these plugins:
+-------------------------------------------------------+----------+-----------+----------+ | name | status | update | version | +-------------------------------------------------------+----------+-----------+----------+ | advanced-custom-fields-pro | active | none | 6.1.7 | | AGWooCommerceBarclayePDQPaymentGateway-premium | active | none | 4.5.6 | | auto-image-attributes-from-filename-with-bulk-updater | active | none | 4.3.1 | | taxonomy-terms-order | active | none | 1.7.7 | | classic-editor | active | none | 1.6.3 | | enhanced-e-commerce-for-woocommerce-store | active | none | 6.3.7 | | divi_cpt_layout_injector | active | none | 4.7 | | divi_module_acf | active | none | 3.3 | | facebook-for-woocommerce | active | none | 3.0.29 | | flexible-shipping | active | none | 4.21.5 | | gravityforms | active | none | 2.7.10 | | woocommerce-products-filter | active | none | 1.3.4.1 | | better-wp-security | active | none | 8.1.7 | | klarna-checkout-for-woocommerce | active | none | 2.11.3 | | klaviyo | active | none | 3.2.1 | | mailchimp-for-woocommerce | active | none | 3.1 | | wp-nested-pages | active | none | 3.2.4 | | ninjafirewall | active | none | 4.5.8 | | pixelyoursite | active | none | 9.4.0.1 | | woo-permalink-manager | active | none | 2.3.9 | | product-catalog-feed-pro | active | none | 4.0.7 | | public-post-preview | active | none | 2.10.0 | | redirection | active | none | 5.3.10 | | redis-cache | active | none | 2.4.3 | | regenerate-thumbnails | active | none | 3.1.5 | | search-by-sku-for-woocommerce | active | none | 0.8.0 | | uk-cookie-consent | active | none | 3.0.3 | | tracking-code-manager-pro | inactive | none | 2.0.10 | | woocommerce | active | available | 7.8.2 | | woocommerce-advanced-bulk-edit | active | none | 5.0.1 | | woocommerce-paypal-payments | active | none | 2.2.0 | | woocommerce-product-price-based-on-countries | active | none | 3.2.0 | | woocommerce-price-based-country-pro-addon | active | none | 3.3.0 | | woocommerce-gateway-stripe | active | none | 7.4.1 | | woo-variations-table-grid-modified | active | none | 11.3.11 | | wp-migrate-db | active | none | 2.6.8 | | wp-rocket | active | none | 3.14.2.1 | | wp-safe-mode | inactive | none | 1.3 | | wpvivid-backuprestore | active | none | 0.9.88 | | duplicate-post | active | none | 4.5 | | wordpress-seo | active | none | 20.11 | | SupportCenterMUAutoloader | must-use | none | | | 0-ninjafirewall | must-use | none | 1.0 | | wp-migrate-db-pro-compatibility | must-use | none | 1.2 | | advanced-cache.php | dropin | none | | | object-cache.php | dropin | none | | +-------------------------------------------------------+----------+-----------+----------+
Its because in your code you have this:
$feetitle=''; if($this->get_prop('append_fee')) { $fee_amount = $this->get_add_fee(); $feetitle="- ".wc_price($fee_amount); }
But append_fee is a yes/no choice in the database, so $this->get_prop(‘append_fee’) returns true even if you choose no.
I have changed it to the following and its working now. Please can you fix it for next update.
$feetitle=''; if($this->get_prop('append_fee') != 'no') { $fee_amount = $this->get_add_fee(); $feetitle="- ".wc_price($fee_amount); }
Ok will give that a go, thank you. We have a script that runs on multiple servers to update WP and plugins, so will add this command to run after all that, to reset it back.
Do you know why it would change, what other object cache would change it? We’re only using Redis.
Forum: Plugins
In reply to: [Simple Download Monitor] Password protection not workingYes I checked that.
How could PHP prevent direct download of a file in the uploads folder? Thought you’d need .htaccess/nginx or put it in a folder above public.
I have written my own download script now to be safer. I utilise .htaccess/nginx to block direct access of files in the folder, then PHP can serve it if the password is correct.
As per this post, hierarchical has to be true
https://www.ads-software.com/support/topic/reorder-not-showing-for-custom-cpt/There was no detail about this. It would be good if it still shows the link but showed a message to enable hierarchical.
Also, I dont want hierarchical, it should be possible to reorder categories that are not hierarchical.
Thanks
Fantastic, thats great. I love it when developers are responsive and address issues! I dont see that too often, so thanks a lot!
Yes it’s the minification. Disabling it completely and it works ok.
I chose to exclude the file from the list but it didn’t work.
So maybe it’s not the right file, it’s not in the list? In that case I’ll try to find the file and follow your instructions.
Does Cornerstone rename cached files? I can’t find cs-app.js or cs-app.min.js on the site when SGO is disabled. So the problem I have is how to find the correct file and path to excluded it from SGO.
Thanks for your help!
If there is no caching applied in the dashboard could you explain why the problem file is in this path:
/wp-content/uploads/siteground-optimizer-assets/Then when I disable SGO the file path is back to the cornerstone plugin path.
So if it’s not cache, then SGO is doing something else.