ensure suggestion dismiss API / nonce is provided to js (missed in last commit)

This commit is contained in:
haszari 2019-02-18 11:46:22 +13:00
parent bf9f14c0b6
commit 4ea4e6591a
1 changed files with 9 additions and 1 deletions

View File

@ -435,7 +435,15 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) :
WC_VERSION,
true
);
wp_localize_script( 'marketplace-suggestions', 'installed_woo_plugins', $woo_plugin_slugs );
wp_localize_script(
'marketplace-suggestions',
'marketplace_suggestions',
array(
'dismiss_suggestion_nonce' => wp_create_nonce( 'add_dismissed_marketplace_suggestion' ),
'installed_woo_plugins' => $woo_plugin_slugs,
'dismissed_suggestions' => wc_marketplace_suggestions_get_dismissed(),
)
);
wp_enqueue_script( 'marketplace-suggestions' );
}