Skip to content

Commit 98d9985

Browse files
committed
Remove unwanted code.
1 parent 93ad233 commit 98d9985

File tree

5 files changed

+8
-18
lines changed

5 files changed

+8
-18
lines changed

includes/blocks/class-mailchimp-list-subscribe-form-blocks.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,6 @@ public function register_blocks() {
4545
}
4646
}
4747

48-
// Get the default visibility of interest groups.
49-
$interest_groups_visibility = array();
50-
$interest_groups = get_option( 'mc_interest_groups', array() );
51-
if ( ! empty( $interest_groups ) ) {
52-
foreach ( $interest_groups as $group ) {
53-
$visible = 'on' === get_option( 'mc_show_interest_groups_' . $group['id'], 'on' ) && 'hidden' !== $group['type'];
54-
$interest_groups_visibility[ $group['id'] ] = $visible ? 'on' : 'off';
55-
}
56-
}
57-
5848
// Register the Mailchimp List Subscribe Form blocks.
5949
$blocks_dist_path = MCSF_DIR . 'dist/blocks/';
6050

includes/blocks/mailchimp/edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ export const BlockEdit = (props) => {
291291
<RichText
292292
id="mc_signup_submit"
293293
className="button"
294-
tagName="a"
294+
tagName="button"
295295
placeholder={__('Enter a button text.', 'mailchimp')}
296296
value={submit_text}
297297
onChange={(submit_text) =>

includes/blocks/mailchimp/editor.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ div#mc_subheader:has(h3 span:empty) {
7979
select.mc_select {
8080
max-width: 100%;
8181
width: 100%;
82+
padding: 10px 8px;
8283
}
8384
.mc_address_label {
8485
margin-top: 1.0em;
@@ -87,6 +88,7 @@ select.mc_select {
8788
}
8889
.mc_address_label ~ select {
8990
max-width: 100%;
91+
padding: 10px 8px;
9092
width: 100%;
9193
}
9294
.mc_list li {

includes/blocks/mailchimp/markup.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
* @package Mailchimp
66
*/
77

8+
// Check if we should display the form.
9+
if ( ! mailchimp_sf_should_display_form() ) {
10+
return;
11+
}
12+
813
?>
914
<div <?php echo get_block_wrapper_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
1015
<?php
11-
// Check if we should display the form.
12-
if ( ! mailchimp_sf_should_display_form() ) {
13-
return;
14-
}
1516

1617
// Backwards compatibility for old block, which didn't have innerBlocks.
1718
$block_instance = $block->parsed_block;

includes/class-mailchimp-block-form-submission.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,6 @@ public function handle_form_submission() {
108108
return false;
109109
}
110110

111-
// TODO: If get_option( 'mc_update_existing' ) && 'unsubscribed' === $status then
112-
// make an API request to fetch Mailchimp hosted sign up form and display to user
113-
114111
$request_body = mailchimp_sf_subscribe_body( $merge_fields_body, $groups, $email_type, $email, $status, 'yes' === $double_opt_in );
115112
$response = $api->post( $url, $request_body, 'PUT', $list_id );
116113

0 commit comments

Comments
 (0)