__( 'Activate WooCommerce', 'ai-product-tools' ), 'url' => wp_nonce_url( admin_url( 'plugins.php?action=activate&plugin=' . rawurlencode( self::WOOCOMMERCE_PLUGIN ) ), 'activate-plugin_' . self::WOOCOMMERCE_PLUGIN ), ); } if ( ! current_user_can( 'install_plugins' ) ) { return null; } return array( 'label' => __( 'Install WooCommerce', 'ai-product-tools' ), 'url' => wp_nonce_url( admin_url( 'update.php?action=install-plugin&plugin=woocommerce' ), 'install-plugin_woocommerce' ), ); } /** * Render the explanation page. * * @return void */ public function render_page(): void { $action = self::get_action(); ?>