Custom admin plugin read CSV

$_SERVER[‘DOCUMENT_ROOT’] should get you taken care of. Check this out: <?php echo ‘Initializing Script…<br>’; $filepath = $_SERVER[‘DOCUMENT_ROOT’].”/data/clients.csv”; echo “the file we seek:”.$filepath.”<br>”; $handle = fopen($filepath, “r”) or die(“Error opening file”); $i = 0; while(($line = fgetcsv($handle)) !== FALSE) { if($i == 0) { $c = 0; foreach($line as $col) { $cols[$c] = $col; $c++; } … Read more

Make another copy of a plugin and install it

Most probably you haven’t changed all IDs inside that plugin. For example, when you register admin menu page, you have to pass its slug, which is unique identifier for that page. If you register two pages with the same slug, only one will be visible. It’s the same with registering options, custom post types, and … Read more

WP_CRON issue with UTC and local time

It seems you are comparing GMT time with the local time before you update the user meta. Try WP function current_time( $type, $gmt = 0 ); $current_time = current_time(‘timestamp’, 0) // local time $current_time = current_time(‘timestamp’, 1) // GMT time I think you need $current_time = current_time(‘timestamp’, 0) // local time instead of $current_time = … Read more