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

PHP 8.0+ error #178

Closed michaelbeil closed 1 year ago

michaelbeil commented 1 year ago

Describe the bug A customer ran into this error after upgrading to PHP 8.0:

If running PHP 8.0 or 8.1, when you click on page 2 for the product category archives, the pagination buttons at the bottom disappear and the footer also doesn’t load. With WP debug enabled you get Fatal Error: Uncaught TypeError: Unsupported operand types: string * float

To Reproduce Steps to reproduce the behavior on customer site:

  1. Activate Paid Memberships Pro, and WooCommerce Add On
  2. Set PHP version to PHP 8.0 or higher, click on page 2 of the product category archives, the pagination buttons at the bottom disappear and the footer also doesn’t load. With WP debug enabled, see this error: Fatal error: Uncaught TypeError: Unsupported operand types: string * float in /www/y.x.com/public/wp-content/plugins/pmpro-woocommerce/pmpro-woocommerce.php:453

Expected behavior There should not be an error.

Isolating the problem:

This came up in ticket 441951.

WordPress Environment

Paid Memberships Pro 2.9.6, Paid Memberships Pro - WooCommerce Add On 1.7.4, WooCommerce 7.1.0, WordPress 6.0.2, PHP 8.0.20
andrewlimaza commented 1 year ago

I'm unable to replicate this issue, possibly due to the latest version resolving this fix. I've requested the customer to retest this and will await further feedback.

michaelbeil commented 1 year ago

I cannot replicate this either, so feel free to close if the customer is no longer experiencing it.