PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 3.4.4
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v3.4.4
3.4.4 3.4.3 3.4.2 3.4.1 3.4.0 3.3.9 3.3.8 3.3.7 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 All 197 releases
← All changes | includes/integrations/contactform7/class-convertkit-contactform7-settings.php +27 -3 2.2.4 → 3.4.4 View file →
@@ -77,16 +77,16 @@
77 77
78 78 }
79 79
80 80 /**
81 - * Returns the ConvertKit Form ID that is mapped against the given Contact Form 7 Form ID.
81 + * Returns the ConvertKit subscription setting for the given Contact Form 7 Form ID.
82 82 *
83 83 * @since 1.9.6
84 84 *
85 85 * @param int $cf7_form_id Contact Form 7 Form ID.
86 - * @return bool|int
86 + * @return bool|string|int
87 87 */
88 - public function get_convertkit_form_id_by_cf7_form_id( $cf7_form_id ) {
88 + public function get_convertkit_subscribe_setting_by_cf7_form_id( $cf7_form_id ) {
89 89
90 90 // Bail if no settings exist.
91 91 if ( ! $this->has_settings() ) {
92 92 return false;
@@ -97,8 +97,32 @@
97 97 return false;
98 98 }
99 99
100 100 return $this->get()[ $cf7_form_id ];
101 +
102 + }
103 +
104 + /**
105 + * Returns whether Creator Network Recommendations are enabled for the given Contact Form 7 Form ID.
106 + *
107 + * @since 2.2.7
108 + *
109 + * @param int $cf7_form_id Contact Form 7 Form ID.
110 + * @return bool
111 + */
112 + public function get_creator_network_recommendations_enabled_by_cf7_form_id( $cf7_form_id ) {
113 +
114 + // Bail if no settings exist for any Contact Form 7 Forms.
115 + if ( ! $this->has_settings() ) {
116 + return false;
117 + }
118 +
119 + // Bail if no setting exists for the given Contact Form 7 Form.
120 + if ( ! array_key_exists( 'creator_network_recommendations_' . $cf7_form_id, $this->get() ) ) {
121 + return false;
122 + }
123 +
124 + return (bool) $this->get()[ 'creator_network_recommendations_' . $cf7_form_id ];
101 125
102 126 }
103 127
104 128 /**