Title: Error import from PHP
Last modified: November 26, 2019

---

# Error import from PHP

 *  Resolved [prendekz](https://wordpress.org/support/users/prendekz/)
 * (@prendekz)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/error-import-from-php/)
 * Hello how are you?
 * I developed a custom plugin to bring all products from another database and it
   works perfectly, but I have the “Role Based Price For WooCommerce” plugin installed,
   and I am importing 2 records of each product in the “postmeta” table with the
   following information:
 * $wpdb->insert($tablepostmeta,
    array( ‘post_id’ => $id_product, ‘meta_key’ =>“
   _enable_role_based_price”, ‘meta_value’ => 1, ) );
 * $wpdb->insert($tablepostmeta, array(
    ‘post_id’ => $id_product, ‘meta_key’ =>“
   _role_based_price”, ‘meta_value’ => ‘a:2:{s:8:”customer”;a:2:{s:13:”regular_price”;
   s:5:”‘.$product[“precio2″].'”;s:13:”selling_price”;s:0:””;}s:12:”distribuidor”;
   a:2:{s:13:”regular_price”;s:5:”‘.$product[“precio1″].'”;s:13:”selling_price”;
   s:0:””;}}’, ) );
 * When creating these 2 records would not enable Role Based Price?
 * When entering the product by the WordPress admin, if you enable Role Based but
   do not place the 2 product prices. Could you help me (screenshots attached that
   does not raise prices).
 * [https://prnt.sc/q2jh68](https://prnt.sc/q2jh68)
    [https://prnt.sc/q2jh8v](https://prnt.sc/q2jh8v)
   [https://prnt.sc/q2jhbh](https://prnt.sc/q2jhbh)
 * Thank you!
    -  This topic was modified 6 years, 6 months ago by [prendekz](https://wordpress.org/support/users/prendekz/).

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

 *  Thread Starter [prendekz](https://wordpress.org/support/users/prendekz/)
 * (@prendekz)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/error-import-from-php/#post-12203922)
 * Help please.
 *  Thread Starter [prendekz](https://wordpress.org/support/users/prendekz/)
 * (@prendekz)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/error-import-from-php/#post-12203935)
 * [@varunms](https://wordpress.org/support/users/varunms/)

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

The topic ‘Error import from PHP’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woocommerce-role-based-price.svg)
 * [Role Based Price For WooCommerce](https://wordpress.org/plugins/woocommerce-role-based-price/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-role-based-price/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-role-based-price/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-role-based-price/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-role-based-price/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-role-based-price/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [prendekz](https://wordpress.org/support/users/prendekz/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/error-import-from-php/#post-12203935)
 * Status: resolved