2019-02-15 01:52:24 +00:00
|
|
|
|
/* global marketplace_suggestions ajaxurl */
|
|
|
|
|
( function( $, marketplace_suggestions ) {
|
2019-02-12 21:38:20 +00:00
|
|
|
|
$( function() {
|
2019-02-15 01:52:24 +00:00
|
|
|
|
if ( 'undefined' === typeof marketplace_suggestions ) {
|
2019-02-12 21:38:20 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-21 22:38:55 +00:00
|
|
|
|
// Stand-in wcTracks.recordEvent in case tracks is not available (for any reason).
|
|
|
|
|
window.wcTracks = window.wcTracks || {};
|
|
|
|
|
window.wcTracks.recordEvent = window.wcTracks.recordEvent || function() { };
|
2019-02-20 02:33:57 +00:00
|
|
|
|
|
|
|
|
|
// Tracks events sent in this file:
|
|
|
|
|
// - marketplace_suggestion_displayed
|
|
|
|
|
// - marketplace_suggestion_clicked
|
|
|
|
|
// - marketplace_suggestion_dismissed
|
|
|
|
|
// All are prefixed by {WC_Tracks::PREFIX}.
|
|
|
|
|
// All have one property for `suggestionSlug`, to identify the specific suggestion message.
|
|
|
|
|
|
2019-02-21 02:51:41 +00:00
|
|
|
|
// Dismiss the specified suggestion from the UI, and save the dismissal in settings.
|
2019-02-17 22:48:18 +00:00
|
|
|
|
function dismissSuggestion( suggestionSlug ) {
|
|
|
|
|
// hide the suggestion in the UI
|
2019-02-18 02:55:26 +00:00
|
|
|
|
var selector = '[data-suggestion-slug=' + suggestionSlug + ']';
|
2019-02-20 20:52:37 +00:00
|
|
|
|
$( selector ).fadeOut( function() {
|
|
|
|
|
$( this ).remove();
|
|
|
|
|
});
|
2019-02-17 22:48:18 +00:00
|
|
|
|
|
|
|
|
|
// save dismissal in user settings
|
2019-02-15 01:52:24 +00:00
|
|
|
|
jQuery.post(
|
|
|
|
|
ajaxurl,
|
|
|
|
|
{
|
2019-02-21 02:56:26 +00:00
|
|
|
|
'action': 'woocommerce_add_dismissed_marketplace_suggestion',
|
2019-02-15 01:52:24 +00:00
|
|
|
|
'_wpnonce': marketplace_suggestions.dismiss_suggestion_nonce,
|
|
|
|
|
'slug': suggestionSlug,
|
|
|
|
|
}
|
|
|
|
|
);
|
2019-02-20 02:33:57 +00:00
|
|
|
|
|
2019-02-21 22:38:55 +00:00
|
|
|
|
window.wcTracks.recordEvent( 'marketplace_suggestion_dismissed', {
|
2019-02-20 02:33:57 +00:00
|
|
|
|
suggestionSlug: suggestionSlug
|
|
|
|
|
} );
|
2019-02-15 01:52:24 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-02-21 02:51:41 +00:00
|
|
|
|
// Render DOM element for suggestion dismiss button.
|
2019-02-15 00:30:53 +00:00
|
|
|
|
function renderDismissButton( suggestionSlug ) {
|
|
|
|
|
var dismissButton = document.createElement( 'a' );
|
|
|
|
|
|
|
|
|
|
dismissButton.classList.add( 'suggestion-dismiss' );
|
|
|
|
|
dismissButton.setAttribute( 'href', '#' );
|
2019-02-18 02:55:26 +00:00
|
|
|
|
dismissButton.onclick = function( event ) {
|
|
|
|
|
event.preventDefault();
|
2019-02-17 22:48:18 +00:00
|
|
|
|
dismissSuggestion( suggestionSlug );
|
2019-02-15 01:52:24 +00:00
|
|
|
|
}
|
2019-02-15 00:30:53 +00:00
|
|
|
|
|
|
|
|
|
return dismissButton;
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-21 02:51:41 +00:00
|
|
|
|
// Render DOM element for suggestion linkout, optionally with button style.
|
2019-02-20 02:33:57 +00:00
|
|
|
|
function renderLinkout( slug, url, text, isButton ) {
|
2019-02-13 22:16:39 +00:00
|
|
|
|
var linkoutButton = document.createElement( 'a' );
|
|
|
|
|
|
|
|
|
|
linkoutButton.setAttribute( 'href', url );
|
2019-02-18 23:22:06 +00:00
|
|
|
|
linkoutButton.setAttribute( 'target', 'blank' );
|
|
|
|
|
linkoutButton.textContent = text;
|
|
|
|
|
|
2019-02-20 02:33:57 +00:00
|
|
|
|
linkoutButton.onclick = function( event ) {
|
2019-02-21 22:38:55 +00:00
|
|
|
|
window.wcTracks.recordEvent( 'marketplace_suggestion_clicked', {
|
2019-02-20 02:33:57 +00:00
|
|
|
|
suggestionSlug: slug
|
|
|
|
|
} );
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-18 23:22:06 +00:00
|
|
|
|
if (isButton) {
|
|
|
|
|
linkoutButton.classList.add( 'button' );
|
|
|
|
|
}
|
2019-02-19 00:44:35 +00:00
|
|
|
|
else {
|
|
|
|
|
linkoutButton.classList.add( 'linkout' );
|
|
|
|
|
var linkoutIcon = document.createElement( 'span' );
|
|
|
|
|
linkoutIcon.classList.add( 'dashicons', 'dashicons-external' );
|
|
|
|
|
linkoutButton.appendChild( linkoutIcon );
|
|
|
|
|
}
|
2019-02-13 22:16:39 +00:00
|
|
|
|
|
|
|
|
|
return linkoutButton;
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-21 02:51:41 +00:00
|
|
|
|
// Render DOM element for suggestion icon image.
|
2019-02-19 22:46:06 +00:00
|
|
|
|
function renderSuggestionIcon( slug, iconUrl ) {
|
|
|
|
|
if ( !iconUrl ) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var image = document.createElement( 'img' );
|
|
|
|
|
image.src = iconUrl;
|
|
|
|
|
image.classList.add( 'marketplace-suggestion-icon' );
|
|
|
|
|
|
|
|
|
|
return image;
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-21 02:51:41 +00:00
|
|
|
|
// Render DOM elements for suggestion content.
|
2019-02-19 03:31:14 +00:00
|
|
|
|
function renderSuggestionContent( slug, title, copy ) {
|
2019-02-18 02:55:26 +00:00
|
|
|
|
var left = document.createElement( 'div' );
|
2019-02-19 03:31:14 +00:00
|
|
|
|
|
|
|
|
|
left.classList.add( 'marketplace-suggestion-container-content' );
|
2019-02-18 02:55:26 +00:00
|
|
|
|
|
2019-02-18 23:22:06 +00:00
|
|
|
|
if ( title ) {
|
|
|
|
|
var titleHeading = document.createElement( 'h4' );
|
|
|
|
|
titleHeading.textContent = title;
|
|
|
|
|
left.appendChild( titleHeading );
|
|
|
|
|
}
|
2019-02-13 22:16:39 +00:00
|
|
|
|
|
2019-02-13 22:21:58 +00:00
|
|
|
|
if ( copy ) {
|
|
|
|
|
var body = document.createElement( 'p' );
|
|
|
|
|
body.textContent = copy;
|
2019-02-18 02:55:26 +00:00
|
|
|
|
left.appendChild( body );
|
2019-02-13 22:21:58 +00:00
|
|
|
|
}
|
2019-02-13 22:16:39 +00:00
|
|
|
|
|
2019-02-19 03:31:14 +00:00
|
|
|
|
return left;
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-21 02:51:41 +00:00
|
|
|
|
// Render DOM elements for suggestion call-to-action – button or link with dismiss 'x'.
|
2019-02-19 03:31:14 +00:00
|
|
|
|
function renderSuggestionCTA( slug, url, linkText, linkIsButton, allowDismiss ) {
|
|
|
|
|
var right = document.createElement( 'div' );
|
|
|
|
|
|
|
|
|
|
right.classList.add( 'marketplace-suggestion-container-cta' );
|
2019-02-18 23:22:06 +00:00
|
|
|
|
if ( url && linkText ) {
|
2019-02-20 02:33:57 +00:00
|
|
|
|
var linkoutElement = renderLinkout( slug, url, linkText, linkIsButton );
|
2019-02-18 23:22:06 +00:00
|
|
|
|
right.appendChild( linkoutElement );
|
2019-02-13 22:21:58 +00:00
|
|
|
|
}
|
2019-02-13 22:16:39 +00:00
|
|
|
|
|
2019-02-18 22:54:58 +00:00
|
|
|
|
if ( allowDismiss ) {
|
|
|
|
|
right.appendChild( renderDismissButton( slug ) )
|
|
|
|
|
}
|
2019-02-18 02:55:26 +00:00
|
|
|
|
|
2019-02-19 03:31:14 +00:00
|
|
|
|
return right;
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-21 02:51:41 +00:00
|
|
|
|
// Render a "table banner" style suggestion.
|
|
|
|
|
// These are used in admin lists, e.g. products list.
|
2019-02-19 22:46:06 +00:00
|
|
|
|
function renderTableBanner( slug, iconUrl, title, copy, url, buttonText, allowDismiss ) {
|
2019-02-19 03:31:14 +00:00
|
|
|
|
if ( ! title || ! url ) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( ! buttonText ) {
|
|
|
|
|
buttonText = 'Go';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var row = document.createElement( 'tr' );
|
|
|
|
|
row.classList.add( 'marketplace-table-banner' );
|
|
|
|
|
row.classList.add( 'marketplace-suggestions-container' );
|
|
|
|
|
row.classList.add( 'showing-suggestion' );
|
|
|
|
|
row.dataset.marketplaceSuggestionsContext = 'products-list-inline';
|
|
|
|
|
row.dataset.suggestionSlug = slug;
|
|
|
|
|
|
|
|
|
|
var cell = document.createElement( 'td' );
|
|
|
|
|
cell.setAttribute( 'colspan', 10 );
|
|
|
|
|
|
|
|
|
|
var container = document.createElement( 'div' );
|
|
|
|
|
container.classList.add( 'marketplace-suggestion-container' );
|
|
|
|
|
container.dataset.suggestionSlug = slug;
|
|
|
|
|
|
2019-02-19 22:46:06 +00:00
|
|
|
|
var icon = renderSuggestionIcon( slug, iconUrl );
|
|
|
|
|
if ( icon ) {
|
|
|
|
|
container.appendChild( icon );
|
|
|
|
|
}
|
2019-02-19 03:31:14 +00:00
|
|
|
|
container.appendChild(
|
|
|
|
|
renderSuggestionContent( slug, title, copy )
|
|
|
|
|
);
|
|
|
|
|
container.appendChild(
|
|
|
|
|
renderSuggestionCTA( slug, url, buttonText, true, allowDismiss )
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
cell.appendChild( container );
|
|
|
|
|
row.appendChild( cell );
|
|
|
|
|
|
|
|
|
|
return row;
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-21 02:51:41 +00:00
|
|
|
|
// Render a "list item" style suggestion.
|
|
|
|
|
// These are used in onboarding style contexts, e.g. products list empty state.
|
2019-02-19 22:46:06 +00:00
|
|
|
|
function renderListItem( slug, iconUrl, title, copy, url, linkText, linkIsButton, allowDismiss ) {
|
2019-02-19 03:31:14 +00:00
|
|
|
|
var container = document.createElement( 'div' );
|
|
|
|
|
container.classList.add( 'marketplace-suggestion-container' );
|
|
|
|
|
container.dataset.suggestionSlug = slug;
|
|
|
|
|
|
2019-02-19 22:46:06 +00:00
|
|
|
|
var icon = renderSuggestionIcon( slug, iconUrl );
|
|
|
|
|
if ( icon ) {
|
|
|
|
|
container.appendChild( icon );
|
|
|
|
|
}
|
2019-02-19 03:31:14 +00:00
|
|
|
|
container.appendChild(
|
|
|
|
|
renderSuggestionContent( slug, title, copy )
|
|
|
|
|
);
|
|
|
|
|
container.appendChild(
|
|
|
|
|
renderSuggestionCTA( slug, url, linkText, linkIsButton, allowDismiss )
|
|
|
|
|
);
|
2019-02-17 22:48:18 +00:00
|
|
|
|
|
2019-02-13 22:16:39 +00:00
|
|
|
|
return container;
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-21 02:51:41 +00:00
|
|
|
|
// Filter suggestion data to remove less-relevant suggestions.
|
2019-02-14 02:47:32 +00:00
|
|
|
|
function getRelevantPromotions( marketplaceSuggestionsApiData, displayContext ) {
|
2019-02-12 21:38:20 +00:00
|
|
|
|
// select based on display context
|
2019-02-13 00:34:25 +00:00
|
|
|
|
var promos = _.filter( marketplaceSuggestionsApiData, function( promo ) {
|
|
|
|
|
return ( displayContext === promo.context );
|
|
|
|
|
} );
|
2019-02-12 21:38:20 +00:00
|
|
|
|
|
2019-02-15 01:52:24 +00:00
|
|
|
|
// hide promos the user has dismissed
|
|
|
|
|
promos = _.filter( promos, function( promo ) {
|
|
|
|
|
return ! _.contains( marketplace_suggestions.dismissed_suggestions, promo.slug );
|
|
|
|
|
} );
|
|
|
|
|
|
2019-02-12 21:38:20 +00:00
|
|
|
|
// hide promos for things the user already has installed
|
2019-02-13 00:34:25 +00:00
|
|
|
|
promos = _.filter( promos, function( promo ) {
|
2019-02-15 01:52:24 +00:00
|
|
|
|
return ! _.contains( marketplace_suggestions.installed_woo_plugins, promo['hide-if-installed'] );
|
2019-02-13 00:34:25 +00:00
|
|
|
|
} );
|
2019-02-12 21:38:20 +00:00
|
|
|
|
|
2019-02-12 22:33:37 +00:00
|
|
|
|
// hide promos that are not applicable based on user's installed extensions
|
2019-02-13 00:34:25 +00:00
|
|
|
|
promos = _.filter( promos, function( promo ) {
|
2019-02-12 22:33:37 +00:00
|
|
|
|
if ( ! promo['show-if-installed'] ) {
|
|
|
|
|
// this promotion is relevant to all
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if the user has any of the prerequisites, show the promo
|
2019-02-15 01:52:24 +00:00
|
|
|
|
return ( _.intersection( marketplace_suggestions.installed_woo_plugins, promo['show-if-installed'] ).length > 0 );
|
2019-02-12 22:33:37 +00:00
|
|
|
|
} );
|
|
|
|
|
|
2019-02-12 21:38:20 +00:00
|
|
|
|
return promos;
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-21 02:51:41 +00:00
|
|
|
|
// Show and hide page elements dependent on suggestion state.
|
2019-02-19 00:56:49 +00:00
|
|
|
|
function hidePageElementsForEmptyState( visibleSuggestions ) {
|
|
|
|
|
var showingProductsEmptyStateSuggestions = _.contains( visibleSuggestions, 'products-list-empty-body' );
|
2019-02-21 02:51:41 +00:00
|
|
|
|
|
|
|
|
|
// Streamline onboarding UI if we're in 'empty state' welcome mode.
|
2019-02-19 00:56:49 +00:00
|
|
|
|
if ( showingProductsEmptyStateSuggestions ) {
|
|
|
|
|
$( '#screen-meta-links' ).hide();
|
|
|
|
|
$( '#wpfooter' ).hide();
|
|
|
|
|
}
|
2019-02-21 02:51:41 +00:00
|
|
|
|
|
|
|
|
|
// Hide the header & footer, they don't make sense without specific promotion content
|
2019-02-19 00:56:49 +00:00
|
|
|
|
if ( ! showingProductsEmptyStateSuggestions ) {
|
|
|
|
|
$( '.marketplace-suggestions-container[data-marketplace-suggestions-context="products-list-empty-header"]' ).hide();
|
|
|
|
|
$( '.marketplace-suggestions-container[data-marketplace-suggestions-context="products-list-empty-footer"]' ).hide();
|
2019-02-12 21:38:20 +00:00
|
|
|
|
}
|
2019-02-14 02:47:32 +00:00
|
|
|
|
}
|
2019-02-12 21:38:20 +00:00
|
|
|
|
|
2019-02-21 02:51:41 +00:00
|
|
|
|
// Render suggestion data in appropriate places in UI.
|
2019-02-21 22:23:09 +00:00
|
|
|
|
function displaySuggestions( marketplaceSuggestionsApiData ) {
|
2019-02-18 22:54:58 +00:00
|
|
|
|
var visibleSuggestions = [];
|
2019-02-12 21:38:20 +00:00
|
|
|
|
|
2019-02-14 02:47:32 +00:00
|
|
|
|
// iterate over all suggestions containers, rendering promos
|
|
|
|
|
$( '.marketplace-suggestions-container' ).each( function() {
|
|
|
|
|
// determine the context / placement we're populating
|
|
|
|
|
var context = this.dataset.marketplaceSuggestionsContext;
|
2019-02-12 21:38:20 +00:00
|
|
|
|
|
2019-02-14 02:47:32 +00:00
|
|
|
|
// find promotions that target this context
|
|
|
|
|
var promos = getRelevantPromotions( marketplaceSuggestionsApiData, context );
|
2019-02-12 21:38:20 +00:00
|
|
|
|
|
2019-02-14 02:47:32 +00:00
|
|
|
|
// render the promo content
|
|
|
|
|
for ( var i in promos ) {
|
2019-02-18 23:22:06 +00:00
|
|
|
|
var linkText = promos[ i ]['link-text'];
|
|
|
|
|
var linkoutIsButton = false;
|
|
|
|
|
if ( promos[ i ]['button-text'] ) {
|
|
|
|
|
linkText = promos[ i ]['button-text'];
|
|
|
|
|
linkoutIsButton = true;
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-19 00:56:49 +00:00
|
|
|
|
// dismiss is allowed by default
|
|
|
|
|
var allowDismiss = true;
|
|
|
|
|
if ( promos[ 0 ]['allow-dismiss'] === false ) {
|
|
|
|
|
allowDismiss = false;
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-14 02:47:32 +00:00
|
|
|
|
var content = renderListItem(
|
2019-02-17 22:48:18 +00:00
|
|
|
|
promos[ i ].slug,
|
2019-02-19 22:46:06 +00:00
|
|
|
|
promos[ i ].icon,
|
2019-02-14 02:47:32 +00:00
|
|
|
|
promos[ i ].title,
|
2019-02-19 03:31:14 +00:00
|
|
|
|
promos[ i ].copy,
|
2019-02-14 02:47:32 +00:00
|
|
|
|
promos[ i ].url,
|
2019-02-18 23:22:06 +00:00
|
|
|
|
linkText,
|
|
|
|
|
linkoutIsButton,
|
2019-02-19 00:56:49 +00:00
|
|
|
|
allowDismiss
|
2019-02-14 02:47:32 +00:00
|
|
|
|
);
|
2019-02-12 21:38:20 +00:00
|
|
|
|
$( this ).append( content );
|
2019-02-18 22:54:58 +00:00
|
|
|
|
$( this ).addClass( 'showing-suggestion' );
|
2019-02-14 02:47:32 +00:00
|
|
|
|
visibleSuggestions.push( promos[i].context );
|
2019-02-20 02:33:57 +00:00
|
|
|
|
|
2019-02-21 22:38:55 +00:00
|
|
|
|
window.wcTracks.recordEvent( 'marketplace_suggestion_displayed', {
|
2019-02-20 02:33:57 +00:00
|
|
|
|
suggestionSlug: promos[ i ].slug
|
|
|
|
|
} );
|
2019-02-12 21:38:20 +00:00
|
|
|
|
}
|
2019-02-14 02:47:32 +00:00
|
|
|
|
} );
|
|
|
|
|
|
|
|
|
|
// render inline promos in products list
|
2019-02-20 02:33:57 +00:00
|
|
|
|
if ( 0 === visibleSuggestions.length ) {
|
|
|
|
|
$( '.wp-admin.admin-bar.edit-php.post-type-product table.wp-list-table.posts tbody').first().each( function() {
|
|
|
|
|
var context = 'products-list-inline';
|
|
|
|
|
|
|
|
|
|
// find promotions that target this context
|
|
|
|
|
var promos = getRelevantPromotions( marketplaceSuggestionsApiData, context );
|
|
|
|
|
if ( ! promos || ! promos.length ) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
2019-02-14 02:47:32 +00:00
|
|
|
|
|
2019-02-20 02:33:57 +00:00
|
|
|
|
// dismiss is allowed by default
|
|
|
|
|
var allowDismiss = true;
|
|
|
|
|
if ( promos[ 0 ]['allow-dismiss'] === false ) {
|
|
|
|
|
allowDismiss = false;
|
|
|
|
|
}
|
2019-02-13 21:53:25 +00:00
|
|
|
|
|
2019-02-20 02:33:57 +00:00
|
|
|
|
// render first promo
|
|
|
|
|
var content = renderTableBanner(
|
|
|
|
|
promos[ 0 ].slug,
|
|
|
|
|
promos[ 0 ].icon,
|
|
|
|
|
promos[ 0 ].title,
|
|
|
|
|
promos[ 0 ].copy,
|
|
|
|
|
promos[ 0 ].url,
|
|
|
|
|
promos[ 0 ]['button-text'],
|
|
|
|
|
allowDismiss
|
|
|
|
|
);
|
2019-02-19 00:56:49 +00:00
|
|
|
|
|
2019-02-20 02:33:57 +00:00
|
|
|
|
if ( content ) {
|
|
|
|
|
// where should we put it in the list?
|
|
|
|
|
var rows = $( this ).children();
|
|
|
|
|
var minRow = 3;
|
|
|
|
|
|
|
|
|
|
if ( rows.length <= minRow ) {
|
|
|
|
|
// if small number of rows, append at end
|
|
|
|
|
$( this ).append( content );
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
// for more rows, append
|
|
|
|
|
$( rows[ minRow - 1 ] ).after( content );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
visibleSuggestions.push( context );
|
|
|
|
|
|
2019-02-21 22:38:55 +00:00
|
|
|
|
window.wcTracks.recordEvent( 'marketplace_suggestion_displayed', {
|
2019-02-20 02:33:57 +00:00
|
|
|
|
suggestionSlug: promos[ 0 ].slug
|
|
|
|
|
} );
|
2019-02-14 02:47:32 +00:00
|
|
|
|
}
|
2019-02-20 02:33:57 +00:00
|
|
|
|
} );
|
|
|
|
|
}
|
2019-02-14 02:47:32 +00:00
|
|
|
|
|
2019-02-19 00:56:49 +00:00
|
|
|
|
hidePageElementsForEmptyState( visibleSuggestions );
|
2019-02-13 01:35:56 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-02-21 22:23:09 +00:00
|
|
|
|
if ( marketplace_suggestions.suggestions_data ) {
|
|
|
|
|
displaySuggestions( marketplace_suggestions.suggestions_data );
|
|
|
|
|
}
|
2019-02-12 21:38:20 +00:00
|
|
|
|
});
|
|
|
|
|
|
2019-02-15 01:52:24 +00:00
|
|
|
|
})( jQuery, marketplace_suggestions, ajaxurl );
|