Cron Job with WPALLIMPORT
-
Hi,
With update via cron wpallimport won’t activate RBP and prices.So, I need some help on getting this code to work…
I can’t understand what to do with step 2
Can someone give me a hand, and also confirm if this still works fine?step #1. I created a function and placed it in my functions.php file:
function my_prices($p1,$p2,$p3,$p4){
$result = [];
$result[‘cliente1’] = array (‘regular_price’ => $p1,’selling_price’ => ”);
$result[‘cliente2’] = array (‘regular_price’ => $p2,’selling_price’ => ”);
$result[‘cliente3’] = array (‘regular_price’ => $p3,’selling_price’ => ”);
$result[‘cliente4’] = array (‘regular_price’ => $p4,’selling_price’ => ”);$x = serialize($result);
return $x;
}(You gotta replace cliente1, cliente2 etc.. with the name of the user roles.)
Step #2 You have to add the custom field “_role_based_price” and on the value add the function like this:
[my_prices({price1[1]},{price2[1]},{price3[1]},{price4[1]})]
- The topic ‘Cron Job with WPALLIMPORT’ is closed to new replies.