Title: PHP Fatal error
Last modified: August 17, 2021

---

# PHP Fatal error

 *  Resolved [2btechadm](https://wordpress.org/support/users/2btechadm/)
 * (@2btechadm)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-fatal-error-267/)
 * when I enter the product this error occurs, the page shows error 524, and the
   log looks like this “PHP Fatal error: Maximum execution time of 300 seconds exceeded
   in …wp-content/plugins/woocommerce/includes/class-wc -product-variable.php on
   line 657” which refers to this part of the code :
 *     ```
       protected function sort_variation_prices( $prices ) {
       		asort( $prices );
   
       		return $prices;
       	}
       ```
   
 * _______________________________________________________________________
    My products
   have many variations, there are products that exceed 10000
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-fatal-error-267%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [zworthkey12vaibhav](https://wordpress.org/support/users/zworthkey12vaibhav/)
 * (@zworthkey12vaibhav)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-fatal-error-267/#post-14778517)
 * Hi [@2btechadm](https://wordpress.org/support/users/2btechadm/),
 * Would you please tell me on which hook this function is hooked?
 * Thank you
    -  This reply was modified 4 years, 9 months ago by [zworthkey12vaibhav](https://wordpress.org/support/users/zworthkey12vaibhav/).
 *  [MayKato](https://wordpress.org/support/users/maykato/)
 * (@maykato)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-fatal-error-267/#post-14780452)
 * Hello,
 * > “PHP Fatal error: Maximum execution time of 300 seconds exceeded in …wp-content/
   > plugins/woocommerce/includes/class-wc -product-variable.php on line 657”
 * This means it’s taking too long to complete the process and it is timing out.
   The following guide has a good overview of how to fix a timeout error:
 * [https://www.wpbeginner.com/wp-tutorials/how-to-fix-fatal-error-maximum-execution-time-exceeded-in-wordpress/](https://www.wpbeginner.com/wp-tutorials/how-to-fix-fatal-error-maximum-execution-time-exceeded-in-wordpress/)
 *  Thread Starter [2btechadm](https://wordpress.org/support/users/2btechadm/)
 * (@2btechadm)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/php-fatal-error-267/#post-14780693)
 *     ```
       public function get_variation_prices( $for_display = false ) {
       		$prices = $this->data_store->read_price_data( $this, $for_display );
   
       		foreach ( $prices as $price_key => $variation_prices ) {
       			$prices[ $price_key ] = $this->sort_variation_prices( $variation_prices );
       		}
   
       		return $prices;
       	}
       ```
   
 *  Plugin Support [Sol J. a11n](https://wordpress.org/support/users/solstudioim/)
 * (@solstudioim)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-267/#post-14819824)
 * Hi there!
 * If you do require more help with the actual coding, we’d recommend you hire a
   developer who can take a look at this, quote you for their services, and help
   you add this feature to your site. We’d recommend getting in touch with a web
   developer or one of the customization experts listed at [https://woocommerce.com/customizations/](https://woocommerce.com/customizations/).
 * I hope that helps!
 * I trust that points you in the right direction, but if you have more questions,
   let us know.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP Fatal error’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [Sol J. a11n](https://wordpress.org/support/users/solstudioim/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-267/#post-14819824)
 * Status: resolved