Skip to content

Instantly share code, notes, and snippets.

View Arrayly's full-sized avatar
💻
Lets code!

Eisvidas Arrayly

💻
Lets code!
View GitHub Profile
@Yame-
Yame- / add-woocommerce-product.php
Last active December 6, 2022 17:14
Adding a WooCommerce product programmatically.
<?php
$args = array(
'post_author' => 1,
'post_content' => '',
'post_status' => "draft", // (Draft | Pending | Publish)
'post_title' => '',
'post_parent' => '',
'post_type' => "product"
);