Forums / PayPal RESTful support / Issues with file /includes/autoload_func.php

Issues with file /includes/autoload_func.php

Views: 1,075

Results 1 to 6 of 6
26 Sep 2025, 5:39 AM
#1
johns4y avatar

johns4y

New Zenner

Join Date:
Jan 2009
Posts:
93
Plugin Contributions:
0

Issues with file /includes/autoload_func.php

Website - jaysmodelkits.com
ZC v.2.0.1

Since having PayPal RESTful installed and set up I seem to be generating multiple bugs on a daily basis and they all are of the same format below:
[26-Sep-2025 05:03:03 UTC] PHP Fatal error: Uncaught Error: Class "notifier" not found in /includes/autoload_func.php:47
Stack trace:
#0 /includes/application_top.php(253): require()
#1 /ppr_webhook.php(29): require('/home/jaysmode/...')
#2 {main}
thrown in /includes/autoload_func.php on line 47

[26-Sep-2025 05:03:03 UTC] Request URI: /ppr_webhook.php, IP address: 173.0.81.140
--> PHP Fatal error: Uncaught Error: Class "notifier" not found in /includes/autoload_func.php:47
Stack trace:
#0 /includes/application_top.php(253): require()
#1 /ppr_webhook.php(29): require('/home/jaysmode/...')
#2 {main}
thrown in /includes/autoload_func.php on line 47.

[26-Sep-2025 05:03:03 UTC] Request URI: /ppr_webhook.php, IP address: 173.0.81.140
--> PHP Fatal error: Uncaught Error: Class "notifier" not found in /includes/autoload_func.php:47
Stack trace:
#0 /includes/application_top.php(253): require()
#1 /ppr_webhook.php(29): require('/home/jaysmode/...')
#2 {main}
thrown in /includes/autoload_func.php on line 47.

I am not tech savvy and have no idea how to fix the above. Can anyone suggest an easy fix that even I can implement?
Thanks in advance, John.

26 Sep 2025, 1:11 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Issues with file /includes/autoload_func.php

A minor edit to the /includes/auto_loaders/webhook.core.php file.

Find this section at the top of the file

//- notifier class loaded via psr4Autoload.php
$autoLoadConfig[0][] = [
    'autoType' => 'classInstantiate',
    'className' => 'notifier',
    'objectName' => 'zco_notifier',
];

... and add the highlighted section, noting that this change is applicable for all supported Zen Cart versions (i.e. zc158 through zc210):

//- notifier class loaded via psr4Autoload.php[B]; reloading
//- here for older versions of Zen Cart that don't load the
//- class via an autoloader.
$autoLoadConfig[0][] = [
    'autoType' => 'class',
    'loadFile' => 'class.notifier.php',
];[/B]
$autoLoadConfig[0][] = [
    'autoType' => 'classInstantiate',
    'className' => 'notifier',
    'objectName' => 'zco_notifier',
];
26 Sep 2025, 1:21 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Issues with file /includes/autoload_func.php

Sigh, once the above change is added you'll run into another. Here's another addition that will correct that

//- notifier class loaded via psr4Autoload.php[B]; reloading
//- here for older versions of Zen Cart that don't load the
//- class via an autoloader.
$autoLoadConfig[0][] = [
    'autoType' => 'class',
    'loadFile' => 'class.notifier.php',
];[/B]
$autoLoadConfig[0][] = [
    'autoType' => 'classInstantiate',
    'className' => 'notifier',
    'objectName' => 'zco_notifier',
];
$autoLoadConfig[0][] = [
    'autoType' => 'class',
    'loadFile' => 'class.phpmailer.php',
];
/**
 * Breakpoint 5.
 *
 * $zcDate = new zcDate(); ... will be re-initialized when/if the require_languages.php module is run.
 *
 */
//- zcDate class loaded via psr4Autoload.php[B]; reloading
//- here for older versions of Zen Cart that don't load the
//- class via an autoloader.
$autoLoadConfig[5][] = [
    'autoType' => 'class',
    'loadFile' => 'zcDate.php',
];[/B]
$autoLoadConfig[5][] = [
    'autoType' => 'classInstantiate',
    'className' => 'zcDate',
    'objectName' => 'zcDate',
];
26 Sep 2025, 4:37 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Issues with file /includes/autoload_func.php

Actually ... just replace the /includes/auto_loaders/webhook.core.php file with the following:

<?php
/**
 * autoloader array for webhooks
 *
 * @copyright Copyright 2003-2025 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 *
 * Last updated: v1.2.2
 */
if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');
}

$autoLoadConfig[0][] = [
    'autoType' => 'include',
    'loadFile' => DIR_WS_INCLUDES . 'version.php',
];
//- notifier class loaded via psr4Autoload.php; reloading
//- here for older versions of Zen Cart that don't load the
//- class via an autoloader.
$autoLoadConfig[0][] = [
    'autoType' => 'class',
    'loadFile' => 'class.notifier.php',
];
$autoLoadConfig[0][] = [
    'autoType' => 'classInstantiate',
    'className' => 'notifier',
    'objectName' => 'zco_notifier',
];
$autoLoadConfig[0][] = [
    'autoType' => 'class',
    'loadFile' => 'class.phpmailer.php',
];
/**
 * Breakpoint 30.
 *
 * $zc_cache = new cache();
 *
 */
