id, array( $this, 'get_settings' ), PHP_INT_MAX ); } /** * settings_section. * * @version 1.0.0 * @since 1.0.0 */ function settings_section( $sections ) { $sections[ $this->id ] = $this->desc; return $sections; } /** * pro_msg. * * @version 4.0.0 * @since 2.0.0 */ function pro_msg( $msg = 'enable this section' ) { return apply_filters( 'alg_wc_ean_settings', '

' . sprintf( 'You will need EAN for WooCommerce Pro plugin version to %s.', $msg ) . '

' ); } /** * variable_products_note. * * @version 2.4.0 * @since 2.0.0 * * @todo (desc) better desc? */ function variable_products_note() { return __( 'Please note that for the variable products, main product\'s EAN must be set.', 'ean-for-woocommerce' ); } /** * get_wc_emails. * * @version 3.1.0 * @since 3.1.0 */ function get_wc_emails() { $emails = array(); $wc_emails = WC_Emails::instance(); foreach ( $wc_emails->get_emails() as $email_id => $email ) { $emails[ $email->id ] = $email->get_title(); } return $emails; } } endif;