Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ras): add script for fixing duplicate Mailchimp merge fields #3628

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions includes/cli/class-initializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public static function init() {
include_once NEWSPACK_ABSPATH . 'includes/cli/class-ras.php';
include_once NEWSPACK_ABSPATH . 'includes/cli/class-ras-esp-sync.php';
include_once NEWSPACK_ABSPATH . 'includes/cli/class-co-authors-plus.php';
include_once NEWSPACK_ABSPATH . 'includes/cli/class-mailchimp.php';
include_once NEWSPACK_ABSPATH . 'includes/cli/class-woocommerce-subscriptions.php';
}

Expand Down Expand Up @@ -59,13 +60,18 @@ public static function register_comands() {
);

WP_CLI::add_command(
'newspack esp merge-fields list',
[ 'Newspack\CLI\RAS_ESP_Sync', 'cli_mailchimp_list_merge_fields' ]
'newspack mailchimp merge-fields list',
[ 'Newspack\CLI\Mailchimp', 'cli_mailchimp_list_merge_fields' ]
);

WP_CLI::add_command(
'newspack esp merge-fields delete',
[ 'Newspack\CLI\RAS_ESP_Sync', 'cli_mailchimp_delete_merge_fields' ]
'newspack mailchimp merge-fields delete',
[ 'Newspack\CLI\Mailchimp', 'cli_mailchimp_delete_merge_fields' ]
);

WP_CLI::add_command(
'newspack mailchimp merge-fields fix-duplicates',
[ 'Newspack\CLI\Mailchimp', 'cli_mailchimp_fix_duplicate_merge_fields' ]
);

WP_CLI::add_command( 'newspack migrate-co-authors-guest-authors', [ 'Newspack\CLI\Co_Authors_Plus', 'migrate_guest_authors' ] );
Expand Down
Loading