Title: Fatal Error with PHP 8.x
Last modified: April 15, 2024

---

# Fatal Error with PHP 8.x

 *  Resolved [groundzero](https://wordpress.org/support/users/groundzero/)
 * (@groundzero)
 * [2 years ago](https://wordpress.org/support/topic/fatal-error-with-php-8-x-2/)
 * The site throws error when PHP 8.0 is applied on this hosting.
   **Fatal error**:
   Uncaught Error: Undefined constant “VERSION_PFW” in /var/www/wp-content/plugins/
   woo-paypal-gateway/ppcp/checkout-block/ppcp-checkout-block.php:34 Stack trace:#
   0 /var/www/wp-content/plugins/woocommerce/src/Blocks/Payments/PaymentMethodRegistry.
   php(45): PPCP_Checkout_Block->get_payment_method_script_handles() #1 /var/www/
   wp-content/plugins/woocommerce/src/Blocks/Payments/Api.php(65): Automattic\WooCommerce\
   Blocks\Payments\PaymentMethodRegistry->get_all_active_payment_method_script_dependencies()#
   2 /var/www/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Blocks\
   Payments\Api->add_payment_method_script_dependencies(Array, ‘wc-cart-block’) #
   3 /var/www/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #
   4 /var/www/wp-content/plugins/woocommerce/src/Blocks/Assets/Api.php(275): apply_filters(‘
   woocommerce_blo…’, Array, ‘wc-cart-block’) #5 /var/www/wp-content/plugins/woocommerce/
   src/Blocks/BlockTypes/AbstractBlock.php(139): Automattic\WooCommerce\Blocks\Assets\
   Api->register_script(‘wc-cart-block’, ‘assets/client/b…’, Array, true) #6 /var/
   www/wp-content/plugins/woocommerce/src/Blocks/BlockTypes/Cart.php(271): Automattic\
   WooCommerce\Blocks\BlockTypes\AbstractBlock->register_block_type_assets() #7 /
   var/www/wp-content/plugins/woocommerce/src/Blocks/BlockTypes/AbstractBlock.php(
   124): Automattic\WooCommerce\Blocks\BlockTypes\Cart->register_block_type_assets()#
   8 /var/www/wp-content/plugins/woocommerce/src/Blocks/BlockTypes/Cart.php(33):
   Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->initialize() #9 /var/
   www/wp-content/plugins/woocommerce/src/Blocks/BlockTypes/AbstractBlock.php(70):
   Automattic\WooCommerce\Blocks\BlockTypes\Cart->initialize() #10 /var/www/wp-content/
   plugins/woocommerce/src/Blocks/BlockTypesController.php(106): Automattic\WooCommerce\
   Blocks\BlockTypes\AbstractBlock->__construct(Object(Automattic\WooCommerce\Blocks\
   Assets\Api), Object(Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry), 
   Object(Automattic\WooCommerce\Blocks\Integrations\IntegrationRegistry)) #11 /
   var/www/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Blocks\BlockTypesController-
   >register_blocks(”) #12 /var/www/wp-includes/class-wp-hook.php(348): WP_Hook-
   >apply_filters(NULL, Array) #13 /var/www/wp-includes/plugin.php(517): WP_Hook-
   >do_action(Array) #14 /var/www/wp-settings.php(695): do_action(‘init’) #15 /var/
   www/wp-config.php(106): require_once(‘/var/www/wp-set…’) #16 /var/www/wp-load.
   php(50): require_once(‘/var/www/wp-con…’) #17 /var/www/wp-blog-header.php(13):
   require_once(‘/var/www/wp-loa…’) #18 /var/www/index.php(17): require(‘/var/www/
   wp-blo…’) #19 {main} thrown in **/var/www/wp-content/plugins/woo-paypal-gateway/
   ppcp/checkout-block/ppcp-checkout-block.php** on line **34**
 * Can you please check this issue?

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

 *  Thread Starter [groundzero](https://wordpress.org/support/users/groundzero/)
 * (@groundzero)
 * [2 years ago](https://wordpress.org/support/topic/fatal-error-with-php-8-x-2/#post-17688526)
 * With PHP 7.x this waring was already shown.
   **Warning**: Use of undefined constant
   VERSION_PFW – assumed ‘VERSION_PFW’ (this will throw an Error in a future version
   of PHP) in **/var/www/wp-content/plugins/woo-paypal-gateway/ppcp/checkout-block/
   ppcp-checkout-block.php** on line **34**But enabling PHP 8.x crashes the website.
 *  Plugin Author [Easy Payment](https://wordpress.org/support/users/easypayment/)
 * (@easypayment)
 * [2 years ago](https://wordpress.org/support/topic/fatal-error-with-php-8-x-2/#post-17689196)
 * Hi [@groundzero](https://wordpress.org/support/users/groundzero/),
 * I wanted to express my gratitude for submitting the support ticket. I’m pleased
   to inform you that I’ve resolved the issue and released a new version.
 * Many thanks!
 *  Thread Starter [groundzero](https://wordpress.org/support/users/groundzero/)
 * (@groundzero)
 * [2 years ago](https://wordpress.org/support/topic/fatal-error-with-php-8-x-2/#post-17691998)
 * That’s great. Thank you so much. Issue is resolved.
 *  Plugin Author [Easy Payment](https://wordpress.org/support/users/easypayment/)
 * (@easypayment)
 * [2 years ago](https://wordpress.org/support/topic/fatal-error-with-php-8-x-2/#post-17692304)
 * We’re eager to hear your thoughts on our product and customer support. If you
   could spare a moment to share your [feedback](https://wordpress.org/support/plugin/woo-paypal-gateway/reviews/#new-post),
   we’d truly appreciate it.
 * Thank you!

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

The topic ‘Fatal Error with PHP 8.x’ is closed to new replies.

 * ![](https://ps.w.org/woo-paypal-gateway/assets/icon-256x256.png?rev=3275768)
 * [Payment Gateway for PayPal on WooCommerce](https://wordpress.org/plugins/woo-paypal-gateway/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-paypal-gateway/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-paypal-gateway/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-paypal-gateway/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-paypal-gateway/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-paypal-gateway/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Easy Payment](https://wordpress.org/support/users/easypayment/)
 * Last activity: [2 years ago](https://wordpress.org/support/topic/fatal-error-with-php-8-x-2/#post-17692304)
 * Status: resolved