Ecommerce Shopify WordPress Discussion

Why can't is my activation hook function not found in WordPress?

In my main WordPress plugin file, I have the below code. WordPress keeps throwing the error: PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "WCSEA_activate" not found or invalid function name I am not sure why it doesn't find the functions when the names match with the names in the hook. <?php //Plugin header comment namespace WCSEA; // More code /** * Include class autoloader. * * @since 1.0.0 */ require_once WCSEA_PATH . '/vendor/autoload.php'; /** * The code that runs during plugin activation. * This action is documented in includes/class-wcsea-activator.php */ function WCSEA_activate() { Activator::activate(); } /** * The code that runs during plugin deactivation. * This action is documented in includes/class-wcsea-deactivator.php */ function WCSEA_deactivate() { Deactivator::deactivate(); } register_activation_hook(__FILE__, 'WCSEA_activate'); register_deactivation_hook(__FILE__, 'WCSEA_deactivate'); // rest of the code
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.