Title: PHP fatal error issue
Last modified: July 1, 2026

---

# PHP fatal error issue

 *  Resolved [ehsan82](https://wordpress.org/support/users/ehsan82/)
 * (@ehsan82)
 * [5 days, 2 hours ago](https://wordpress.org/support/topic/php-fatal-error-issue-2/)
 * Hello,
   I put affiliate dashboard shortcode on a page. While trying to open it
   withelementor for editing it is giving error 500 for elementor and I need to 
   enable safe mode to edit the page.
 * While i was trying to access the page directly from admin dashboard it doesn’t
   load.
   I have got some error log data from my site backend. I am sharing the code
   with you.[01-Jul-2026 05:45:27 UTC] PHP Fatal error: Uncaught TypeError: in_array():
   Argument #2 ($haystack) must be of type array, string given in /home/ajoofy-cst/
   htdocs/cst.ajoofy.com/wp-content/plugins/affiliates-for-woocommerce/helper/affiliate/
   affiliate-helper.php:302 Stack trace: #0 /home/ajoofy-cst/htdocs/cst.ajoofy.com/
   wp-content/plugins/affiliates-for-woocommerce/helper/affiliate/affiliate-helper.
   php(302): in_array() #1 /home/ajoofy-cst/htdocs/cst.ajoofy.com/wp-content/plugins/
   affiliates-for-woocommerce/templates/shortcodes/affiliate-dashboard.php(83): 
   DDWCAffiliates\Helper\Affiliate\DDWCAF_Affiliate_Helper->ddwcaf_is_user_allowed_for_affiliate()#
   2 /home/ajoofy-cst/htdocs/cst.ajoofy.com/wp-content/plugins/affiliates-for-woocommerce/
   includes/front/front-functions.php(185): require(‘…’) #3 /home/ajoofy-cst/htdocs/
   cst.ajoofy.com/wp-includes/shortcodes.php(434): DDWCAffiliates\Includes\Front\
   DDWCAF_Front_Functions->ddwcaf_get_affiliate_dashboard_shortcode_shortcode_content()#
   4 [internal function]: do_shortcode_tag() #5 /home/ajoofy-cst/htdocs/cst.ajoofy.
   com/wp-includes/shortcodes.php(273): preg_replace_callback() #6 /home/ajoofy-
   cst/htdocs/cst.ajoofy.com/wp-includes/class-wp-hook.php(341): do_shortcode() #
   7 /home/ajoofy-cst/htdocs/cst.ajoofy.com/wp-includes/plugin.php(205): WP_Hook-
   >apply_filters() #8 /home/ajoofy-cst/htdocs/cst.ajoofy.com/wp-includes/post-template.
   php(256): apply_filters() #9 /home/ajoofy-cst/htdocs/cst.ajoofy.com/wp-content/
   themes/besa/page.php(33): the_content() #10 /home/ajoofy-cst/htdocs/cst.ajoofy.
   com/wp-includes/template-loader.php(132): include(‘…’) #11 /home/ajoofy-cst/htdocs/
   cst.ajoofy.com/wp-blog-header.php(19): require_once(‘…’) #12 /home/ajoofy-cst/
   htdocs/cst.ajoofy.com/index.php(17): require(‘…’) #13 {main} thrown in /home/
   ajoofy-cst/htdocs/cst.ajoofy.com/wp-content/plugins/affiliates-for-woocommerce/
   helper/affiliate/affiliate-helper.php on line 302

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Yash Kapoor](https://wordpress.org/support/users/yashkapoor/)
 * (@yashkapoor)
 * [5 days, 2 hours ago](https://wordpress.org/support/topic/php-fatal-error-issue-2/#post-18952962)
 * Hi [@ehsan82](https://wordpress.org/support/users/ehsan82/) 
   I hope you are doing
   well…
 * You must have not selected user roles from this config so please add user roles
   and you will not face any issues – [https://prnt.sc/ZvVqy1VUCPYF](https://prnt.sc/ZvVqy1VUCPYF)
 * Thanks & Regards
 *  Thread Starter [ehsan82](https://wordpress.org/support/users/ehsan82/)
 * (@ehsan82)
 * [5 days, 2 hours ago](https://wordpress.org/support/topic/php-fatal-error-issue-2/#post-18952981)
 * Hi [@yashkapoor](https://wordpress.org/support/users/yashkapoor/) 
   Yes! The issue
   is resolved. Thanks with best regards
 *  Plugin Author [Yash Kapoor](https://wordpress.org/support/users/yashkapoor/)
 * (@yashkapoor)
 * [5 days, 2 hours ago](https://wordpress.org/support/topic/php-fatal-error-issue-2/#post-18952984)
 * Hi [@ehsan82](https://wordpress.org/support/users/ehsan82/)
 * Thanks for the confirmation and hoping to receive your valuable review for our
   plugin.
 * Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-fatal-error-issue-2%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/affiliates-for-woocommerce/assets/icon-128x128.gif?rev=3477614)
 * [Affiliates for WooCommerce – Affiliate Program, Referral Tracking & Commissions](https://wordpress.org/plugins/affiliates-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/affiliates-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/affiliates-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/affiliates-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/affiliates-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/affiliates-for-woocommerce/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 3 replies
 * 2 participants
 * Last reply from: [Yash Kapoor](https://wordpress.org/support/users/yashkapoor/)
 * Last activity: [5 days, 2 hours ago](https://wordpress.org/support/topic/php-fatal-error-issue-2/#post-18952984)
 * Status: resolved