Why Tawk embed code migration is execute in all the pages?
-
So investigating all the DB interactions,
if ( class_exists( 'TawkTo' ) ) { register_activation_hook( __FILE__, array( 'TawkTo', 'activate' ) ); register_deactivation_hook( __FILE__, array( 'TawkTo', 'deactivate' ) ); $tawkto = new TawkTo(); $upgrade_manager = new TawkToUpgradeManager( TawkTo::get_plugin_version(), TawkTo::PLUGIN_VERSION_VARIABLE ); $upgrade_manager->register_hooks(); if ( isset( $tawkto ) ) { // these are called every page load. $tawkto->migrate_embed_code();
This code is executed in all the pages backend/frontend and don’t make sense.
As it is something that should happen on update or activation.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Why Tawk embed code migration is execute in all the pages?’ is closed to new replies.