Commit 0e5596d1f for woocommerce

commit 0e5596d1fc0b8aa5954d6583138701e3d94ca05d
Author: Ilyas Foo <foo.ilyas@gmail.com>
Date:   Wed Jan 13 09:52:17 2021 +0800

    Transient and action passes plugin filename

diff --git a/includes/class-woocommerce.php b/includes/class-woocommerce.php
index 276b6c894..d7ecad181 100644
--- a/includes/class-woocommerce.php
+++ b/includes/class-woocommerce.php
@@ -801,8 +801,8 @@ final class WooCommerce {
 	public function activated_plugin( $filename ) {
 		include_once dirname( __FILE__ ) . '/admin/helper/class-wc-helper.php';

-		if ( 'woocommerce/woocommerce.php' === $filename ) {
-			set_transient( 'woocommerce_activated_plugin', true );
+		if ( '/woocommerce.php' === substr( $filename, -16 ) ) {
+			set_transient( 'woocommerce_activated_plugin', $filename );
 		}

 		WC_Helper::activated_plugin( $filename );
diff --git a/src/Packages.php b/src/Packages.php
index b0daab4c8..6b1208963 100644
--- a/src/Packages.php
+++ b/src/Packages.php
@@ -72,10 +72,10 @@ class Packages {
 		// Proxies "activated_plugin" hook for embedded packages listen on WC plugin activation
 		// https://github.com/woocommerce/woocommerce/issues/28697.
 		if ( is_admin() ) {
-			$is_woocommerce_just_activated = get_transient( 'woocommerce_activated_plugin' );
-			if ( $is_woocommerce_just_activated ) {
+			$woocommerce_activated_plugin = get_transient( 'woocommerce_activated_plugin' );
+			if ( $woocommerce_activated_plugin ) {
 				delete_transient( 'woocommerce_activated_plugin' );
-				do_action( 'woocommerce_activated_plugin', 'woocommerce/woocommerce.php' );
+				do_action( 'woocommerce_activated_plugin', $woocommerce_activated_plugin );
 			}
 		}
 	}