Hi @saniamohammadi
Mihai here with the EDD Support team!
I ran a test with this on a fresh WP install with just EDD (latest version) and WP Statistics. All I have done is created one product in EDD, I went to the Store page, and tried the Add to Cart button. The Ajax request fails and the below error message is logged:
[11-Jan-2025 15:22:12 UTC] PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, string given in /Users/mihai/Desktop/HTDOCS/testing/app/public/wp-content/plugins/wp-statistics/src/Utils/Request.php:29
Stack trace:
#0 /Users/mihai/Desktop/HTDOCS/testing/app/public/wp-content/plugins/wp-statistics/src/Utils/Request.php(29): array_map('sanitize_text_f...', '52')
#1 /Users/mihai/Desktop/HTDOCS/testing/app/public/wp-content/plugins/wp-statistics/src/Abstracts/BaseMetabox.php(143): WP_Statistics\Utils\Request::get('current_page', Array, 'array')
#2 /Users/mihai/Desktop/HTDOCS/testing/app/public/wp-content/plugins/wp-statistics/src/Service/Admin/Metabox/Metaboxes/PostSummary.php(33): WP_Statistics\Abstracts\BaseMetabox->isSinglePost()
#3 /Users/mihai/Desktop/HTDOCS/testing/app/public/wp-content/plugins/wp-statistics/src/Service/Admin/Metabox/MetaboxHelper.php(74): WP_Statistics\Service\Admin\Metabox\Metaboxes\PostSummary->isActive()
#4 /Users/mihai/Desktop/HTDOCS/testing/app/public/wp-content/plugins/wp-statistics/src/Service/Admin/Metabox/MetaboxManager.php(19): WP_Statistics\Service\Admin\Metabox\MetaboxHelper::getActiveMetaboxes()
#5 /Users/mihai/Desktop/HTDOCS/testing/app/public/wp-includes/class-wp-hook.php(324): WP_Statistics\Service\Admin\Metabox\MetaboxManager->registerMetaboxes('')
#6 /Users/mihai/Desktop/HTDOCS/testing/app/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#7 /Users/mihai/Desktop/HTDOCS/testing/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#8 /Users/mihai/Desktop/HTDOCS/testing/app/public/wp-admin/admin-ajax.php(45): do_action('admin_init')
#9 {main}
thrown in /Users/mihai/Desktop/HTDOCS/testing/app/public/wp-content/plugins/wp-statistics/src/Utils/Request.php on line 29