Title: Illegal string offset &#8216;name&#8217; in error log
Last modified: August 25, 2022

---

# Illegal string offset ‘name’ in error log

 *  Resolved [maipiusenza](https://wordpress.org/support/users/maipiusenza/)
 * (@maipiusenza)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/illegal-string-offset-name-in-error-log/)
 * Hi, the error log gives me this warning on your plugin:
 * Illegal string offset ‘name’ in (cut)/wp-content/plugins/price-by-user-role-for-
   woocommerce/includes/settings/class-alg-wc-price-by-user-role-settings-per-product.
   php on line 312
 * Any idea how to fix it?
    Thanks

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

 *  Plugin Support [priyankajagtap](https://wordpress.org/support/users/priyankajagtap/)
 * (@priyankajagtap)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/illegal-string-offset-name-in-error-log/#post-15955458)
 * Hi [@maipiusenza](https://wordpress.org/support/users/maipiusenza/),
 * Can you please let us know when exactly you got this error?
 * It would be great if you can share the screenshots of the settings you have set
   up for this plugin on your site. So we will set up the same settings and try 
   to replicate this error at our end. And we will look into it and fix the same.
 * Please let us know.
 * Regards,
    Priyanka
 *  Thread Starter [maipiusenza](https://wordpress.org/support/users/maipiusenza/)
 * (@maipiusenza)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/illegal-string-offset-name-in-error-log/#post-15957309)
 * I don’t find the source of the first error, but get this other two in admin as
   I open settings, first error on general end per product page, second error on
   moltiplicators page:
 * [see settings](https://snipboard.io/h8E3r5.jpg)
 * errors:
 * 1) PHP Warning: Illegal string offset ‘name’ in (cut)/wp-content/plugins/price-
   by-user-role-for-woocommerce/includes/alg-wc-price-by-user-role-functions.php
   on line 132
 * 2)PHP Warning: Illegal string offset ‘name’ in (cut)/wp-content/plugins/price-
   by-user-role-for-woocommerce/includes/settings/class-alg-wc-price-by-user-role-
   settings-multipliers.php on line 84
 * Regards
    Nadia
 *  Plugin Support [priyankajagtap](https://wordpress.org/support/users/priyankajagtap/)
 * (@priyankajagtap)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/illegal-string-offset-name-in-error-log/#post-15981250)
 * Hi [@maipiusenza](https://wordpress.org/support/users/maipiusenza/),
 * Thank you for sharing the settings. We will try to replicate these errors at 
   our end and will let you know the results tomorrow.
 * Regards,
    Priyanka
 *  [Millionleaves](https://wordpress.org/support/users/millionleaves/)
 * (@millionleaves)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/illegal-string-offset-name-in-error-log/#post-16066594)
 * I am experiencing this issue on a site I manage. The site is running PHP8.0. 
   The error stops if I switch back to PHP7.4.
 *  Plugin Support [priyankajagtap](https://wordpress.org/support/users/priyankajagtap/)
 * (@priyankajagtap)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/illegal-string-offset-name-in-error-log/#post-16096420)
 * Hi [@millionleaves](https://wordpress.org/support/users/millionleaves/),
 * Thank you for your reply.
 * I have escalated these errors to the development team and our development team
   has fixed the same. Below are the links to download the fixed files which contain
   the fixes.
    Links: [https://www.dropbox.com/s/dy8fdg7xen4f3ki/alg-wc-price-by-user-role-functions.php?dl=0](https://www.dropbox.com/s/dy8fdg7xen4f3ki/alg-wc-price-by-user-role-functions.php?dl=0)
   [https://www.dropbox.com/s/8uewyiw3w6eqmn7/class-alg-wc-price-by-user-role-settings-multipliers.php?dl=0](https://www.dropbox.com/s/8uewyiw3w6eqmn7/class-alg-wc-price-by-user-role-settings-multipliers.php?dl=0)
 * Kindly download these files from the above links and you need to replace these
   files via FTP on the below-mentioned path:
    Path to “alg-wc-price-by-user-role-
   functions.php” – wp-content/plugins/price-by-user-role-for-woocommerce/includes/
   <HERE>
 * Path to “class-alg-wc-price-by-user-role-settings-multipliers.php” – wp-content/
   plugins/price-by-user-role-for-woocommerce/includes/settings/<HERE>
 * Once you have replaced these files, please check and let me know if these errors
   still persist or not.
 * Please check and let me know the result.
 * Regards,
    Priyanka
 *  [eWallz](https://wordpress.org/support/users/archonic08/)
 * (@archonic08)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/illegal-string-offset-name-in-error-log/#post-16183644)
 * Hi, why you did not release the latest fixed in official wp repo for other users
   to download/auto update?? this plugin has not been updated for more than a year.
   Is it still comply & compatible with the latest Woo 7.0?
 *  Plugin Support [priyankajagtap](https://wordpress.org/support/users/priyankajagtap/)
 * (@priyankajagtap)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/illegal-string-offset-name-in-error-log/#post-16206193)
 * Hi [@archonic08](https://wordpress.org/support/users/archonic08/),
 * Sorry for the late reply.
 * I would like to inform you that we have released the new update 1.5.0 of this
   plugin yesterday. We have included the above-provided patch for the issue in 
   this plugin update. So you can simply update the plugin to its latest version
   and see if everything is working fine with our plugin or not.
 * Please check and let us know the results.
 * Regards,
    Priyanka

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

The topic ‘Illegal string offset ‘name’ in error log’ is closed to new replies.

 * ![](https://ps.w.org/price-by-user-role-for-woocommerce/assets/icon-256x256.jpg?
   rev=2818038)
 * [Product Prices by User Roles for WooCommerce](https://wordpress.org/plugins/price-by-user-role-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/price-by-user-role-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/price-by-user-role-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/price-by-user-role-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/price-by-user-role-for-woocommerce/reviews/)

 * 10 replies
 * 4 participants
 * Last reply from: [priyankajagtap](https://wordpress.org/support/users/priyankajagtap/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/illegal-string-offset-name-in-error-log/#post-16206193)
 * Status: resolved