Melapress / wsal-extension-template

This is the main template for all the WP Activity Log plugin extensions. This is used internally by the developers as a "core"to update all the other extensions.

Home Page:https://wpactivitylog.com/extensions/mainwp-activity-log/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom events are not loaded on the front end

DannyWPWS opened this issue · comments

Just working on WC and when I visit a product as a logged in user, im getting the following error

[08-Oct-2020 15:33:58 UTC] PHP Fatal error:  Uncaught Exception: Event with code 9073 has not be registered. in /home/daniel/Local Sites/wsal-woocommerce/app/public/wp-content/plugins/wp-security-audit-log-premium/classes/AlertManager.php:372
Stack trace:
#0 /home/daniel/Local Sites/wsal-woocommerce/app/public/wp-content/plugins/wp-security-audit-log-premium/classes/AlertManager.php(368): WSAL_AlertManager->_CommitItem(9073, Array, NULL, false)
#1 /home/daniel/Local Sites/wsal-woocommerce/app/public/wp-content/plugins/wp-security-audit-log-premium/classes/AlertManager.php(293): WSAL_AlertManager->_CommitItem(9073, Array, NULL)
#2 /home/daniel/Local Sites/wsal-woocommerce/app/public/wp-content/plugins/wsal-woocommerce/wp-security-audit-log/custom-sensors/WSAL_Sensors_WooCommerce.php(1128): WSAL_AlertManager->Trigger(9073, Array)
#3 /home/daniel/Local Sites/wsal-woocommerce/app/public/wp-includes/class-wp-hook.php(287): WSAL_Sensors_WooCommerce->viewing_product('')
#4 /home/daniel/Local Sites/wsal-woocommerce/app/public/wp-includes/class-wp-hook.php(311): in /home/daniel/Local Sites/wsal-woocommerce/app/public/wp-content/plugins

To remedy I can run add_custom_sensors_and_events_dirs on init - will check with @martinkrcho if this is correct

add_action( 'wsal_before_sensor_load', array( $this, 'add_custom_sensors_and_events_dirs' ) );

@DannyWPWS can you please check this and advise?

Not a problem anymore, working really nicely

image

Closing this up