PHP Fatal error: Uncaught Error: Class 'Civi\Api4\PaymentprocessorWebhook' not found in ProcessPaymentprocessorWebhooks.php
Since updating last month our CRON has stopped working, it throws error shown below.
The Issue
I can see the class exists here:
/app/public/wp-content/uploads/civicrm/ext/mjwshared/Civi/Api4/PaymentprocessorWebhook.php
And it seems to be this file requiring the class in this file:
/app/public/wp-content/uploads/civicrm/ext/mjwshared/api/v3/Job/ProcessPaymentprocessorWebhooks.php
I don't know much about Civi's Architecture, this feels like an autoloader problem but I'm not sure how to debug that.
Workaround
This workaround seems to be OK for now:
I've manually required the class file at the top of the file which needs to class:
require_once "/app/public/wp-content/uploads/civicrm/ext/mjwshared/Civi/Api4/PaymentprocessorWebhook.php
Stack Trace
PHP Fatal error: Uncaught Error: Class 'Civi\Api4\PaymentprocessorWebhook' not found in /app/public/wp-content/uploads/civicrm/ext/mjwshared/api/v3/Job/ProcessPaymentprocessorWebhooks.php:26
Stack trace:
#0 /app/public/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_job_process_paymentprocessor_webhooks()
#1 /app/public/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(149): Civi\API\Provider\MagicFunctionProvider->invoke()
#2 /app/public/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest()
#3 /app/public/wp-content/plugins/civicrm/civicrm/api/api.php(22): Civi\API\Kernel->runSafe()
#4 /home/82414-67987.clou in /app/public/wp-content/uploads/civicrm/ext/mjwshared/api/v3/Job/ProcessPaymentprocessorWebhooks.php on line 26
Fatal error: Uncaught Error: Class 'Civi\Api4\PaymentprocessorWebhook' not found in /app/public/wp-content/uploads/civicrm/ext/mjwshared/api/v3/Job/ProcessPaymentprocessorWebhooks.php:26
Stack trace:
#0 /app/public/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_job_process_paymentprocessor_webhooks()
#1 /app/public/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(149): Civi\API\Provider\MagicFunctionProvider->invoke()
#2 /app/public/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest()
#3 /app/public/wp-content/plugins/civicrm/civicrm/api/api.php(22): Civi\API\Kernel->runSafe()
#4 /home/82414-67987.clou in /app/public/wp-content/uploads/civicrm/ext/mjwshared/api/v3/Job/ProcessPaymentprocessorWebhooks.php on line 26