set_name( '' ) ->set_description( sprintf( '%2$s', $pro_url, esc_html__( 'To automate emails with invoices to your accountant buy the add-on Advanced Sending for Flexible Invoices →', 'flexible-invoices-woocommerce' ) ) ) ->set_label( __( 'Sending invoices', 'flexible-invoices-woocommerce' ) ) ->set_disabled(), ( new CheckboxField() ) ->set_name( '' ) ->set_label( __( 'Sending invoices to customers', 'flexible-invoices-woocommerce' ) ) ->set_default_value( 'on' ) ->set_sublabel( __( 'Enable automatic mailing of invoices to customers', 'flexible-invoices-woocommerce' ) ) ->set_disabled(), ( new CheckboxField() ) ->set_name( '' ) ->set_label( __( 'Attachments in the e-mail', 'flexible-invoices-woocommerce' ) ) ->set_sublabel( __( 'Attach PDF file to invoice email', 'flexible-invoices-woocommerce' ) ) ->set_disabled(), ( new Header() ) ->set_name( '' ) ->set_label( __( 'Cyclical sending of invoices', 'flexible-invoices-woocommerce' ) ) ->set_description( __( 'Below you will set up a cyclical sending of ZIP files with invoices. You can find out more in the plugins docs.', 'flexible-invoices-woocommerce' ) ) ->set_disabled(), ( new MultipleInputTextField() ) ->set_name( '' ) ->set_label( __( 'Additional recipients', 'flexible-invoices-woocommerce' ) ) ->set_placeholder( __( 'E-mail address', 'flexible-invoices-woocommerce' ) ) ->set_description( __( 'Add additional recipients', 'flexible-invoices-woocommerce' ) ) ->set_disabled(), ( new SelectField() ) ->set_label( __( 'Schedule for sending documents', 'flexible-invoices-woocommerce' ) ) ->set_name( '' ) ->set_description( __( 'Choose the period for which you want sent documents to the address from the "Additional Recipients" setting.', 'flexible-invoices-woocommerce' ) ) ->set_options( [ 'none' => __( 'none', 'flexible-invoices-woocommerce' ), 'daily' => __( 'daily', 'flexible-invoices-woocommerce' ), 'weekly' => __( 'weekly', 'flexible-invoices-woocommerce' ), 'monthly' => __( 'monthly', 'flexible-invoices-woocommerce' ), ] ) ->set_default_value( 'none' ) ->set_disabled(), ( new InputTextField() ) ->set_name( '' ) ->set_label( __( 'Email subject', 'flexible-invoices-woocommerce' ) ) ->set_placeholder( __( 'Invoices from {from_date} to {to_date}', 'flexible-invoices-woocommerce' ) ) ->set_default_value( EmailStrings::get_email_invoice_subject() ) ->set_description( __( 'You can use the following shortcodes: {site_title}, {site_url}, {admin_email}, {current_date}, {site_description}, {from_date}, {to_date}.', 'flexible-invoices-woocommerce' ) ) ->set_disabled(), ( new WysiwygField() ) ->set_name( '' ) ->set_label( __( 'E-mail body', 'flexible-invoices-woocommerce' ) ) ->set_default_value( EmailStrings::get_email_invoice_body() ) ->set_description( __( 'You can use the following shortcodes: {site_title}, {site_url}, {admin_email}, {current_date}, {site_description}, {from_date}, {to_date}.', 'flexible-invoices-woocommerce' ) ) ->set_disabled(), ( new Header() ) ->set_name( '' ) ->set_label( __( 'Cyclical sending of reports', 'flexible-invoices-woocommerce' ) ) ->set_description( __( 'Below you will set up a cyclical sending of reports. You can find out more in the plugins docs.', 'flexible-invoices-woocommerce' ) ) ->set_disabled(), ( new MultipleInputTextField() ) ->set_name( '' ) ->set_label( __( 'Additional recipients', 'flexible-invoices-woocommerce' ) ) ->set_placeholder( __( 'E-mail address', 'flexible-invoices-woocommerce' ) ) ->set_description( __( 'Add additional recipients.', 'flexible-invoices-woocommerce' ) ) ->set_attribute( 'data-disabled', $this->get_disabled() ) ->set_disabled(), ( new SelectField() ) ->set_label( __( 'Schedule for sending reports', 'flexible-invoices-woocommerce' ) ) ->set_name( '' ) ->set_description( __( 'Choose the period for which you want the report automatically sent to the address from the "Additional Recipients" setting.', 'flexible-invoices-woocommerce' ) ) ->set_options( [ 'none' => __( 'none', 'flexible-invoices-woocommerce' ), 'daily' => __( 'daily', 'flexible-invoices-woocommerce' ), 'weekly' => __( 'weekly', 'flexible-invoices-woocommerce' ), 'monthly' => __( 'monthly', 'flexible-invoices-woocommerce' ), ] ) ->set_default_value( 'none' ) ->set_attribute( 'data-disabled', $this->get_disabled() ) ->set_disabled(), ( new InputTextField() ) ->set_name( '' ) ->set_label( __( 'Email subject', 'flexible-invoices-woocommerce' ) ) ->set_placeholder( __( 'Report from {from_date} to {to_date} ', 'flexible-invoices-woocommerce' ) ) ->set_default_value( EmailStrings::get_email_report_subject() ) ->set_description( __( 'You can use the following shortcodes: {site_title}, {site_url}, {admin_email}, {current_date}, {site_description}, {from_date}, {to_date}.', 'flexible-invoices-woocommerce' ) ) ->set_attribute( 'data-disabled', $this->get_disabled() ) ->set_disabled(), ( new WysiwygField() ) ->set_name( '' ) ->set_label( __( 'E-mail body', 'flexible-invoices-woocommerce' ) ) ->set_description( __( 'You can use the following shortcodes: {site_title}, {site_url}, {admin_email}, {current_date}, {site_description}, {from_date}, {to_date}.', 'flexible-invoices-woocommerce' ) ) ->set_default_value( EmailStrings::get_email_report_body() ) ->set_attribute( 'data-disabled', $this->get_disabled() ) ->set_disabled(), ( new SubmitField() ) ->set_name( '' ) ->set_label( __( 'Save changes', 'flexible-invoices-woocommerce' ) ) ->add_class( 'button-primary' ) ->set_disabled(), ]; } /** * Get tab slug. * * @return string */ public static function get_tab_slug(): string { return 'fias-sending'; } /** * Get tab name. * * @return string */ public function get_tab_name(): string { return __( 'Advanced Sending', 'flexible-invoices-woocommerce' ); } /** * Is active. * * @return bool */ public static function is_active(): bool { return true; } }