documents->get_documents( 'all' ); foreach ( $documents as $document ) { if ( is_callable( array( $document, 'init_settings' ) ) ) { $document->init_settings(); } } } public function output( $section, $nonce ) { if ( ! wp_verify_nonce( $nonce, 'wp_wcpdf_settings_page_nonce' ) ) { return; } $section = ! empty( $section ) ? $section : 'invoice'; $option_name = "wpo_wcpdf_documents_settings_{$section}"; $documents = WPO_WCPDF()->documents->get_documents( 'all' ); $section_document = null; foreach ( $documents as $document ) { if ( $document->get_type() == $section ) { $section_document = $document; break; } } if ( empty( $section_document ) ) { return; } ?>
'.esc_html( $section_document->get_title() ).''; ?>

', '' ); ?>