WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Marketplace_Suggestions::post_add_dismissed_suggestion_handler() public WC 1.0

POST handler for adding a dismissed suggestion.

Это метод класса: WC_Marketplace_Suggestions{}

Хуков нет.

Возвращает

Null. Ничего.

Использование

$result = WC_Marketplace_Suggestions::post_add_dismissed_suggestion_handler();

Код WC Marketplace Suggestions::post add dismissed suggestion handler: woocommerce/includes/admin/marketplace-suggestions/class-wc-marketplace-suggestions.php WC 4.5.2

<?php
public static function post_add_dismissed_suggestion_handler() {
	if ( ! check_ajax_referer( 'add_dismissed_marketplace_suggestion' ) ) {
		wp_die();
	}

	$post_data       = wp_unslash( $_POST );
	$suggestion_slug = sanitize_text_field( $post_data['slug'] );
	if ( ! $suggestion_slug ) {
		wp_die();
	}

	$dismissed_suggestions = self::get_dismissed_suggestions();

	if ( in_array( $suggestion_slug, $dismissed_suggestions, true ) ) {
		wp_die();
	}

	$dismissed_suggestions[] = $suggestion_slug;
	update_user_meta(
		get_current_user_id(),
		'wc_marketplace_suggestions_dismissed_suggestions',
		$dismissed_suggestions
	);

	wp_die();
}