sx1001
Forum Replies Created
-
OK, thanks for the answer.
Still I’m a bit confused by your statement “What you are sugegsting cannot be done with any plugin.”. Yes, indeed, maybe raw query results cannot easily be cached – but what could be done is implement a custom wpdb extension and at least add caching to get_var(), get_col(), get_row() and get_results and, for a given set of parameters, cache the return values of these functions if they the queries match a given whitelist entry/pattern.
This way, those functionalities would still use the wpdb->query() function indeed, yes, but only once every X seconds/minutes. Effectively this would allow for storing/caching the final return-values of those wpdb functions (which are mainly objects or arrays when uing ARRAY_A parameter) in a memcached/redis cache and return them the next time the same SQL query is ran on the same wpdb function.
Don’t you think this would be a major major improvement? It would allow developers to cache so many stuff which runs over and over again during all pageloads.
Forum: Plugins
In reply to: [WooCommerce] Woocommerce: Tax calculation – influence of Company?!I found the issue.
Indeed it was the OSS plugin (“WooCommerce One Stop Shop Verfahren (OSS)”) by vendidero causing these issues…
In the changelog it’s mentioned as “Revert (default) exclusion of b2b orders without vat id from OSS. Version bump to 1.6.2.”.
Now it works as expected.
Forum: Plugins
In reply to: [WooCommerce] Woocommerce: Tax calculation – influence of Company?!The TAX Setting of 23% for PT is the default setting – I didnt change anything w.r.t. it. See here:
View post on imgur.com
Yes some plugins are outdated right now, as we have specific release cycles – but this bug is pretty old and alos occured when we had everything with the newest versions.
See the following screenshots of the order review, with and without company, but shipping to Portugal:
View post on imgur.com
VAT changes from 23% to 19%.
I’m open to do a common debug session remotely via Sharing of my Monitor if you are interested. I’m a developer, hence we could potentially come to a conclusion much faster than via CHAT / FORUM.
Forum: Plugins
In reply to: [WooCommerce] Woocommerce: Tax calculation – influence of Company?!Right now it looks outdated, but we had this problem for hte last 1.5 years even with updated versions etc. – we simply could never nail it down to the origin of the “company” field.
Screenshots:
WooCommerce Tax Settings
System Status:
` WordPress Environment</p> <p>WordPress address (URL): https://xxx<br>Site address (URL): https://xxx<br>WC Version: 8.5.2<br>REST API Version: ✔ 8.5.2<br>WC Blocks Version: ✔ 11.8.0-dev<br>Action Scheduler Version: ✔ 3.7.1<br>Log Directory Writable: ✔<br>WP Version: ❌ 6.4.4 – Es ist eine neuere Version von WordPress verfügbar (6.5.3)<br>WP Multisite: –<br>WP Memory Limit: 512 MB<br>WP Debug Mode: –<br>WP Cron: ✔<br>Language: de_DE_formal<br>External object cache: – Server Environment</p> <p>Server Info: Apache/2.4.59 (Unix)<br>PHP Version: 8.1.28<br>PHP Post Max Size: 128 MB<br>PHP Time Limit: 240<br>PHP Max Input Vars: 4000<br>cURL Version: 8.6.0<br>OpenSSL/3.0.13</p> <p>SUHOSIN Installed: –<br>MySQL Version: 5.7.42-log<br>Max Upload Size: 128 MB<br>Default Timezone is UTC: ✔<br>fsockopen/cURL: ✔<br>SoapClient: ✔<br>DOMDocument: ✔<br>GZip: ✔<br>Multibyte String: ✔<br>Remote Post: ✔<br>Remote Get: ✔ Database</p> <p>WC Database Version: 8.5.2<br>WC Database Prefix: wp_<br>Datenbank-Gesamtgröße: 814.30MB<br>Datenbank-Datengröße: 718.28MB<br>Datenbank-Indexgröße: 96.02MB<br>wp_woocommerce_sessions: Daten: 9.02MB + Index: 0.14MB + Engine InnoDB<br>wp_woocommerce_api_keys: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_attribute_taxonomies: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_downloadable_product_permissions: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp_woocommerce_order_items: Daten: 2.52MB + Index: 1.52MB + Engine InnoDB<br>wp_woocommerce_order_itemmeta: Daten: 21.56MB + Index: 24.09MB + Engine InnoDB<br>wp_woocommerce_tax_rates: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp_woocommerce_tax_rate_locations: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_shipping_zones: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_woocommerce_shipping_zone_locations: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_shipping_zone_methods: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_woocommerce_payment_tokens: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_payment_tokenmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_log: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_actionscheduler_actions: Daten: 1.05MB + Index: 0.61MB + Engine InnoDB<br>wp_actionscheduler_claims: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_actionscheduler_groups: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_actionscheduler_logs: Daten: 0.39MB + Index: 0.33MB + Engine InnoDB<br>wp_cmplz_cookiebanners: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_cmplz_cookies: Daten: 0.05MB + Index: 0.00MB + Engine InnoDB<br>wp_cmplz_services: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_commentmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_comments: Daten: 7.52MB + Index: 8.09MB + Engine InnoDB<br>wp_duplicator_pro_entities: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_duplicator_pro_packages: Daten: 1.14MB + Index: 0.02MB + Engine InnoDB<br>wp_grp_google_place: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_grp_google_review: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_links: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_options: Daten: 9.52MB + Index: 0.27MB + Engine InnoDB<br>wp_postmeta: Daten: 47.58MB + Index: 33.11MB + Engine InnoDB<br>wp_posts: Daten: 7.52MB + Index: 1.30MB + Engine InnoDB<br>wp_redirection_404: Daten: 5.52MB + Index: 3.38MB + Engine InnoDB<br>wp_redirection_groups: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_redirection_items: Daten: 0.02MB + Index: 0.09MB + Engine InnoDB<br>wp_redirection_logs: Daten: 0.47MB + Index: 0.17MB + Engine InnoDB<br>wp_say_what_strings: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_smush_dir_images: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_termmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_terms: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_term_relationships: Daten: 0.08MB + Index: 0.05MB + Engine InnoDB<br>wp_term_taxonomy: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_usermeta: Daten: 4.52MB + Index: 6.03MB + Engine InnoDB<br>wp_users: Daten: 0.23MB + Index: 0.23MB + Engine InnoDB<br>wp_wcpdf_invoice_number: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wcpdf_invoice_number_2022: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wcpdf_invoice_number_2023: Daten: 0.08MB + Index: 0.00MB + Engine InnoDB<br>wp_wcpdf_packing_slip_number: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wc_admin_notes: Daten: 0.13MB + Index: 0.00MB + Engine InnoDB<br>wp_wc_admin_note_actions: Daten: 0.09MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_category_lookup: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wc_customer_lookup: Daten: 0.45MB + Index: 0.39MB + Engine InnoDB<br>wp_wc_download_log: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_orders: Daten: 0.02MB + Index: 0.11MB + Engine InnoDB<br>wp_wc_orders_meta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_order_addresses: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp_wc_order_coupon_lookup: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_order_operational_data: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_order_product_lookup: Daten: 2.52MB + Index: 2.58MB + Engine InnoDB<br>wp_wc_order_stats: Daten: 1.52MB + Index: 0.56MB + Engine InnoDB<br>wp_wc_order_tax_lookup: Daten: 0.39MB + Index: 0.34MB + Engine InnoDB<br>wp_wc_product_attributes_lookup: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_product_download_directories: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_product_meta_lookup: Daten: 0.06MB + Index: 0.09MB + Engine InnoDB<br>wp_wc_rate_limits: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_reserved_stock: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wc_tax_rate_classes: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_webhooks: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_gzd_dhl_im_products: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_gzd_dhl_im_product_services: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_gzd_dhl_labelmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_gzd_dhl_labels: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_gzd_packaging: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_woocommerce_gzd_packagingmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_gzd_shipmentmeta: Daten: 6.52MB + Index: 4.03MB + Engine InnoDB<br>wp_woocommerce_gzd_shipments: Daten: 1.52MB + Index: 0.45MB + Engine InnoDB<br>wp_woocommerce_gzd_shipment_itemmeta: Daten: 4.52MB + Index: 5.03MB + Engine InnoDB<br>wp_woocommerce_gzd_shipment_items: Daten: 2.52MB + Index: 1.44MB + Engine InnoDB<br>wp_woocommerce_gzd_shipment_labelmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_gzd_shipment_labels: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_gzd_shipping_provider: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_gzd_shipping_providermeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wpmailsmtp_debug_events: Daten: 0.05MB + Index: 0.00MB + Engine InnoDB<br>wp_wpmailsmtp_tasks_meta: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wpml_mails: Daten: 576.52MB + Index: 0.00MB + Engine InnoDB<br>wp_yoast_indexable: Daten: 1.52MB + Index: 0.28MB + Engine InnoDB<br>wp_yoast_indexable_hierarchy: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wp_yoast_migrations: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_yoast_primary_term: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_yoast_seo_links: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_yoast_seo_meta: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB Post Type Counts</p> <p>attachment: 811<br>custom_css: 1<br>custom-css-js: 6<br>elementor_library: 1<br>nav_menu_item: 82<br>note: 1<br>oembed_cache: 1<br>page: 35<br>post: 1<br>product: 316<br>product_variation: 18<br>revision: 392<br>shop_coupon: 43<br>shop_order: 5770<br>shop_order_refund: 156<br>wp_global_styles: 1 Security</p> <p>Secure connection (HTTPS): ✔<br>Hide errors from visitors: ✔ Active Plugins (29)</p> <p>Antispam Bee: von pluginkollektiv – 2.11.5<br>BackWPup: von WP MEDIA SAS – 4.0.2<br>Change wp-admin login: von wpexpertsio – 1.1.8<br>Complianz | GDPR/CCPA Cookie Consent: von Really Simple Plugins – 6.5.6<br>Simple Custom CSS and JS: von SilkyPress.com – 3.46<br>DHL Shipping Germany for WooCommerce: von DHL – 3.6.4<br>Disable WP REST API: von Jeff Starr – 2.6.1<br>Duplicator Pro: von Snap Creek – 4.0.1.1<br>GTranslate: von Translate AI Multilingual Solutions – 3.0.5<br>Imsanity: von Exactly WWW – 2.8.3<br>Language Fallback: von Bernhard Kau – 2.0.0<br>Limit Login Attempts Reloaded: von Limit Login Attempts Reloaded – 2.26.9<br>Local Google Fonts: von EverPress – 0.22.0<br>Loco Translate: von Tim Whitlock – 2.6.6<br>Maintenance: von WebFactory Ltd – 4.08<br>One Stop Shop für WooCommerce: von vendidero – 1.6.0<br>Redirection: von John Godley – 5.4.2<br>Germanized für WooCommerce: von vendidero – 3.15.6<br>WooCommerce PayPal Payments: von WooCommerce – 2.5.3 (Update auf Version 2.7.1 ist verfügbar)<br>PDF Invoices & Packing Slips for WooCommerce: von WP Overnight – 3.7.7<br>WooCommerce Product Dependencies: von SomewhereWarm – 1.2.8<br>WooCommerce Shipping & Tax: von WooCommerce – 2.4.2 (Update auf Version 2.5.7 ist verfügbar)<br>WooCommerce: von Automattic – 8.5.2 (Update auf Version 8.9.1 ist verfügbar)<br>WP Dashboard Notes: von Jeroen Sormani – 1.0.11<br>WP Fastest Cache: von Emre Vona – 1.2.3<br>WP Featherlight: von Cipher – 1.3.4<br>WP Mail Logging: von WP Mail Logging Team – 1.12.0<br>WP Mail SMTP: von WP Mail SMTP – 3.11.1<br>WordPress Persistent Login: von Luke Seager – 2.1.0 Inactive Plugins (5)</p> <p>Better Search Replace: von WP Engine – 1.4.5<br>Enable Media Replace: von ShortPixel – 4.1.5<br>QQWorld Auto Save Images: von Michael Wang – 1.9.8<br>Query Monitor: von John Blackbourn – 3.15.0<br>Yoast Duplicate Post: von Enrico Battocchi & Team Yoast – 4.5 Settings</p> <p>API Enabled: –<br>Force SSL: –<br>Currency: EUR (€)<br>Currency Position: right_space<br>Thousand Separator: .<br>Decimal Separator: ,<br>Number of Decimals: 2<br>Taxonomies: Product Types: external (external)<br>grouped (grouped)<br>simple (simple)<br>variable (variable)</p> <p>Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)<br>exclude-from-search (exclude-from-search)<br>featured (featured)<br>outofstock (outofstock)<br>rated-1 (rated-1)<br>rated-2 (rated-2)<br>rated-3 (rated-3)<br>rated-4 (rated-4)<br>rated-5 (rated-5)</p> <p>Connected to Woo.com: –<br>Enforce Approved Product Download Directories: –<br>HPOS feature screen enabled: –<br>HPOS feature enabled: –<br>Order datastore: WC_Order_Data_Store_CPT<br>HPOS data sync enabled: – WC Pages</p> <p>Shop-Basis: #7 – /shop/<br>Warenkorb: #8 – /warenkorb/<br>Kasse: #9 – /kasse/<br>Ihr Konto: #10 – /mein-konto/<br>Allgemeine Geschäftsbedingungen: #14 – /agb/ Theme</p> <p>Name: shopstore<br>Version: 4.1.3 (Update auf Version 4.4.8 ist verfügbar)<br>Author URL: http://athemeart.com/<br>Child Theme: ❌ – Wenn Sie WooCommerce mit einem Theme<br>das Sie nicht selbst entwickelt haben<br>an eigene Bedürfnisse anpassen<br>dann empfehlen wir die Verwendung eines Child-Themes. Siehe Wie Sie ein Child-Theme erstellen (engl.)</p> <p>WooCommerce Support: ✔ Templates</p> <p>Overrides: shopstore/woocommerce/content-product.php<br>shopstore/woocommerce/content-single-product.php<br>shopstore/woocommerce/content-widget-product.php<br>shopstore/woocommerce/global/quantity-input.php Version 6.6.0 ist veraltet. Die Hauptversion ist 7.8.0<br>shopstore/woocommerce/loop/add-to-cart.php<br>shopstore/woocommerce/single-product/meta.php<br>shopstore/woocommerce/single-product/price.php<br>shopstore/woocommerce/single-product/rating.php<br>shopstore/woocommerce/single-product/stock.php<br>shopstore/woocommerce/single-product/title.php</p> <p>Outdated Templates: ❌</p> <pre class=”wp-block-code”><code> Erfahren Sie</code></pre> <p>wie Sie aktualisieren können WooCommerce PayPal Payments</p> <p>Onboarded: ✔<br>Shop country code: DE<br>WooCommerce currency supported: ✔<br>Advanced Card Processing available in country: ✔<br>Pay Later messaging available in country: ✔<br>Webhook status: –<br>PayPal Vault enabled: –<br>ACDC Vault enabled: –<br>Logging enabled: –<br>Reference Transactions: –<br>Used PayPal Checkout plugin: –<br>Subscriptions Mode: Disabled Admin</p> <p>Enabled Features: activity-panels<br>analytics<br>product-block-editor<br>coupons<br>core-profiler<br>customer-effort-score-tracks<br>import-products-task<br>experimental-fashion-sample-products<br>shipping-smart-defaults<br>shipping-setting-tour<br>homescreen<br>marketing<br>mobile-app-banner<br>navigation<br>onboarding<br>onboarding-tasks<br>product-variation-management<br>product-virtual-downloadable<br>product-external-affiliate<br>product-grouped<br>remote-inbox-notifications<br>remote-free-extensions<br>payment-gateway-suggestions<br>shipping-label-banner<br>subscriptions<br>store-alerts<br>transient-notices<br>woo-mobile-welcome<br>wc-pay-promotion<br>wc-pay-welcome-page</p> <p>Disabled Features: customize-store<br>minified-js<br>new-product-management-experience<br>product-linked<br>settings<br>async-product-editor-category-field</p> <p>Daily Cron: ✔ Next scheduled: 2024-06-05 09:30:48 +02:00<br>Options: ✔<br>Notes: 208<br>Onboarding: completed Action Scheduler</p> <p>Abgeschlossen: 1.569<br>Oldest: 2024-05-04 20:06:41 +0200<br>Newest: 2024-06-04 13:33:59 +0200</p> <p>Fehlgeschlagen: 7<br>Oldest: 2022-10-18 21:42:56 +0200<br>Newest: 2023-08-04 12:29:32 +0200</p> <p>Ausstehend: 9<br>Oldest: 2024-06-05 04:17:03 +0200<br>Newest: 2025-01-01 00:00:01 +0100 Status report information</p> <p>Generated at: 2024-06-04 13:48:43 +02:00<br>`
- This reply was modified 2 years ago by sx1001.
Hi @mohammedeisa,
we changed it already – mysqldump doesn’t really work for us. so we went with PHPCode, multithreaded and Chunk size we varied.
Yeah ok, then we will going to patch the plugin locally and make it a bit more tolerant. I really think this would be sensible. Like having a tolerance / threshold here:
if ($tableInfo['count'] < $minVal || $tableInfo['count'] > $maxVal) { DUP_PRO_LOG::infoTrace('DB VALIDATION 1 FAIL: count check table "' . $table . '" START: ' . $tableInfo['start'] . ' END: ' . $tableInfo['end'] . ' COUNT: ' . $tableInfo['count']); $isValid = false; }Just substract / add a threshold to the if-condition. Pretty easy and convenient IMHO.
I do not understand why this is relevant for this type of question sorry.
Exactly, also here, Woocommerce, WP, Germanized for Woocommerce – ALL on the latest versions!
Same problem here, updated to 2.8.16 already, but still the problem presists.
I cleared OPCache, W3 Cache etc… nothing changed.Invalid response from server received 6 times. Please retry later by reloading this page, or contact support. (Error: Unexpected token < in JSON at position 0)
—-
Now we are getting on top of the errors received:
Invalid Image Format.
If I download that image manually and open it with any picture viewer, it works as expected. It’s a JPG file recorded with a Samsung device.
This plugin is NOT working out of the box at all, so many adjustments necessary, it’s really a big pain 🙁
And what’s more:
Had to turn off error reporting, because the plugin keeps throwing warnings which than abort the bulk operation because of wrongly formatted JSON response.E.g. this error:
Warning: filesize(): stat failed for /home/clients/xx/sites/yy/wp-content/uploads/bb_medias/2022/04/IMG-20220404-WA0011-225×400.jpeg in /home/clients/xx/sites/yy/wp-content/plugins/shortpixel-image-optimiser/class/db/shortpixel-meta-facade.php on line 735
And about the timeout status -7 mentioned above, here’s what I mean:
{Status: -7, Message: "Zeitüberschreitung während der Verarbeitung. (pass 2)", Count: 2,…} Count: 2 Filename: "xxx.png" ImageID: "1111" Message: "Zeitüberschreitung während der Verarbeitung. (pass 2)" Status: -7Dunno where this is coming from.
EDIT: Yes I know, pmpro_affiliates_checkdb() only acts no the admin_init.
Still.. if every plugin developers thinks like this adding 1-5 queries per plugin, one can potentially end up running 100 – 200 (80% of them useless or improvable) queries PER ADMIN PAGELOAD.Hi Jason,
thanks for the reply.
Sorry, but I cannot get involved – we paid for the plugin, as we did for several others – just to find out I need to start optimizing it.
I’ll give you a small idea what I’m talking about:
1. On every page load about 10-15 get_option calls which hit the DB because the result is sometimes empty and hence will not get cached by WP Object
2. Updating the different page_views, by user, by week, alone this has 3 update statements on every pageload.. I removed those via custom functions:
remove_action(“wp”, “pmpro_report_login_wp_visits”);
remove_action(“wp_head”, “pmpro_report_login_wp_views”);
remove_action(“wp_login”, “pmpro_report_login_wp_login”, 10 ,2);3. pmpro_is_ready():
// check if there is at least one level $pmpro_level_ready = (bool) $wpdb->get_var( "SELECT id FROM $wpdb->pmpro_membership_levels LIMIT 1" ); // check if the gateway settings are good. first check if it's needed (is there paid membership level) $paid_membership_level = $wpdb->get_var( "SELECT id FROM $wpdb->pmpro_membership_levels WHERE allow_signups = 1 AND (initial_payment > 0 OR billing_amount > 0 OR trial_amount > 0) LIMIT 1" ); $paid_user_subscription = $wpdb->get_var( "SELECT user_id FROM $wpdb->pmpro_memberships_users WHERE initial_payment > 0 OR billing_amount > 0 OR trial_amount > 0 LIMIT 1" );If one sets up the plugin and configures it – why have 3 queries on EVERY damn page load? If it’s really required, just update ONE flag in the DB which indicates which readiness the plugin has. But not 3 queries in the frontend on every pageload.
4. There are dozens of functions done like pmpro_affiliates_checkdb() (which is an plus-addon=) which perform several queries, like SHOW TABLE, dbDelta, etc on EVERY pageload instead of just ONCE when updating / installing it
5. For a lot of things, there’s no use of WP Object at all. E.g. getting categories, reading the membership levels etc – it’s basically a “one time setup” and often, you dont change it anymore. We use W3 TC but nothing of this is cached at all in memcache.
6. There are quirks and bugs here and there, e.g. the filter pmpro_bp_bp_get_add_friend_button. A guest cannot even “delete” a friendship, e.g. unfriending?
/** * Fix PMPro issue with restrictions: Unfriend button disappearing for guests */ if(function_exists('pmpro_bp_user_can')) { remove_filter('bp_get_add_friend_button', 'pmpro_bp_bp_get_add_friend_button' ); }7. This action is a joke:
add_action(‘init’, ‘pmpro_bp_directory_init’, 20);pmpro_bp_directory_init usees a SUPER expensive function pmpro_bp_get_members_in_directory(). getting ALL levels. Than ONE BY ONE in a loop getting the level options. It’s just crazy.
And I have dozens of findings more.
I’m willing to contribute, you can engage my freelancing which makes your plugin useable on a 10k+ users membership page.Hi,
actually, I also have a page where I use the free edition of the plugin – hence I’d like to discuss it here as I want to use it also in the free version.
Maybe this can be achieved with a general wordpress hook to “deny” a plugin from loading on a specific page – is it?
Thanks!
Is this somehow possible via a mu-plugin? To remove the init hooks of Elementor or similarly? Thanks so much!
Forum: Plugins
In reply to: [W3 Total Cache] Temp disabling all caching within a specific function?I’m not 100% sure yet, but I think, this did the trick:
# Disable WP Obj Caching ... wp_using_ext_object_cache(false); wp_cache_flush(); wp_cache_init();All subsequent function calls will have an EMPTY WP Object Cache, hence re-reading from DB.