Skip to content

Contact Form: avoid conflicts when using the old version of the Contact Form feature #33464

Closed

Description

This is a follow-up to #33050.

Right now, the contact form feature is loaded from the Contact Form package by default:

/**
* Whether to load the newer Jetpack Forms package.
*
* @use add_filter( 'jetpack_contact_form_use_package', '__return_true' );
* @module contact-form
*
* @since 11.8
*
* @param bool $load_contact_form_package Load Jetpack Forms package. Default to false.
*/
if ( apply_filters( 'jetpack_contact_form_use_package', true ) ) {
Jetpack_Forms::load_contact_form();
return true; // Not returning true will cause the module to become deactivated.
}

Some site owners may decide to continue to load the contact form feature from the old codebase instead:

add_filter( 'jetpack_contact_form_use_package', '__return_false' );

When you do so, you run into issues with how the blocks are registered, as discussed in p1696362451002639-slack-CDD9LQRSN

Related Epic: #32401


Related Epic: the old form code will eventually be removed in #30551

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

Type

No type

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions