strangerstudios / pmpro-woocommerce

Connect Paid Memberships Pro with WooCommerce and WooCommerce Subscriptions to sell membership products and offer members-only product discounts.
https://www.paidmembershipspro.com/add-ons/pmpro-woocommerce/
46 stars 32 forks source link

PMPro Woocommerce addon adds 5 seconds to EVERY page load on my site #50

Closed joshua777 closed 3 years ago

joshua777 commented 7 years ago

PROBLEM: I used the Google Chrome F12 Timeline function to pinpoint a MAJOR problem with the PmPro Woocommerce Addon version 1.4. It adds 5 seconds to the load time of EVERY page on my site! The problem is happening on a Windows Server 2012 installation running Plex Onyx.

SYMPTOM: The slowdown on the timeline comes from trying to load a nonexistent css file, which is: Its trying to load: http://sitedomainname/wp-content/plugins/css/C:/Inetpub/vhosts/sitedomainname/httpdocs/wp-content-plugins/pmpro-woocommerce/pmpro-woocommerce.php?ver=c559f595885615937d00df08e048e9a3

This problem began with the PmPro Woocommerce addon version 1.4. It wasn't happening before.

TROUBLESHOOTING ATTEMPTED SO FAR:

  1. Deactivated and reactivated PmPro plugin. No change.
  2. Deactivated PMPro Woocommerce addon. Page load times reduce by 5 seconds.
  3. Reactivated PMPro Woocommerce addon. page load times increase again by 5 seconds.

Please advise how to fix this.

joshua777 commented 7 years ago

P.S. This problem appears to be a byproduct of the following change in version 1.4 "BUG/FIX: Moved CSS load to proper WordPress action hook"

joshua777 commented 7 years ago

SOURCE: https://wordpress.org/plugins/pmpro-woocommerce/changelog/

joshua777 commented 7 years ago

Backtracked to Plugin version 1.3.1, which is the previous version, and the problem goes away.

joshua777 commented 7 years ago

When I backtrack from 1.4 to 1.3.1 and go to the join screen, the following error occurs: "A Payment Gateway must be set up before any payments will be processed."

Now I can't have new members.

This is entirely unsatisfactory and needs to be fixed ASAP.

joshua777 commented 7 years ago

If it can't be fixed soon, I may have to switch to Woocommerce subscriptions.

joshua777 commented 7 years ago

This is a HUGE problem because the delay in loading pages cause MASSIVE cpu utilization on my site approaching 100%. This problem MUST be fixed soon.

joshua777 commented 7 years ago

FURTHER TROUBLESHOOTING:

  1. The Plesk php setting for "open_basedir" was set to: "{WEBSPACEROOT}{/}{:}{TMP}{/}".
  2. Changing it to "none" or "{DOCROOT}{/}{:}{TMP}{/}" or "/" did not fix the problem with version 1.4.

Server config:

  1. Plesk Onyx update 18.
  2. Windows server 2012 R2.
  3. All latest updates and patches installed.

Please fix ASAP!

joshua777 commented 7 years ago

The settings in the wp_config.php file related to this:

"/* WordPress absolute path to the Wordpress directory. / if ( !defined('ABSPATH') ) define('ABSPATH', dirname(FILE) . '/');"

joshua777 commented 7 years ago
  1. Upgraded to version 1.4.1, which is one version beyond the version with the problem.
  2. Problem STILL persists.

Please fix asap.

joshua777 commented 7 years ago

P.S.

Implemented the fix suggested in the following link on version 1.4.1 and it fixes the problem. https://github.com/strangerstudios/pmpro-woocommerce/issues/52

joshua777 commented 7 years ago

The above fix:

  1. Reduces my page load times from 11 seconds to 3 seconds.
  2. Dramatically lowers the cpu utilization on my server.

Please fix this ASAP. PmPro!

strangerstudios commented 7 years ago

We will fix. And you should still consider switching to WooCommerce Subscriptions.

joshua777 commented 7 years ago

Jason Coleman,

Thanks. Hope the fix comes SOON. Its a TRIVIAL fix that could be posted in less than 5 minutes.

I'm quite surprised that you allowed this MAJOR problem to persist for about a week before you noticed and responded to it on either Wordpress.org or this forum. You might want to consider consulting this resource and Wordpress.org support more frequently. If you don't, it might alienate your user base.

It's very interesting and even NOBLE that you would use this thread to actually promote a competitor's product, in this case Woocommerce Subscriptions. I've got some questions about why you would recommend it:

  1. From my cursory evaluation of it so far, Woocommerce Subscriptions doesn't allow the selling of Memberships, but only physical products. For instance, it doesn't allow you to change your site "Role" within Wordpress based on a subscription you bought through it. Did I miss this feature? I'm sure you are looking at it because its a threat to your product line.
  2. Have you experimentally tried Woocommerce Subscriptions to implement the selling of memberships? Did it work?
  3. Are you in negotiations with Auttomatic, like Woocommerce about a year ago, to be PURCHASED by Wordpress.com? That would be FANTASTIC! I would LOVE to see your wonderful product merged with core Wordpress and be made into a standard feature. If you aren't in such negotiations, I'd recommend contacting them.
  4. Do you NOT view them as a threat because they are expensive and your basic product is free? Their product is $199 per year and your basic product is free with $99/year support. I was on your support list for a year but didn't get much out of it so I left.

Just curious. I'm a software engineer thinking strategically.

