• Resolved 2btechadm

    (@2btechadm)


    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 to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @2btechadm,

    Would you please tell me on which hook this function is hooked?

    Thank you

    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/

    Thread Starter 2btechadm

    (@2btechadm)

    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

    (@solstudioim)

    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/.

    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.