We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5a4e92 commit 86f5689Copy full SHA for 86f5689
1 file changed
includes/helper-functions.php
@@ -633,7 +633,10 @@ function constant_contact_get_widgets_by_form( $form_id ) {
633
get_option( "widget_{$widget_type}", [] ),
634
function( $value ) use ( $data ) {
635
if ( 'ctct_form' === $data['type'] ) {
636
- return absint( $value['ctct_form_id'] ) === $data['form_id'];
+ // We get this primarily from classic widgets as opposed to widget blocks.
637
+ if ( is_array( $value ) && array_key_exists( 'ctct_form_id', $value ) ) {
638
+ return absint( $value['ctct_form_id'] ) === $data['form_id'];
639
+ }
640
} elseif ( 'text' === $data['type'] ) {
641
if ( ! isset( $value['text'] ) || false === strpos( $value['text'], '[ctct' ) ) {
642
return false;
0 commit comments