$autoLoadConfig[30][] = [
    'autoType' => 'classInstantiate',
    'className' => 'cache',
    'objectName' => 'zc_cache',
];
/**
 * Breakpoint 40.
 *
 * require 'includes/init_includes/init_db_config_read.php';
 *
 */
$autoLoadConfig[40][] = [
    'autoType' => 'init_script',
    'loadFile' => 'init_db_config_read.php',
];
//- sniffer class loaded via psr4Autoload.php; reloading
//- here for older versions of Zen Cart that don't load the
//- class via an autoloader.
$autoLoadConfig[50][] = [
    'autoType' => 'class',
    'loadFile' => 'sniffer.php',
];
$autoLoadConfig[50][] = [
    'autoType' => 'classInstantiate',
    'className' => 'sniffer',
    'objectName' => 'sniffer',
];
$autoLoadConfig[50][] = [
    'autoType' => 'init_script',
    'loadFile' => 'init_sefu.php',
];
/**
 * Breakpoint 60.
 *
 * require 'includes/init_includes/init_general_funcs.php';
 * require 'includes/init_includes/init_tlds.php';
 *
 */
$autoLoadConfig[60][] = [
    'autoType' => 'require',
    'loadFile' => DIR_WS_FUNCTIONS . 'functions_osh_update.php',
];
$autoLoadConfig[60][] = [
    'autoType' => 'init_script',
    'loadFile' => 'init_general_funcs.php',
];
$autoLoadConfig[60][] = [
    'autoType' => 'init_script',
    'loadFile' => 'init_tlds.php',
];
/**
 * Breakpoint 70.
 *
 * require 'includes/init_includes/init_sessions.php';
 *
 */
$autoLoadConfig[70][] = [
    'autoType' => 'init_script',
    'loadFile' => 'init_sessions.php',
];
/**
 * Breakpoint 90.
 *
 * currencies = new currencies();
 *
 */
//- currencies class loaded via psr4Autoload.php; reloading
//- here for older versions of Zen Cart that don't load the
//- class via an autoloader.
$autoLoadConfig[90][] = [
    'autoType' => 'class',
    'loadFile' => 'currencies.php',
];
$autoLoadConfig[90][] = [
    'autoType' => 'classInstantiate',
    'className' => 'currencies',
    'objectName' => 'currencies',
];
/**
 * Breakpoints 95,96.
 *
 * require 'includes/init_includes/init_languages.php';
 * require 'includes/init_includes/init_sanitize.php';
 *
 */
$autoLoadConfig[95][] = [
    'autoType' => 'class',
    'loadFile' => 'language.php',
];
$autoLoadConfig[95][] = [
    'autoType' => 'init_script',
    'loadFile' => 'init_languages.php',
];
$autoLoadConfig[96][] = [
    'autoType' => 'init_script',
    'loadFile' => 'init_sanitize.php',
];
/**
 * Breakpoint 100.
 *
 */
//- template_func class loaded via psr4Autoload.php; reloading
//- here for older versions of Zen Cart that don't load the
//- class via an autoloader.
$autoLoadConfig[100][] = [
    'autoType' => 'class',
    'loadFile' => 'template_func.php',
];
$autoLoadConfig[100][] = [
    'autoType' => 'classInstantiate',
    'className' => 'template_func',
    'objectName' => 'template',
];
/**
 * Breakpoint 110.
 *
 */
$autoLoadConfig[110][] = [
    'autoType' => 'init_script',
    'loadFile' => 'init_templates.php',
];
/**
 * Breakpoint 120.
 *
 */
$autoLoadConfig[120][] = [
    'autoType' => 'init_script',
    'loadFile' => 'init_currencies.php',
];
/**
 * Breakpoint 130.
 *
 * messageStack = new messageStack();
 *
 */
//- messageStack class loaded via psr4Autoload.php; reloading
//- here for older versions of Zen Cart that don't load the
//- class via an autoloader.
$autoLoadConfig[130][] = [
    'autoType' => 'class',
    'loadFile' => 'message_stack.php',
];
$autoLoadConfig[130][] = [
    'autoType' => 'classInstantiate',
    'className' => 'messageStack',
    'objectName' => 'messageStack',
];
/**
 * Breakpoint 175.
 *
 * require 'includes/init_includes/init_observers.php';
 *
 */
$autoLoadConfig[175][] = [
    'autoType' => 'init_script',
    'loadFile' => 'init_observers.php',
];

That'll be part of the upcoming v1.2.2 release of the payment module.

26 Sep 2025, 10:29 PM
#5
johns4y avatar

johns4y

New Zenner

Join Date:
Jan 2009
Posts:
93
Plugin Contributions:
0

Re: Issues with file /includes/autoload_func.php

Thank you for the responses. I will copy and paste your final solution into a txt file and hold it in reserve. I am hoping that the guys at Jeandret may have fixed the problem. I am waiting to see if any further debug logs are created. If they continue I will implement the change.
Again, thank you for your help in this matter.
Best regards, John.

27 Sep 2025, 12:27 PM
#6
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Issues with file /includes/autoload_func.php

johns4y:

Thank you for the responses. I will copy and paste your final solution into a txt file and hold it in reserve. I am hoping that the guys at Jeandret may have fixed the problem. I am waiting to see if any further debug logs are created. If they continue I will implement the change.
Again, thank you for your help in this matter.
Best regards, John.
No problem; thanks for your posting! That's what will get the issue corrected for everyone.