Skip to content

Commit

Permalink
Quick fix for bug katzwebservices#79
Browse files Browse the repository at this point in the history
Maybe not the most ideal way to fix this, but it does prevent the
'single' checkbox type from subscribing people who didn't opt in. Does
not affect the other types, although the dropdown select never did work
due to a different bug. A better way to fix this might be to add
'ctctcf7_lists' to the 'Opt-In Field' dropdown list on the Constant
Contact tab, but I haven't yet found where to add that - maybe something
the plugin author can address more adequately.
  • Loading branch information
Typel committed Feb 15, 2017
1 parent bea244d commit e0aff4c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions trunk/cf7-constantcontact.php
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,9 @@ static function show_signup_message() {
*/
public function save_form_settings( $args ) {
$cf_id = method_exists( $args, 'id' ) ? $args->id() : $args->id;
if ( $_POST['wpcf7-ctct']['accept'] == "" && strpos($_POST['wpcf7-ctct']['wpcf7-form'], " type:single ") !== false ) {
$_POST['wpcf7-ctct']['accept'] = "ctctcf7_lists";
}
update_option( 'cf7_ctct_' . $cf_id, $_POST['wpcf7-ctct'] );
}

Expand Down

1 comment on commit e0aff4c

@chrisblakley
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks this helped so much!

Please sign in to comment.