We'll create fresh WordPress site with Etsy Importer installed. You have 20 minutes to test the plugin after that site we'll be deleted.
This plugin will allow you to import your entire Etsy shop’s inventory into WordPress as posts in a Products custom post type. All you have to do is supply an API Key for an Etsy application and the ID of your shop and the plugin will do the rest.
The Etsy Importer will not only import your products but will also:
Not only do we import your products, but we add some shortcodes to help you integrate your products into blog posts.
Display a link to your product – either as a link to the post within your site using the post title as the link text:
[product_link id=569]
[product_link id=569 title=”This is a great new product”]
Or as an external link to your Etsy product page:
[product_link id=569 title=”This is a great new product” external=true]
Display your product’s post content trimmed to whatever length you wish. If no value is set for the length, the full content of the post will be displayed:
[product_content id=569 length=50]
Display your product’s images in a Thickbox gallery using WordPress’ built-in Thickbox jQuery and CSS:
[product_images id=569]
The Etsy Importer allows for the filtering of content throughout the course of posts being imported. Below are the filters available, with details on what they do and how they can be modified.
The default post status your post will be set to when a product being imported is currently ACTIVE.
Usage:
function your_project_modify_etsy_importer_default_post_status() {
return 'publish';
}
add_filter( 'etsy_importer_default_post_status', 'your_project_modify_etsy_importer_default_post_status' );
The post status your existing post will be set to when its corresponding product is currently NOT ACTIVE.
Usage:
function your_project_modify_etsy_importer_updated_post_status() {
return 'draft';
}
add_filter( 'etsy_importer_updated_post_status', 'your_project_modify_etsy_importer_updated_post_status' );
The post arguments passed to update posts when importing products.
Usage:
function your_project_modify_etsy_importer_updated_post_args( $post_args ) {
// Always set the post with the ID 45 to publish
if( 45 == $post_args[ID] ) {
$post_args[post_status] = 'publish';
}
return $post_args;
}
add_filter( 'etsy_importer_updated_post_args', 'your_project_modify_etsy_importer_updated_post_args' );
The custom post type key.
Usage:
function your_project_modify_etsy_importer_custom_post_type_key() {
return 'my_products';
}
add_filter( 'etsy_importer_custom_post_type_key', 'your_project_modify_etsy_importer_custom_post_type_key' );
The custom post type’s Category key.
Usage:
function your_project_modify_etsy_importer_category_key() {
return 'my_category';
}
add_filter( 'etsy_importer_category_key', 'your_project_modify_etsy_importer_category_key' );
The custom post type’s Tag key.
Usage:
function your_project_modify_etsy_importer_tag_key() {
return 'my_tag';
}
add_filter( 'etsy_importer_tag_key', 'your_project_modify_etsy_importer_tag_key' );
Filter the output of the product link shortcode.
Usage:
function your_project_modify_etsy_importer_product_link_shortcode( $output, $atts ) {
// Output a custom value based on the post ID
if ( 4439 == $atts['id'] ) {
$output = 'This is my custom output for post ID 4439';
}
// Return the output
return $output;
}
add_filter( 'etsy_importer_product_link_shortcode', 'your_project_modify_etsy_importer_product_link_shortcode', 10, 2 );
Filter the output of the product content shortcode.
Usage:
function your_project_modify_etsy_importer_product_content_shortcode( $output, $atts ) {
// Output a custom value based on the post ID
if ( 4439 == $atts['id'] ) {
$output = 'This is my custom output for post ID 4439';
}
// Return the output
return $output;
}
add_filter( 'etsy_importer_product_content_shortcode', 'your_project_modify_etsy_importer_product_content_shortcode', 10, 2 );
Filter the args passed when displaying a product’s images.
Usage:
function your_project_modify_etsy_importer_product_images_shortcode_args( $args ) {
// Limit the number of images displayed to 1
$args['posts_per_page'] = 1;
// Return the args
return $args;
}
add_filter( 'etsy_importer_product_images_shortcode_args', 'your_project_modify_etsy_importer_product_images_shortcode_args' );
Filter the size of the thumbnail iamge shown when displaying a product’s images.
Usage:
function your_project_modify_etsy_importer_product_images_shortcode_thumb_size( $atts ) {
// Use the 'large' image size to display images
return 'large';
}
add_filter( 'etsy_importer_product_images_shortcode_thumb_size', 'your_project_modify_etsy_importer_product_images_shortcode_thumb_size' );
Filter the output of the product images shortcode.
Usage:
function your_project_modify_etsy_importer_product_images_shortcode( $output, $atts ) {
// Display a different output based on post ID
if ( 4439 == $atts['id'] ) {
$output = 'Visit my Etsy shop to view my images.';
}
// Return the output
return $output;
}
add_filter( 'etsy_importer_product_images_shortcode', 'your_project_modify_etsy_importer_product_images_shortcode', 10, 2 );
Filter the arguments passed when importing your products.
Usage:
function your_project_modify_etsy_importer_product_import_insert_args( $args, $product ) {
// Filter the post arguments used when importing your posts
// In this example, we are adding "My product: " to the beginning of the post title
$args['post_title'] = 'My product: ' . esc_html( $product->title );
// Return the output
return $args;
}
add_filter( 'etsy_importer_product_import_insert_args', 'your_project_modify_etsy_importer_product_import_insert_args', 10, 2 );