Skip to content

Instantly share code, notes, and snippets.

View progremzion's full-sized avatar

Sanket Mehta progremzion

View GitHub Profile
@progremzion
progremzion / Import-Variation-Product-Programmatically - WooCommerce
Created March 19, 2019 13:41
Script to import variation product from XLS along with images.
<?php
//Set Maximum Execution Time - To Avoid Execution
ini_set('max_execution_time', 0);
//Load WordPress
require_once("wp-load.php"); // Include the class_alias()
require_once(ABSPATH . 'wp-admin/includes/taxonomy.php');
include 'excel_reader/excel_reader.php'; // Include the class
$excel = new PhpExcelReader; // Creates object instance of the class
$excel->read('import/import.xls'); // Reads and stores the excel file data
//Define Variable