rror( sprintf( '%s > Mailchimp API Error: %s', $this->name, $mailchimp->get_error_message() ) ); } // bail return false; } $log->info( sprintf( '%s > Successfully subscribed %s', $this->name, $subscriber->email_address ) ); /** * Runs right after someone is subscribed using an integration * * @since 3.0 * * @param MC4WP_Integration $integration * @param string $email_address * @param array $merge_vars * @param MC4WP_MailChimp_Subscriber[] $subscriber_data * @param int $related_object_id */ do_action( 'mc4wp_integration_subscribed', $integration, $subscriber->email_address, $subscriber->merge_fields, $map, $related_object_id ); return $result; } /** * Are the required dependencies for this integration installed? * * @return bool */ public function is_installed() { return false; } /** * Which UI elements should we show on the settings page for this integration? * * @return array */ public function get_ui_elements() { return array_keys( $this->options ); } /** * Does integration have the given UI element? * * @param string $element * @return bool */ public function has_ui_element( $element ) { $elements = $this->get_ui_elements(); return in_array( $element, $elements, true ); } /** * Return a string to the admin settings page for this object (if any) * * @param int $object_id * @return string */ public function get_object_link( $object_id ) { return ''; } /** * Get the data for this integration request * * By default, this will return a combination of all $_GET and $_POST parameters. * Override this method if you need data from somewhere else. * * This data should contain the value of the checkbox (required) * and the lists to which should be subscribed (optional) * * @see MC4WP_Integration::$checkbox_name * @see MC4WP_Integration::get_lists * @see MC4WP_Integration::checkbox_was_checked * * @return array */ public function get_data() { $data = array_merge( (array) $_GET, (array) $_POST ); return $data; } /** * @return MC4WP_Debug_Log */ protected function get_log() { return mc4wp( 'log' ); } /** * @return MC4WP_API_V3 */ protected function get_api() { return mc4wp( 'api' ); } }