WC_Notes_Refund_Returns::get_note()
Get the note.
Метод класса: WC_Notes_Refund_Returns{}
Хуков нет.
Возвращает
Объект
. $note The note object.
Использование
$result = WC_Notes_Refund_Returns::get_note( $page_id );
- $page_id(int) (обязательный)
- The ID of the page.
Код WC_Notes_Refund_Returns::get_note() WC Notes Refund Returns::get note WC 9.4.2
public static function get_note( $page_id ) { $note = new Note(); $note->set_title( __( 'Setup a Refund and Returns Policy page to boost your store\'s credibility.', 'woocommerce' ) ); $note->set_content( __( 'We have created a sample draft Refund and Returns Policy page for you. Please have a look and update it to fit your store.', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_content_data( (object) array() ); $note->set_source( 'woocommerce-core' ); $note->add_action( 'notify-refund-returns-page', __( 'Edit page', 'woocommerce' ), admin_url( sprintf( 'post.php?post=%d&action=edit', (int) $page_id ) ) ); return $note; }