
WordPress connection Controller Plugin for ShoppingFeed – Sell on Amazon, Ebay, Google, and 1000’s of international marketplaces
The plugin won’t import orders fulfilled by marketplaces by default.
Options are available in the plugin settings to include those orders during the import.
They can be found in the “Orders” tab :
For now, the only shipment tracking plugins supported are :
To start using the plugin correctly, you need to configure it with your preferences (Feed, Shipping, Orders)
With this snippets below can be added to your theme’s functions.php file or your custom plugin file
By default, we support product_cat as taxonomy slug to identify product’s categories, you can override it using this snippet :
add_filter( 'shopping_feed_custom_category_taxonomy', 'your_custom_category_function' );
/** @return string */
function your_custom_category_function() {
return 'your_custom_category_slug';
}
By default, we don’t support any custom plugin for product’s brand, you can set custom taxonomy slug to identify it by using this snippet :
add_filter( 'shopping_feed_custom_brand_taxonomy', 'your_custom_brand_function' );
/** @return string */
function your_custom_brand_function() {
return 'your_custom_brand_slug';
}
By default, we don’t support any custom plugin for product EAN, you can set custom taxonomy slug to identify it by using this snippet :
add_filter( 'shopping_feed_custom_ean', 'your_custom_ean_function' );
/** @return string */
function your_custom_ean_function() {
return 'your_custom_ean_slug';
}
To export the feed, we use the plugin’s setting, if you want to add/use specific args, you can use the following snippet
add_filter( 'shopping_feed_products_custom_args', 'your_custom_args_function' );
/** @return array */
function your_custom_args_function() {
//array of args
return array();
}
You can find all available args here
WooCommerce documentation
By default, we import orders with ‘waiting_shipment’ status, if you want to import more statuses or a specific one, you can use the following snippet
add_filter( 'shopping_feed_orders_to_import', 'your_custom_statuses_function' );
/** @return array */
function your_custom_statuses_function() {
// array of statuses (strings)
return array();
}
Status available : created, waiting_store_acceptance, refused, waiting_shipment, shipped, cancelled, refunded, partially_refunded, partially_shipped
If you want to set a custom meta key to identify it, you can use the following snippet
add_filter( 'shopping_feed_tracking_number', 'your_custom_tracking_number_function' );
/** @return string */
function your_custom_tracking_number_function() {
return ‘your_custom_order_meta_key’
}
If you want to set a custom meta key to identify it, you can use the following snippet
add_filter( 'shopping_feed_tracking_link', 'your_custom_tracking_url_function' );
/** @return string */
function your_custom_tracking_url_function() {
return ‘your_custom_order_meta_key’
}
If you want to add an extra fields to products in your XML Feed, you can use the following snippet :
add_filter( 'shopping_feed_extra_fields', 'sf_product_extra_fields', 10, 2 );
/**
* Include additional fields for products in product feed.
*
* @param array $fields
* @param \WC_Product $product
*
* @return array
*/
function sf_product_extra_fields( $fields, $product ) {
$fields[] = array(
'name' => 'my_custom_product_field',
'value' => 'my_custom_value',
);
return $fields;
}
If you want to add an extra fields to variations in your XML Feed, you can use the following snippet :
add_filter( 'shopping_feed_variation_extra_fields', 'sf_product_variation_extra_fields', 10, 2 );
/**
* Include additional fields for variation in product feed.
*
* @param array $fields
* @param \WC_Product $variation
*
* @return array
*/
function sf_product_variation_extra_fields( $fields, $variation ) {
$fields[] = array(
'name' => 'my_custom_variation_field',
'value' => 'my_custom_value',
);
return $fields;
}
By default the variation’s thumbnail is used as the main image in the feed.
You can customize the main image using the filter “shopping_feed_variation_main_image”.
add_filter( 'shopping_feed_variation_main_image', 'your_custom_variation_main_images_function', 10, 3 );
/**
* Use the parent's thumbnail if the variation doesn't have one.
*
* @param string $main_image The main image of the variation.
* @param \WC_Product_Variation $variation The variation.
* @param \WC_Product_Variable $product The product.
*
* @return string
*/
function your_custom_variation_main_images_function( $main_image, $variation, $product ) {
if ( empty( $main_image ) && has_post_thumbnail( $product->get_id() ) ) {
$main_image = get_the_post_thumbnail_url( $product->get_id(), 'full' );
}
return $main_image;
}
By default, we don’t support any custom plugin for adding images to WC Product Variation, with this filter you can set the desired images to each variation, you can use the following snippet
add_filter( 'shopping_feed_variation_images', 'your_custom_variation_images_function', 10, 3 );
/**
* @param array $images
* @param WC_Product $wc_product
* @param int $variation_id
*
* @return array
*/
function your_custom_variation_images_function( $images, $wc_product, $variation_id ) {
$images[] = 'https://domain.com/image1.jpg';
$images[] = 'https://domain.com/image2.jpg';
return $images;
}