• Resolved Unknown

    (@unknownman888)


    I have optional fields hidden behind a link button. Is it possible to keep the order notes field shown while optional?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Diego Versiani

    (@diegoversiani)

    Hi @unknownman888,

    Yes, you can use the code snippet below to skip hiding some optional fields, including the order notes field:

    /**
     * Skip hiding optional fields with the "+ add" buttons.
     */
    function fluidcheckout_add_optional_fields_skip_list( $skip_list ) {
    	// $skip_list[] = 'field_id';
    	$skip_list[] = 'order_comments';
    	return $skip_list;
    }
    add_filter( 'fc_hide_optional_fields_skip_list', 'fluidcheckout_add_optional_fields_skip_list', 10 );

    If you are unsure about how to add the code snippet to your website, check our article:
    How to safely add code snippets to your WooCommerce website

    I’m closing this ticket for now. If you need further assistance related to this issue, simply reply to this message to re-open it.

    Best,
    Diego.

    Thread Starter Unknown

    (@unknownman888)

    Hi, thanks for the code it worked. Could you please tell me how I can add more fields to the code?

    Plugin Author Diego Versiani

    (@diegoversiani)

    Hi @unknownman888,

    Just add more lines such as $skip_list[] = 'order_comments'; before the final line return $skip_list;.

    There is an example commented out in the code already.

    Best,
    Diego.

    Thread Starter Unknown

    (@unknownman888)

    Helpful, thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Optional fields’ is closed to new replies.