Title: Deprecated Code
Last modified: September 13, 2022

---

# Deprecated Code

 *  Resolved [Gautam Garg](https://wordpress.org/support/users/gautammkgarg/)
 * (@gautammkgarg)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/deprecated-code-29/)
 *     ```
       Deprecated: Required parameter $wp_table_name follows optional parameter $row_arrays in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\erp\includes\functions.php on line 3058
   
       Deprecated: Required parameter $voucher_no follows optional parameter $attachment in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\erp\modules\accounting\includes\emails\class-email-transections.php on line 42
   
       Deprecated: Required parameter $company follows optional parameter $attachment in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\erp\modules\accounting\includes\emails\class-email-transections.php on line 42
   
       Deprecated: Required parameter $voucher_no follows optional parameter $attachment in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\erp\modules\accounting\includes\emails\class-email-transections-payments.php on line 42
   
       Deprecated: Required parameter $company follows optional parameter $attachment in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\erp\modules\accounting\includes\emails\class-email-transections-payments.php on line 42
   
       Deprecated: Required parameter $voucher_no follows optional parameter $attachment in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\erp\modules\accounting\includes\emails\class-email-transections-purchase.php on line 42
   
       Deprecated: Required parameter $company follows optional parameter $attachment in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\erp\modules\accounting\includes\emails\class-email-transections-purchase.php on line 42
   
       Deprecated: Required parameter $voucher_no follows optional parameter $attachment in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\erp\modules\accounting\includes\emails\class-email-transections-estimate.php on line 42
   
       Deprecated: Required parameter $company follows optional parameter $attachment in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\erp\modules\accounting\includes\emails\class-email-transections-estimate.php on line 42
   
       Deprecated: Required parameter $voucher_no follows optional parameter $attachment in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\erp\modules\accounting\includes\emails\class-email-transections-purchase-order.php on line 42
   
       Deprecated: Required parameter $company follows optional parameter $attachment in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\erp\modules\accounting\includes\emails\class-email-transections-purchase-order.php on line 42
   
       Deprecated: Required parameter $voucher_no follows optional parameter $attachment in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\erp\modules\accounting\includes\emails\class-email-transections-pay-purchase.php on line 42
   
       Deprecated: Required parameter $company follows optional parameter $attachment in C:\xampp\htdocs\wordpress-dev\wp-content\plugins\erp\modules\accounting\includes\emails\class-email-transections-pay-purchase.php on line 42
       ```
   
    -  This topic was modified 3 years, 8 months ago by [Gautam Garg](https://wordpress.org/support/users/gautammkgarg/).

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

 *  [Mobin Chowdhury](https://wordpress.org/support/users/mobin210385/)
 * (@mobin210385)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/deprecated-code-29/#post-16027994)
 * Hi [@gautammkgarg](https://wordpress.org/support/users/gautammkgarg/),
 * Greetings from WP ERP support, hope you are doing well.
 * I have gone through your error message. Unfortunately, I am unable to understand
   why this one is triggering. It seems like you are facing this error due to using
   the older version. I am not fully sure about that. It will help us to understand
   properly if you describe your issue more.
 * Looking forward to hearing from you.
 * Best regards,
    -  This reply was modified 3 years, 8 months ago by [Mobin Chowdhury](https://wordpress.org/support/users/mobin210385/).
 *  [Mobin Chowdhury](https://wordpress.org/support/users/mobin210385/)
 * (@mobin210385)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/deprecated-code-29/#post-16070016)
 * Hi [@gautammkgarg](https://wordpress.org/support/users/gautammkgarg/),
 * Due to inactivity, we are marking this topic as resolved. Feel free to open a
   new one if you face any issues.
 * Thanks!
 *  Thread Starter [Gautam Garg](https://wordpress.org/support/users/gautammkgarg/)
 * (@gautammkgarg)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/deprecated-code-29/#post-16073948)
 * Sorry, I missed your previous message. I am using latest version of WP ERP. This“
   Deprecated” message is still there. Actually, this message appears due to old
   syntax of php. According to this message, first you should ask for all the required
   parameters in the function after that ask for optional parameters. I think you
   have asked for options parameter first, then required parameters.
    You will see
   it on new version of PHP. My PHP version is 8.0.18. Please check logs. Let me
   know if you need more information from my end.
    -  This reply was modified 3 years, 8 months ago by [Gautam Garg](https://wordpress.org/support/users/gautammkgarg/).
    -  This reply was modified 3 years, 8 months ago by [Gautam Garg](https://wordpress.org/support/users/gautammkgarg/).
 *  [Mobin Chowdhury](https://wordpress.org/support/users/mobin210385/)
 * (@mobin210385)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/deprecated-code-29/#post-16090538)
 * Hello [@gautammkgarg](https://wordpress.org/support/users/gautammkgarg/),
 * This issue is unknown to us. I suggest you install the plugin in a fresh environment
   where there is no other plugin active and the default theme is active. If you
   find the issue solve then run a conflict test on your site which is having the
   problem.
 * In any case, let me know the result.
 * Best regards,
 *  Thread Starter [Gautam Garg](https://wordpress.org/support/users/gautammkgarg/)
 * (@gautammkgarg)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/deprecated-code-29/#post-16092324)
 * I am not using the plugin, so I am closing the ticket but the issue is still 
   open on newer version of PHP. Let me know if you need my help in fixing it. I
   know how to fix it.
 * [https://plugins.trac.wordpress.org/browser/erp/trunk/includes/functions.php#L3058](https://plugins.trac.wordpress.org/browser/erp/trunk/includes/functions.php#L3058)
   
   change this line to below line might help. function erp_wp_insert_rows( $row_arrays
   = [], $wp_table_name, $update = false, $primary_key = null ) {
 * function erp_wp_insert_rows( $row_arrays, $wp_table_name, $update = false, $primary_key
   = null ) {

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

The topic ‘Deprecated Code’ is closed to new replies.

 * ![](https://ps.w.org/erp/assets/icon-256x256.gif?rev=3439413)
 * [ERP: Complete HR, Accounting & CRM Suite with WooCommerce CRM Support](https://wordpress.org/plugins/erp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/erp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/erp/)
 * [Active Topics](https://wordpress.org/support/plugin/erp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/erp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/erp/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Gautam Garg](https://wordpress.org/support/users/gautammkgarg/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/deprecated-code-29/#post-16092324)
 * Status: resolved