Automattic\WooCommerce\Admin\Notes
Notes::possibly_delete_survey_notes() public WC 1.0
Delete actioned survey notes.
{} Это метод класса: Notes{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$result = Notes::possibly_delete_survey_notes();
Код Notes::possibly_delete_survey_notes() Notes::possibly delete survey notes WC 5.0.0
public static function possibly_delete_survey_notes() {
$data_store = \WC_Data_Store::load( 'admin-note' );
$notes = $data_store->get_notes(
array(
'type' => array( Note::E_WC_ADMIN_NOTE_SURVEY ),
'status' => array( 'actioned' ),
)
);
foreach ( $notes as $note ) {
$note = self::get_note( $note->note_id );
if ( $note ) {
$note->set_is_deleted( 1 );
$note->save();
}
}
}