Anyway, keep up the great work on an indispensable product used by thousands. Your contributions and hard work as a small business and entrepreneur (along with your sister) are much appreciated.

strangerstudios commented 7 years ago

PMPro WooCommerce 1.4.2 was just pushed out which includes the small fix to the CSS enqueueing. I hope it fixes your load time issues.

Its a TRIVIAL fix that could be posted in less than 5 minutes.

In these cases you should be able to patch your own version of the plugin, then notify us here, and if we do the same or a similar patch in our software it will be included in the next update and you'll be okay.

We're also open source software, so if you are able to do a pull request that makes it even easier for us to make the update.

Even small one line changes like this need to be tested and pushed out to our own update server and WP.org and so take a bit longer than 5 minutes.

I'm quite surprised that you allowed this MAJOR problem to persist for about a week

I'm not sure if you posted this into the paid support forums, but that's where our focus is. We have dozens of addons, plus core updates, new work/etc. And so we're stretched pretty thin. I wish we weren't. I need to hire more to make it better.

We are trying to checkin on the .org more. We had a nice little RSS thing setup that a change there broke and I should set that back up so we're alerted more quickly to threads starting there.

in this case Woocommerce Subscriptions. I've got some questions about why you would recommend it

I'm never shy about recommending a competing product if it works better. Generally if you need to run WooCommerce, their own plugin is the best way to add subscriptions to it. I find a lot of people use our software cause it's free vs $300/year and you'll get into trouble if that's the only reason you're using PMPro/PMPro WC. That said, there are valid use cases and we do have a different philosophy about membership sites which works better for some solutions.

I'm slightly sour on this subject because we've spent a lot of time updating PMPro WC recently to work with breaking changes they made in WC and WC Subs. They have more breaking changes in the pipe line. I'm going to reach out to Automattic to see if they will spend some resources maintaining our bridge plugin as well. I suspect it might benefit their business more than ours.

it doesn't allow you to change your site "Role" within Wordpress based on a subscription you bought

I'm not sure, but you could probably write something similar to our gist to change roles based on level to change roles based on WC Sub

Have you experimentally tried Woocommerce Subscriptions to implement the selling of memberships? Did it work?

I don't know what you mean by "membership" here. They just call "memberships" subscriptions in their world. Their tools for locking content might be under developed compared to ours. But often times sites get too clever with how they are locking things down anyway.

Are you in negotiations with Automattic

I haven't had serious conversations with them, but from the small ones I have I am certain they are 0% interested in acquiring PMPro. They think WC + WC Subs is the solution to membership sites.

Anyway, keep up the great work on an indispensable product used by thousands. Your contributions and hard work as a small business and entrepreneur (along with your sister) are much appreciated.

Thanks! It's rough right now, but we're still trying to make the best open source membership solution and I think we're doing the best of anyone right now.

joshua777 commented 7 years ago

Jason,

  1. Thanks for the reply.

  2. I'd have to agree that PmPro is the best open source membership solution that I've found. An experienced techie friend who sets up Wordpress sites for a living recommended it and his recommendation was a good one.

  3. By "membership" i mean a simple store item in Woocommerce that changes your "Role" or "Membership" level akin to your product. I don't see that feature implemented in their product, but I haven't actually tried it. Just watched their video and read their docs.

  4. Based on my examination of the Woocommerce Subscriptions product, they don't have anything even close to the complete and comprehensive membership functionality you offer.
    4.1 It's only for physical products and not memberships ("Role" changes).
    4.2 It doesn't control access to content based on site "role" or "membership level".

This may change, because this is a lucrative market that they will want to chase eventually. For now, your family jewels are safe. :-)

  1. Its quite admirable that you would be so open minded about competitor products and discuss them openly in this forum. Shows that your heart is definitely in the right place.

  2. I just installed the 1.4.2 update you posted after my last post and it DOES fix the problem. THANKS for the quick turn-around! I'm sure you're a quite busy fellow. Thanks for taking the time to help with this important problem that affects MANY.

:-)

stickymathscom commented 7 years ago

Joshua777,

Woocommerce + Woocommerce Subscriptions + PM Pro + PM Pro Woocommerce Add On, does actually allow a membership to be purchased. It's quite easy if you need any info just ask.

There are cheaper alternatives but I have found my combination flawless so far.

When you mention user roles, if your referring to wordpress user roles, that can also be implemented in many ways.

joshua777 commented 7 years ago

Stickymathscom,

What I meant was BY ITSELF Woocommerce Subscriptions WITHOUT PmPro does NOT allow memberships to be purchased or to enforce the security and access control that is associated with the membership. You STILL need PmPro.

I don't need to support physical shipped item subscriptions. I only need downloadable virtual content subscriptions which Woocommerce Subscriptions, by the way, does NOT support as far as I am aware. Neither does PmPro. That functionality takes yet another product, which is the following that I use: https://wordpress.org/plugins/download-manager/

It would be NICE if a SINGLE product INTEGRATED supported all the following features with a SINGLE plugin, but I have found none:

  1. Physical item subscriptions. (Woocommerce Subscriptions)
  2. Memberships. (PMPro)
  3. Downloadable virtual item subscriptions. (Wordpress Download Manager)

It takes THREE products/plugins to do all the above things at the same time on the same site. If anyone knows of an INTEGRATED product that does all the above, please speak up.

Jason: Expanding PMPro to do the above might bring you more revenue and business.