Changeset 2678577
- Timestamp:
- 02/14/2022 03:39:02 PM (4 years ago)
- Location:
- convertkit-for-woocommerce
- Files:
-
- 22 added
- 4 deleted
- 26 edited
- 1 copied
-
tags/1.4.3 (copied) (copied from convertkit-for-woocommerce/trunk)
-
tags/1.4.3/.scripts (deleted)
-
tags/1.4.3/ACTIONS-FILTERS.md (deleted)
-
tags/1.4.3/admin/class-ckwc-admin-product.php (modified) (3 diffs)
-
tags/1.4.3/includes/class-ckwc-integration.php (modified) (18 diffs)
-
tags/1.4.3/includes/class-ckwc-order.php (modified) (10 diffs)
-
tags/1.4.3/includes/class-ckwc-resource-custom-fields.php (added)
-
tags/1.4.3/includes/class-ckwc-resource.php (modified) (1 diff)
-
tags/1.4.3/includes/class-ckwc-review-request.php (added)
-
tags/1.4.3/includes/class-wp-ckwc.php (modified) (1 diff)
-
tags/1.4.3/includes/functions.php (modified) (1 diff)
-
tags/1.4.3/languages/woocommerce-convertkit.pot (modified) (7 diffs)
-
tags/1.4.3/readme.txt (modified) (1 diff)
-
tags/1.4.3/resources/backend/css (added)
-
tags/1.4.3/resources/backend/css/product.css (added)
-
tags/1.4.3/resources/backend/css/select2.css (added)
-
tags/1.4.3/resources/backend/js/integration.js (modified) (1 diff)
-
tags/1.4.3/resources/backend/js/select2.js (added)
-
tags/1.4.3/views/backend/custom-field-dropdown-field.php (added)
-
tags/1.4.3/views/backend/product/disabled.php (modified) (1 diff)
-
tags/1.4.3/views/backend/product/meta-box.php (modified) (1 diff)
-
tags/1.4.3/views/backend/review (added)
-
tags/1.4.3/views/backend/review/notice.php (added)
-
tags/1.4.3/views/backend/settings/custom-field-disabled.php (added)
-
tags/1.4.3/views/backend/settings/custom-field.php (added)
-
tags/1.4.3/views/backend/settings/subscription-disabled.php (modified) (1 diff)
-
tags/1.4.3/woocommerce-convertkit.php (modified) (4 diffs)
-
trunk/.scripts (deleted)
-
trunk/ACTIONS-FILTERS.md (deleted)
-
trunk/admin/class-ckwc-admin-product.php (modified) (3 diffs)
-
trunk/includes/class-ckwc-integration.php (modified) (18 diffs)
-
trunk/includes/class-ckwc-order.php (modified) (10 diffs)
-
trunk/includes/class-ckwc-resource-custom-fields.php (added)
-
trunk/includes/class-ckwc-resource.php (modified) (1 diff)
-
trunk/includes/class-ckwc-review-request.php (added)
-
trunk/includes/class-wp-ckwc.php (modified) (1 diff)
-
trunk/includes/functions.php (modified) (1 diff)
-
trunk/languages/woocommerce-convertkit.pot (modified) (7 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/resources/backend/css (added)
-
trunk/resources/backend/css/product.css (added)
-
trunk/resources/backend/css/select2.css (added)
-
trunk/resources/backend/js/integration.js (modified) (1 diff)
-
trunk/resources/backend/js/select2.js (added)
-
trunk/views/backend/custom-field-dropdown-field.php (added)
-
trunk/views/backend/product/disabled.php (modified) (1 diff)
-
trunk/views/backend/product/meta-box.php (modified) (1 diff)
-
trunk/views/backend/review (added)
-
trunk/views/backend/review/notice.php (added)
-
trunk/views/backend/settings/custom-field-disabled.php (added)
-
trunk/views/backend/settings/custom-field.php (added)
-
trunk/views/backend/settings/subscription-disabled.php (modified) (1 diff)
-
trunk/woocommerce-convertkit.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
convertkit-for-woocommerce/tags/1.4.3/admin/class-ckwc-admin-product.php
r2668107 r2678577 35 35 $this->integration = WP_CKWC_Integration(); 36 36 37 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 38 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) ); 37 39 add_action( 'add_meta_boxes_product', array( $this, 'add_meta_boxes' ) ); 38 40 add_action( 'save_post_product', array( $this, 'save_product' ) ); 41 42 } 43 44 /** 45 * Enqueue Javascript for the WooCommerce Add / Edit Product screen. 46 * 47 * @since 1.4.3 48 */ 49 public function enqueue_scripts() { 50 51 // Bail if we're not on the Add / Edit Product screen. 52 if ( ! $this->is_edit_product_screen() ) { 53 return; 54 } 55 56 // Enqueue Select2 JS. 57 ckwc_select2_enqueue_scripts(); 58 59 } 60 61 /** 62 * Enqueue CSS for the WooCommerce Add / Edit Product screen. 63 * 64 * @since 1.4.3 65 */ 66 public function enqueue_styles() { 67 68 // Bail if we're not on the Add / Edit Product screen. 69 if ( ! $this->is_edit_product_screen() ) { 70 return; 71 } 72 73 // Enqueue CSS. 74 wp_enqueue_style( 'ckwc-product', CKWC_PLUGIN_URL . '/resources/backend/css/product.css', false, CKWC_PLUGIN_VERSION ); 75 76 // Enqueue Select2 CSS. 77 ckwc_select2_enqueue_styles(); 39 78 40 79 } … … 77 116 $subscription = array( 78 117 'id' => 'ckwc_subscription', 79 'class' => ' widefat',118 'class' => 'ckwc-select2 widefat', 80 119 'name' => 'ckwc_subscription', 81 120 'value' => get_post_meta( $post->ID, 'ckwc_subscription', true ), … … 127 166 } 128 167 168 /** 169 * Checks if the request is for viewing the WooCommerce Add / Edit Product screen. 170 * 171 * @since 1.4.3 172 * 173 * @return bool 174 */ 175 private function is_edit_product_screen() { 176 177 // Return false if we cannot reliably determine the current screen that is viewed, 178 // due to WordPress' get_current_screen() function being unavailable. 179 if ( ! function_exists( 'get_current_screen' ) ) { 180 return false; 181 } 182 183 // Get screen. 184 $screen = get_current_screen(); 185 186 // Return false if we're not on the Add / Edit Product screen. 187 if ( $screen->id !== 'product' ) { 188 return false; 189 } 190 191 return true; 192 193 } 194 129 195 } -
convertkit-for-woocommerce/tags/1.4.3/includes/class-ckwc-integration.php
r2668107 r2678577 17 17 18 18 /** 19 * Holds the Form resources instance. 20 * 21 * @since 1.4.3 22 * 23 * @var CKWC_Resource_Forms 24 */ 25 private $forms; 26 27 /** 28 * Holds the Form resources instance. 29 * 30 * @since 1.4.3 31 * 32 * @var CKWC_Resource_Tags 33 */ 34 private $tags; 35 36 /** 37 * Holds the Form resources instance. 38 * 39 * @since 1.4.3 40 * 41 * @var CKWC_Resource_Sequences 42 */ 43 private $sequences; 44 45 /** 46 * Holds the Form resources instance. 47 * 48 * @since 1.4.3 49 * 50 * @var CKWC_Resource_Custom_Fields 51 */ 52 private $custom_fields; 53 54 /** 19 55 * Constructor 20 56 * … … 35 71 if ( is_admin() ) { 36 72 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 73 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) ); 37 74 add_action( "woocommerce_update_options_integration_{$this->id}", array( $this, 'process_admin_options' ) ); 38 75 add_filter( "woocommerce_settings_api_sanitized_fields_{$this->id}", array( $this, 'sanitize_settings' ) ); … … 52 89 $this->form_fields = array( 53 90 // Enable/Disable entire integration. 54 'enabled' => array(91 'enabled' => array( 55 92 'title' => __( 'Enable/Disable', 'woocommerce-convertkit' ), 56 93 'type' => 'checkbox', … … 60 97 61 98 // API Key and Secret. 62 'api_key' => array(99 'api_key' => array( 63 100 'title' => __( 'API Key', 'woocommerce-convertkit' ), 64 101 'type' => 'text', … … 77 114 'class' => 'enabled', 78 115 ), 79 'api_secret' => array(116 'api_secret' => array( 80 117 'title' => __( 'API Secret', 'woocommerce-convertkit' ), 81 118 'type' => 'text', … … 96 133 97 134 // Subscribe. 98 'event' => array(135 'event' => array( 99 136 'title' => __( 'Subscribe Event', 'woocommerce-convertkit' ), 100 137 'type' => 'select', … … 111 148 'class' => 'enabled subscribe', 112 149 ), 113 'subscription' => array(150 'subscription' => array( 114 151 'title' => __( 'Subscription', 'woocommerce-convertkit' ), 115 152 'type' => 'subscription', 116 153 'default' => '', 117 'description' => __( 'The ConvertKit Form, Tag or Sequence to subscribe Customers to.', 'woocommerce-convertkit' ),118 119 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 120 'class' => 'enabled subscribe', 121 ), 122 'name_format' => array(154 'description' => __( 'The ConvertKit form, tag or sequence to subscribe customers to.', 'woocommerce-convertkit' ), 155 156 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 157 'class' => 'enabled subscribe', 158 ), 159 'name_format' => array( 123 160 'title' => __( 'Name Format', 'woocommerce-convertkit' ), 124 161 'type' => 'select', … … 136 173 ), 137 174 175 // Custom Field Mappings. 176 'custom_field_phone' => array( 177 'title' => __( 'Send Phone Number', 'woocommerce-convertkit' ), 178 'type' => 'custom_field', 179 'default' => '', 180 'description' => __( 'The ConvertKit custom field to store the order\'s phone number.', 'woocommerce-convertkit' ), 181 182 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 183 'class' => 'enabled subscribe', 184 ), 185 'custom_field_billing_address' => array( 186 'title' => __( 'Send Billing Address', 'woocommerce-convertkit' ), 187 'type' => 'custom_field', 188 'default' => '', 189 'description' => __( 'The ConvertKit custom field to store the order\'s billing address.', 'woocommerce-convertkit' ), 190 191 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 192 'class' => 'enabled subscribe', 193 ), 194 'custom_field_shipping_address' => array( 195 'title' => __( 'Send Shipping Address', 'woocommerce-convertkit' ), 196 'type' => 'custom_field', 197 'default' => '', 198 'description' => __( 'The ConvertKit custom field to store the order\'s shipping address.', 'woocommerce-convertkit' ), 199 200 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 201 'class' => 'enabled subscribe', 202 ), 203 'custom_field_payment_method' => array( 204 'title' => __( 'Send Payment Method', 'woocommerce-convertkit' ), 205 'type' => 'custom_field', 206 'default' => '', 207 'description' => __( 'The ConvertKit custom field to store the order\'s payment method.', 'woocommerce-convertkit' ), 208 209 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 210 'class' => 'enabled subscribe', 211 ), 212 'custom_field_customer_note' => array( 213 'title' => __( 'Send Customer Note', 'woocommerce-convertkit' ), 214 'type' => 'custom_field', 215 'default' => '', 216 'description' => __( 'The ConvertKit custom field to store the order\'s customer note.', 'woocommerce-convertkit' ), 217 218 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 219 'class' => 'enabled subscribe', 220 ), 221 138 222 // Subscribe: Display Opt In Checkbox Settings. 139 'display_opt_in' => array(223 'display_opt_in' => array( 140 224 'title' => __( 'Opt-In Checkbox', 'woocommerce-convertkit' ), 141 'label' => __( 'Display an Opt-In checkbox on checkout', 'woocommerce-convertkit' ),225 'label' => __( 'Display an opt-in checkbox on checkout', 'woocommerce-convertkit' ), 142 226 'type' => 'checkbox', 143 227 'default' => 'no', 144 228 'description' => __( 145 'If enabled, customers will <strong>only</strong> be subscribed to the chosen Forms, Tags and Sequences if they check the "Opt-In"checkbox at checkout.<br />146 If disabled, customers will <strong>always</strong> be subscribed to the chosen Forms, Tags and Sequences at checkout.',229 'If enabled, customers will <strong>only</strong> be subscribed to the chosen forms, tags and sequences if they check the opt-in checkbox at checkout.<br /> 230 If disabled, customers will <strong>always</strong> be subscribed to the chosen forms, tags and sequences at checkout.', 147 231 'woocommerce-convertkit' 148 232 ), … … 152 236 'class' => 'enabled subscribe', 153 237 ), 154 'opt_in_label' => array(238 'opt_in_label' => array( 155 239 'title' => __( 'Opt-In Checkbox: Label', 'woocommerce-convertkit' ), 156 240 'type' => 'text', 157 241 'default' => __( 'I want to subscribe to the newsletter', 'woocommerce-convertkit' ), 158 'description' => __( ' Optional (only used if the above field is checked):Customize the label next to the opt-in checkbox.', 'woocommerce-convertkit' ),242 'description' => __( 'Customize the label next to the opt-in checkbox.', 'woocommerce-convertkit' ), 159 243 'desc_tip' => false, 160 244 … … 162 246 'class' => 'enabled subscribe display_opt_in', 163 247 ), 164 'opt_in_status' => array(248 'opt_in_status' => array( 165 249 'title' => __( 'Opt-In Checkbox: Default Status', 'woocommerce-convertkit' ), 166 250 'type' => 'select', … … 176 260 'class' => 'enabled subscribe display_opt_in', 177 261 ), 178 'opt_in_location' => array(262 'opt_in_location' => array( 179 263 'title' => __( 'Opt-In Checkbox: Display Location', 'woocommerce-convertkit' ), 180 264 'type' => 'select', 181 265 'default' => 'billing', 182 'description' => __( 'Where to display the opt-in checkbox on the checkout page (under Billing Info or Order Info).', 'woocommerce-convertkit' ),266 'description' => __( 'Where to display the opt-in checkbox on the checkout page (under "Billing details" or "Additional information").', 'woocommerce-convertkit' ), 183 267 'desc_tip' => false, 184 268 'options' => array( … … 192 276 193 277 // Purchase Data. 194 'send_purchases' => array(278 'send_purchases' => array( 195 279 'title' => __( 'Purchase Data', 'woocommerce-convertkit' ), 196 280 'label' => __( 'Send purchase data to ConvertKit.', 'woocommerce-convertkit' ), … … 209 293 210 294 // Debugging. 211 'debug' => array(295 'debug' => array( 212 296 'title' => __( 'Debug', 'woocommerce-convertkit' ), 213 297 'type' => 'checkbox', 214 298 'label' => __( 'Write data to a log file', 'woocommerce-convertkit' ), 215 299 'description' => sprintf( 216 /* translators: %1$s: URL to Log File, %2$s: View Log File text */300 /* translators: %1$s: URL to Log File, %2$s: View log file text */ 217 301 '<a href="%1$s" target="_blank">%2$s</a>', 218 302 admin_url( 'admin.php?page=wc-status&tab=logs' ), 219 __( 'View Log File', 'woocommerce-convertkit' )303 __( 'View log file', 'woocommerce-convertkit' ) 220 304 ), 221 305 'default' => 'no', … … 235 319 public function enqueue_scripts() { 236 320 237 // Bail if we cannot determine if we are viewing the Integration Settings screen.238 if ( ! function_exists( 'get_current_screen' ) ) {239 return;240 }241 242 // Get screen.243 $screen = get_current_screen();244 245 321 // Bail if we're not on the Integration Settings screen. 246 if ( $screen->id !== 'woocommerce_page_wc-settings') {322 if ( ! $this->is_integration_settings_screen() ) { 247 323 return; 248 324 } … … 250 326 // Enqueue JS. 251 327 wp_enqueue_script( 'ckwc-integration', CKWC_PLUGIN_URL . 'resources/backend/js/integration.js', array( 'jquery' ), CKWC_PLUGIN_VERSION, true ); 328 329 // Enqueue Select2 JS. 330 ckwc_select2_enqueue_scripts(); 331 332 } 333 334 /** 335 * Enqueue CSS for the Integration Settings screen. 336 * 337 * @since 1.4.3 338 */ 339 public function enqueue_styles() { 340 341 // Bail if we're not on the Integration Settings screen. 342 if ( ! $this->is_integration_settings_screen() ) { 343 return; 344 } 345 346 // Enqueue Select2 CSS. 347 ckwc_select2_enqueue_styles(); 252 348 253 349 } … … 282 378 if ( ! $this->is_enabled() ) { 283 379 ob_start(); 284 require _onceCKWC_PLUGIN_PATH . '/views/backend/settings/subscription-disabled.php';380 require CKWC_PLUGIN_PATH . '/views/backend/settings/subscription-disabled.php'; 285 381 return ob_get_clean(); 286 382 } 287 383 288 // Get Forms, Tags and Sequences, refreshing them to fetch the latest data from the API. 289 $forms = new CKWC_Resource_Forms(); 290 $forms->refresh(); 291 $sequences = new CKWC_Resource_Sequences(); 292 $sequences->refresh(); 293 $tags = new CKWC_Resource_Tags(); 294 $tags->refresh(); 384 // Get Forms, Tags and Sequences, refreshing them to fetch the latest data from the API, 385 // if we haven't already fetched them. 386 if ( ! $this->forms ) { 387 $this->forms = new CKWC_Resource_Forms(); 388 $this->forms->refresh(); 389 } 390 if ( ! $this->sequences ) { 391 $this->sequences = new CKWC_Resource_Sequences(); 392 $this->sequences->refresh(); 393 } 394 if ( ! $this->tags ) { 395 $this->tags = new CKWC_Resource_Tags(); 396 $this->tags->refresh(); 397 } 295 398 296 399 // Get current subscription setting and other settings to render the subscription dropdown field. 297 400 $subscription = array( 298 401 'id' => 'woocommerce_ckwc_subscription', 299 'class' => 'select ' . $data['class'],402 'class' => 'select ckwc-select2 ' . $data['class'], 300 403 'name' => $field, 301 404 'value' => $this->get_option( $key ), 302 'forms' => $ forms,303 'tags' => $t ags,304 'sequences' => $ sequences,405 'forms' => $this->forms, 406 'tags' => $this->tags, 407 'sequences' => $this->sequences, 305 408 ); 306 409 307 410 ob_start(); 308 require_once CKWC_PLUGIN_PATH . '/views/backend/settings/subscription.php'; 411 require CKWC_PLUGIN_PATH . '/views/backend/settings/subscription.php'; 412 return ob_get_clean(); 413 414 } 415 416 /** 417 * Output HTML for a Custom Field dropdown. 418 * 419 * Used when init_form_fields() field type is set to custom_field i.e. used 420 * for Phone, Billing Address and Shipping Address to Custom Field mapping settings. 421 * 422 * @since 1.4.3 423 * 424 * @param string $key Setting Field Key. 425 * @param array $data Setting Field Configuration. 426 */ 427 public function generate_custom_field_html( $key, $data ) { 428 429 $field = $this->get_field_key( $key ); 430 $defaults = array( 431 'title' => '', 432 'disabled' => false, 433 'class' => '', 434 'css' => '', 435 'placeholder' => '', 436 'type' => 'text', 437 'desc_tip' => false, 438 'description' => '', 439 'custom_attributes' => array(), 440 'options' => array(), 441 ); 442 443 $data = wp_parse_args( $data, $defaults ); 444 445 // If the integration isn't enabled, don't output a selection field. 446 if ( ! $this->is_enabled() ) { 447 ob_start(); 448 include CKWC_PLUGIN_PATH . '/views/backend/settings/custom-field-disabled.php'; 449 return ob_get_clean(); 450 } 451 452 // Get Custom Fields, refreshing them to fetch the latest data from the API, 453 // if we haven't already fetched them. 454 if ( ! $this->custom_fields ) { 455 $this->custom_fields = new CKWC_Resource_Custom_Fields(); 456 $this->custom_fields->refresh(); 457 } 458 459 // Get current custom field setting and other settings to render the custom field dropdown field. 460 $custom_field = array( 461 'id' => $field, 462 'class' => 'select ' . $data['class'], 463 'name' => $field, 464 'value' => $this->get_option( $key ), 465 'custom_fields' => $this->custom_fields, 466 ); 467 468 ob_start(); 469 include CKWC_PLUGIN_PATH . '/views/backend/settings/custom-field.php'; 309 470 return ob_get_clean(); 310 471 … … 421 582 422 583 /** 584 * Checks if the request is for this integration's settings screen. 585 * 586 * @since 1.4.3 587 * 588 * @return bool 589 */ 590 private function is_integration_settings_screen() { 591 592 // Return false if we cannot reliably determine the current screen that is viewed, 593 // due to WordPress' get_current_screen() function being unavailable. 594 if ( ! function_exists( 'get_current_screen' ) ) { 595 return false; 596 } 597 598 // Get screen. 599 $screen = get_current_screen(); 600 601 // Return false if we're not on the Integration Settings screen. 602 if ( $screen->id !== 'woocommerce_page_wc-settings' ) { 603 return false; 604 } 605 606 return true; 607 608 } 609 610 /** 423 611 * Deletes all cached Forms, Tags and Sequences from the options table. 424 612 * … … 436 624 $sequences->delete(); 437 625 626 $custom_fields = new CKWC_Resource_Custom_Fields(); 627 $custom_fields->delete(); 628 438 629 } 439 630 -
convertkit-for-woocommerce/tags/1.4.3/includes/class-ckwc-order.php
r2668107 r2678577 51 51 } 52 52 53 // Subscribe customer's email address to a form or tag.53 // Subscribe customer's email address to a form, tag or sequence. 54 54 add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'maybe_subscribe_customer' ), 99999, 1 ); 55 55 add_action( 'woocommerce_order_status_changed', array( $this, 'maybe_subscribe_customer' ), 99999, 3 ); … … 97 97 return; 98 98 } 99 100 // If configured in the Integration, map Phone, Billing and/or Shipping Addresses to ConvertKit 101 // Custom Fields now. 102 $fields = $this->custom_field_data( $order ); 99 103 100 104 // Build an array of Forms, Tags and Sequences to subscribe the Customer to, based on … … 156 160 $this->email( $order ), 157 161 $this->name( $order ), 158 $order_id 162 $order_id, 163 $fields 159 164 ); 160 165 } 166 167 // The customer was subscribed to ConvertKit, so request a Plugin review. 168 // This can safely be called multiple times, as the review request 169 // class will ensure once a review request is dismissed by the user, 170 // it is never displayed again. 171 WP_CKWC()->get_class( 'review_request' )->request_review(); 161 172 162 173 } … … 173 184 * @param string $name Customer Name. 174 185 * @param int $order_id WooCommerce Order ID. 186 * @param mixed $custom_fields Custom Fields (false | array). 175 187 * @return mixed WP_Error | array 176 188 */ 177 public function subscribe_customer( $resource_type, $resource_id, $email, $name, $order_id ) {189 public function subscribe_customer( $resource_type, $resource_id, $email, $name, $order_id, $custom_fields ) { 178 190 179 191 // Call API to subscribe the email address to the given Form, Tag or Sequence. 180 192 switch ( $resource_type ) { 181 193 case 'form': 182 $result = $this->api->form_subscribe( $resource_id, $email, $name );194 $result = $this->api->form_subscribe( $resource_id, $email, $name, $custom_fields ); 183 195 break; 184 196 185 197 case 'tag': 186 $result = $this->api->tag_subscribe( $resource_id, $email );198 $result = $this->api->tag_subscribe( $resource_id, $email, $custom_fields ); 187 199 break; 188 200 189 201 case 'sequence': 190 202 case 'course': 191 $result = $this->api->sequence_subscribe( $resource_id, $email );203 $result = $this->api->sequence_subscribe( $resource_id, $email, $custom_fields ); 192 204 break; 193 205 } … … 373 385 $order->add_order_note( __( '[ConvertKit] Purchase Data sent successfully', 'woocommerce-convertkit' ) ); 374 386 387 // The customer's purchase data was sent to ConvertKit, so request a Plugin review. 388 // This can safely be called multiple times, as the review request 389 // class will ensure once a review request is dismissed by the user, 390 // it is never displayed again. 391 WP_CKWC()->get_class( 'review_request' )->request_review(); 392 375 393 // Return. 376 394 return $response; … … 455 473 * Returns the customer's email address for the given WooCommerce Order, 456 474 * immediately before it is sent to ConvertKit when subscribing the Customer 457 * to a Form or Tag.475 * to a Form, Tag or Sequence. 458 476 * 459 477 * @since 1.0.0 … … 470 488 * Returns the customer's email address for the given WooCommerce Order, 471 489 * immediately before it is sent to ConvertKit when subscribing the Customer 472 * to a Form or Tag.490 * to a Form, Tag or Sequence. 473 491 * 474 492 * @since 1.0.0 … … 574 592 * Returns the customer's last name for the given WooCommerce Order, 575 593 * immediately before it is sent to ConvertKit when subscribing the Customer 576 * to a Form or Tag.594 * to a Form, Tag or Sequence. 577 595 * 578 596 * @since 1.0.0 … … 589 607 * Returns the customer's last name for the given WooCommerce Order, 590 608 * immediately before it is sent to ConvertKit when subscribing the Customer 591 * to a Form or Tag.609 * to a Form, Tag or Sequence. 592 610 * 593 611 * @since 1.0.0 … … 603 621 } 604 622 623 /** 624 * Returns an array of ConvertKit Custom Field Key/Value pairs, with values 625 * comprising of Order data based, to be sent to ConvertKit when an Order's 626 * Customer is subscribed via a Form, Tag or Sequence. 627 * 628 * Returns false if no Order data should be stored in ConvertKit Custom Fields. 629 * 630 * @since 1.4.3 631 * 632 * @param WC_Order|WC_Order_Refund $order Order. 633 * @return mixed array | false 634 */ 635 private function custom_field_data( $order ) { 636 637 $fields = array(); 638 639 if ( $this->integration->get_option( 'custom_field_phone' ) ) { 640 $fields[ $this->integration->get_option( 'custom_field_phone' ) ] = $order->get_billing_phone(); 641 } 642 if ( $this->integration->get_option( 'custom_field_billing_address' ) ) { 643 $fields[ $this->integration->get_option( 'custom_field_billing_address' ) ] = str_replace( '<br/>', ', ', $order->get_formatted_billing_address() ); 644 } 645 if ( $this->integration->get_option( 'custom_field_shipping_address' ) ) { 646 $fields[ $this->integration->get_option( 'custom_field_shipping_address' ) ] = str_replace( '<br/>', ', ', $order->get_formatted_shipping_address() ); 647 } 648 if ( $this->integration->get_option( 'custom_field_payment_method' ) ) { 649 $fields[ $this->integration->get_option( 'custom_field_payment_method' ) ] = $order->get_payment_method(); 650 } 651 if ( $this->integration->get_option( 'custom_field_customer_note' ) ) { 652 $fields[ $this->integration->get_option( 'custom_field_customer_note' ) ] = $order->get_customer_note(); 653 } 654 655 /** 656 * Returns an array of ConvertKit Custom Field Key/Value pairs, with values 657 * comprising of Order data based, to be sent to ConvertKit when an Order's 658 * Customer is subscribed via a Form, Tag or Sequence. 659 * 660 * Returns false if no Order data should be stored in ConvertKit Custom Fields. 661 * 662 * @since 1.4.3 663 * 664 * @param mixed $fields Custom Field Key/Value pairs (false | array). 665 * @param WC_Order|WC_Order_Refund $order WooCommerce Order. 666 */ 667 $fields = apply_filters( 'convertkit_for_woocommerce_custom_field_data', $fields, $order ); 668 669 // If the fields array is empty, no Custom Field mappings exist. 670 if ( ! count( $fields ) ) { 671 return false; 672 } 673 674 return $fields; 675 676 } 677 605 678 } -
convertkit-for-woocommerce/tags/1.4.3/includes/class-ckwc-resource.php
r2668107 r2678577 125 125 $results = $api->get_tags(); 126 126 break; 127 128 case 'custom_fields': 129 $results = $api->get_custom_fields(); 130 break; 127 131 } 128 132 -
convertkit-for-woocommerce/tags/1.4.3/includes/class-wp-ckwc.php
r2668107 r2678577 143 143 private function initialize_global() { 144 144 145 $this->classes['order'] = new CKWC_Order(); 145 $this->classes['order'] = new CKWC_Order(); 146 $this->classes['review_request'] = new CKWC_Review_Request( 'ConvertKit for WooCommerce', 'convertkit-for-woocommerce' ); 146 147 147 148 /** -
convertkit-for-woocommerce/tags/1.4.3/includes/functions.php
r2668107 r2678577 68 68 69 69 } 70 71 /** 72 * Helper method to enqueue Select2 scripts for use within the ConvertKit Plugin. 73 * 74 * @since 1.4.3 75 */ 76 function ckwc_select2_enqueue_scripts() { 77 78 wp_enqueue_script( 'ckwc-select2', 'https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js', array( 'jquery' ), CKWC_PLUGIN_VERSION, false ); 79 wp_enqueue_script( 'ckwc-admin-select2', CKWC_PLUGIN_URL . '/resources/backend/js/select2.js', array( 'ckwc-select2' ), CKWC_PLUGIN_VERSION, false ); 80 81 } 82 83 /** 84 * Helper method to enqueue Select2 stylesheets for use within the ConvertKit Plugin. 85 * 86 * @since 1.4.3 87 */ 88 function ckwc_select2_enqueue_styles() { 89 90 wp_enqueue_style( 'ckwc-select2', 'https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css', false, CKWC_PLUGIN_VERSION ); 91 wp_enqueue_style( 'ckwc-admin-select2', CKWC_PLUGIN_URL . '/resources/backend/css/select2.css', false, CKWC_PLUGIN_VERSION ); 92 93 } -
convertkit-for-woocommerce/tags/1.4.3/languages/woocommerce-convertkit.pot
r2668107 r2678577 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: ConvertKit for WooCommerce 1.4. 2\n"5 "Project-Id-Version: ConvertKit for WooCommerce 1.4.3\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/convertkit-woocommerce\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2022-0 1-27T19:06:35+00:00\n"12 "POT-Creation-Date: 2022-02-14T13:41:17+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.5.0\n" … … 29 29 30 30 #. Author of the plugin 31 #: includes/class-ckwc-integration.php: 2731 #: includes/class-ckwc-integration.php:63 32 32 msgid "ConvertKit" 33 33 msgstr "" … … 37 37 msgstr "" 38 38 39 #: admin/class-ckwc-admin-product.php: 5039 #: admin/class-ckwc-admin-product.php:89 40 40 msgid "ConvertKit Integration" 41 41 msgstr "" … … 80 80 msgstr "" 81 81 82 #: includes/class-ckwc-integration.php: 2882 #: includes/class-ckwc-integration.php:64 83 83 msgid "Enter your ConvertKit settings below to control how WooCommerce integrates with your ConvertKit account." 84 84 msgstr "" 85 85 86 #: includes/class-ckwc-integration.php: 5586 #: includes/class-ckwc-integration.php:92 87 87 msgid "Enable/Disable" 88 88 msgstr "" 89 89 90 #: includes/class-ckwc-integration.php: 5790 #: includes/class-ckwc-integration.php:94 91 91 msgid "Enable ConvertKit integration" 92 92 msgstr "" 93 93 94 #: includes/class-ckwc-integration.php: 6394 #: includes/class-ckwc-integration.php:100 95 95 msgid "API Key" 96 96 msgstr "" 97 97 98 98 #. translators: %1$s: Link to ConvertKit Account, %2$s: <br>, %3$s Link to ConvertKit Signup 99 #: includes/class-ckwc-integration.php: 69100 #: includes/class-ckwc-integration.php: 8699 #: includes/class-ckwc-integration.php:106 100 #: includes/class-ckwc-integration.php:123 101 101 msgid "%1$s Required for proper plugin function. %2$s Don't have a ConvertKit account? %3$s" 102 102 msgstr "" 103 103 104 #: includes/class-ckwc-integration.php: 70104 #: includes/class-ckwc-integration.php:107 105 105 msgid "Get your ConvertKit API Key." 106 106 msgstr "" 107 107 108 #: includes/class-ckwc-integration.php: 72109 #: includes/class-ckwc-integration.php: 89108 #: includes/class-ckwc-integration.php:109 109 #: includes/class-ckwc-integration.php:126 110 110 msgid "Sign up here." 111 111 msgstr "" 112 112 113 #: includes/class-ckwc-integration.php: 80113 #: includes/class-ckwc-integration.php:117 114 114 msgid "API Secret" 115 115 msgstr "" 116 116 117 #: includes/class-ckwc-integration.php: 87117 #: includes/class-ckwc-integration.php:124 118 118 msgid "Get your ConvertKit API Secret." 119 119 msgstr "" 120 120 121 #: includes/class-ckwc-integration.php: 99121 #: includes/class-ckwc-integration.php:136 122 122 msgid "Subscribe Event" 123 123 msgstr "" 124 124 125 #: includes/class-ckwc-integration.php:1 02125 #: includes/class-ckwc-integration.php:139 126 126 msgid "When should customers be subscribed?" 127 127 msgstr "" 128 128 129 #: includes/class-ckwc-integration.php:1 05129 #: includes/class-ckwc-integration.php:142 130 130 msgid "Order Created" 131 131 msgstr "" 132 132 133 #: includes/class-ckwc-integration.php:1 06133 #: includes/class-ckwc-integration.php:143 134 134 msgid "Order Processing" 135 135 msgstr "" 136 136 137 #: includes/class-ckwc-integration.php:1 07137 #: includes/class-ckwc-integration.php:144 138 138 msgid "Order Completed" 139 139 msgstr "" 140 140 141 #: includes/class-ckwc-integration.php:1 14141 #: includes/class-ckwc-integration.php:151 142 142 msgid "Subscription" 143 143 msgstr "" 144 144 145 #: includes/class-ckwc-integration.php:1 17146 msgid "The ConvertKit Form, Tag or Sequence to subscribe Customers to."147 msgstr "" 148 149 #: includes/class-ckwc-integration.php:1 23145 #: includes/class-ckwc-integration.php:154 146 msgid "The ConvertKit form, tag or sequence to subscribe customers to." 147 msgstr "" 148 149 #: includes/class-ckwc-integration.php:160 150 150 msgid "Name Format" 151 151 msgstr "" 152 152 153 #: includes/class-ckwc-integration.php:1 26153 #: includes/class-ckwc-integration.php:163 154 154 msgid "How should the customer name be sent to ConvertKit?" 155 155 msgstr "" 156 156 157 #: includes/class-ckwc-integration.php:1 29157 #: includes/class-ckwc-integration.php:166 158 158 msgid "Billing First Name" 159 159 msgstr "" 160 160 161 #: includes/class-ckwc-integration.php:1 30161 #: includes/class-ckwc-integration.php:167 162 162 msgid "Billing Last Name" 163 163 msgstr "" 164 164 165 #: includes/class-ckwc-integration.php:1 31165 #: includes/class-ckwc-integration.php:168 166 166 msgid "Billing First Name + Billing Last Name" 167 167 msgstr "" 168 168 169 #: includes/class-ckwc-integration.php:140 169 #: includes/class-ckwc-integration.php:177 170 msgid "Send Phone Number" 171 msgstr "" 172 173 #: includes/class-ckwc-integration.php:180 174 msgid "The ConvertKit custom field to store the order's phone number." 175 msgstr "" 176 177 #: includes/class-ckwc-integration.php:186 178 msgid "Send Billing Address" 179 msgstr "" 180 181 #: includes/class-ckwc-integration.php:189 182 msgid "The ConvertKit custom field to store the order's billing address." 183 msgstr "" 184 185 #: includes/class-ckwc-integration.php:195 186 msgid "Send Shipping Address" 187 msgstr "" 188 189 #: includes/class-ckwc-integration.php:198 190 msgid "The ConvertKit custom field to store the order's shipping address." 191 msgstr "" 192 193 #: includes/class-ckwc-integration.php:204 194 msgid "Send Payment Method" 195 msgstr "" 196 197 #: includes/class-ckwc-integration.php:207 198 msgid "The ConvertKit custom field to store the order's payment method." 199 msgstr "" 200 201 #: includes/class-ckwc-integration.php:213 202 msgid "Send Customer Note" 203 msgstr "" 204 205 #: includes/class-ckwc-integration.php:216 206 msgid "The ConvertKit custom field to store the order's customer note." 207 msgstr "" 208 209 #: includes/class-ckwc-integration.php:224 170 210 msgid "Opt-In Checkbox" 171 211 msgstr "" 172 212 173 #: includes/class-ckwc-integration.php: 141174 msgid "Display an Opt-In checkbox on checkout"175 msgstr "" 176 177 #: includes/class-ckwc-integration.php: 144213 #: includes/class-ckwc-integration.php:225 214 msgid "Display an opt-in checkbox on checkout" 215 msgstr "" 216 217 #: includes/class-ckwc-integration.php:228 178 218 msgid "" 179 "If enabled, customers will <strong>only</strong> be subscribed to the chosen Forms, Tags and Sequences if they check the \"Opt-In\"checkbox at checkout.<br />\n"180 "\t\t\t\t\t\t\t\t\t If disabled, customers will <strong>always</strong> be subscribed to the chosen Forms, Tags and Sequences at checkout."181 msgstr "" 182 183 #: includes/class-ckwc-integration.php: 155219 "If enabled, customers will <strong>only</strong> be subscribed to the chosen forms, tags and sequences if they check the opt-in checkbox at checkout.<br />\n" 220 "\t\t\t\t\t\t\t\t\t If disabled, customers will <strong>always</strong> be subscribed to the chosen forms, tags and sequences at checkout." 221 msgstr "" 222 223 #: includes/class-ckwc-integration.php:239 184 224 msgid "Opt-In Checkbox: Label" 185 225 msgstr "" 186 226 187 #: includes/class-ckwc-integration.php: 157227 #: includes/class-ckwc-integration.php:241 188 228 msgid "I want to subscribe to the newsletter" 189 229 msgstr "" 190 230 191 #: includes/class-ckwc-integration.php: 158192 msgid " Optional (only used if the above field is checked):Customize the label next to the opt-in checkbox."193 msgstr "" 194 195 #: includes/class-ckwc-integration.php: 165231 #: includes/class-ckwc-integration.php:242 232 msgid "Customize the label next to the opt-in checkbox." 233 msgstr "" 234 235 #: includes/class-ckwc-integration.php:249 196 236 msgid "Opt-In Checkbox: Default Status" 197 237 msgstr "" 198 238 199 #: includes/class-ckwc-integration.php: 168239 #: includes/class-ckwc-integration.php:252 200 240 msgid "The default state of the opt-in checkbox." 201 241 msgstr "" 202 242 203 #: includes/class-ckwc-integration.php: 171243 #: includes/class-ckwc-integration.php:255 204 244 msgid "Checked" 205 245 msgstr "" 206 246 207 #: includes/class-ckwc-integration.php: 172247 #: includes/class-ckwc-integration.php:256 208 248 msgid "Unchecked" 209 249 msgstr "" 210 250 211 #: includes/class-ckwc-integration.php: 179251 #: includes/class-ckwc-integration.php:263 212 252 msgid "Opt-In Checkbox: Display Location" 213 253 msgstr "" 214 254 215 #: includes/class-ckwc-integration.php: 182216 msgid "Where to display the opt-in checkbox on the checkout page (under Billing Info or Order Info)."217 msgstr "" 218 219 #: includes/class-ckwc-integration.php: 185255 #: includes/class-ckwc-integration.php:266 256 msgid "Where to display the opt-in checkbox on the checkout page (under \"Billing details\" or \"Additional information\")." 257 msgstr "" 258 259 #: includes/class-ckwc-integration.php:269 220 260 msgid "Billing" 221 261 msgstr "" 222 262 223 #: includes/class-ckwc-integration.php: 186263 #: includes/class-ckwc-integration.php:270 224 264 msgid "Order" 225 265 msgstr "" 226 266 227 #: includes/class-ckwc-integration.php: 195267 #: includes/class-ckwc-integration.php:279 228 268 msgid "Purchase Data" 229 269 msgstr "" 230 270 231 #: includes/class-ckwc-integration.php: 196271 #: includes/class-ckwc-integration.php:280 232 272 msgid "Send purchase data to ConvertKit." 233 273 msgstr "" 234 274 235 #: includes/class-ckwc-integration.php: 199275 #: includes/class-ckwc-integration.php:283 236 276 msgid "" 237 277 "If enabled, the customer's order data will be sent to ConvertKit. Their email address will always be subscribed to ConvertKit, <strong>regardless of the Customer's opt in status.</strong><br />\n" … … 239 279 msgstr "" 240 280 241 #: includes/class-ckwc-integration.php:2 12281 #: includes/class-ckwc-integration.php:296 242 282 msgid "Debug" 243 283 msgstr "" 244 284 245 #: includes/class-ckwc-integration.php:2 14285 #: includes/class-ckwc-integration.php:298 246 286 msgid "Write data to a log file" 247 287 msgstr "" 248 288 249 #: includes/class-ckwc-integration.php: 219250 msgid "View Log File"251 msgstr "" 252 253 #: includes/class-ckwc-integration.php: 349289 #: includes/class-ckwc-integration.php:303 290 msgid "View log file" 291 msgstr "" 292 293 #: includes/class-ckwc-integration.php:510 254 294 msgid "Please provide your ConvertKit API Key." 255 295 msgstr "" 256 296 257 #: includes/class-ckwc-integration.php: 364297 #: includes/class-ckwc-integration.php:525 258 298 msgid "Your ConvertKit API Key appears to be invalid. Please double check the value." 259 299 msgstr "" 260 300 261 301 #. translators: %1$s: Form Name, %2$s: Form ID 262 #: includes/class-ckwc-order.php:2 21302 #: includes/class-ckwc-order.php:233 263 303 msgid "[ConvertKit] Customer subscribed to the Form: %1$s [%2$s]" 264 304 msgstr "" 265 305 266 306 #. translators: %1$s: Tag Name, %2$s: Tag ID 267 #: includes/class-ckwc-order.php:2 38307 #: includes/class-ckwc-order.php:250 268 308 msgid "[ConvertKit] Customer subscribed to the Tag: %1$s [%2$s]" 269 309 msgstr "" 270 310 271 311 #. translators: %1$s: Sequence Name, %2$s: Sequence ID 272 #: includes/class-ckwc-order.php:2 56312 #: includes/class-ckwc-order.php:268 273 313 msgid "[ConvertKit] Customer subscribed to the Sequence: %1$s [%2$s]" 274 314 msgstr "" 275 315 276 316 #. translators: %1$s: Error Code, %2$s: Error Message 277 #: includes/class-ckwc-order.php:3 60317 #: includes/class-ckwc-order.php:372 278 318 msgid "[ConvertKit] Send Purchase Data Error: %1$s %2$s" 279 319 msgstr "" 280 320 281 #: includes/class-ckwc-order.php:3 73321 #: includes/class-ckwc-order.php:385 282 322 msgid "[ConvertKit] Purchase Data sent successfully" 283 323 msgstr "" 284 324 285 325 #. translators: %1$s: PHP class name 286 #: includes/class-wp-ckwc.php:18 5326 #: includes/class-wp-ckwc.php:186 287 327 msgid "ConvertKit for WooCommerce Error: Could not load Plugin class <strong>%1$s</strong>" 288 328 msgstr "" 289 329 290 #: includes/class-wp-ckwc.php:19 5330 #: includes/class-wp-ckwc.php:196 291 331 msgid "ConvertKit for WooCommerce Error" 332 msgstr "" 333 334 #: views/backend/custom-field-dropdown-field.php:13 335 msgid "(Don't send or map)" 292 336 msgstr "" 293 337 294 338 #. translators: %1$s: Post Type Singular Name, %2$s: Link to Integration Settings 295 339 #: views/backend/product/disabled.php:15 296 msgid "To configure the ConvertKit Form, Tag or Sequence to subscribe Customers to who purchase this %1$s, %2$s and enter a valid API Key andSecret."340 msgid "To configure the ConvertKit form, tag or sequence to subscribe customers to who purchase this %1$s, %2$s and enter a valid API Key and API Secret." 297 341 msgstr "" 298 342 … … 302 346 303 347 #: views/backend/product/meta-box.php:14 304 msgid "The ConvertKit Form, Tag or Sequence to subscribe Customers to who purchase this Product." 305 msgstr "" 306 307 #: views/backend/settings/subscription-disabled.php:17 348 msgid "The ConvertKit form, tag or sequence to subscribe customers to who purchase this product." 349 msgstr "" 350 351 #. translators: Plugin Name 352 #: views/backend/review/notice.php:17 353 msgid "We'd be super grateful if you could spread the word about %s and give it a 5 star rating on WordPress?" 354 msgstr "" 355 356 #: views/backend/review/notice.php:25 357 msgid "Yes, leave review" 358 msgstr "" 359 360 #. translators: Plugin Name 361 #: views/backend/review/notice.php:32 362 msgid "No, I'm having issues with %s" 363 msgstr "" 364 365 #: views/backend/settings/custom-field-disabled.php:18 366 msgid "To select the custom field to map this order value to, specify a valid API Key, API Secret, and click Save changes." 367 msgstr "" 368 369 #: views/backend/settings/subscription-disabled.php:18 308 370 msgid "To select the Form, Tag or Sequence to subscribe Customers to, specify a valid API Key and Secret, and click Save changes." 309 371 msgstr "" -
convertkit-for-woocommerce/tags/1.4.3/readme.txt
r2668107 r2678577 46 46 47 47 == Changelog == 48 49 ### 1.4.3 2022-02-14 50 * Added: Settings: Options to Map WooCommerce Order Data (Phone, Billing Address etc) to ConvertKit Custom Fields 51 * Added: Select2 dropdown for Forms, Tags and Sequence selection with search functionality for improved UX. 48 52 49 53 ### 1.4.2 2022-01-28 -
convertkit-for-woocommerce/tags/1.4.3/resources/backend/js/integration.js
r2668107 r2678577 78 78 } 79 79 80 // Hide this row if the input or selectelement within the row has the CSS class of the setting name.81 if ( $( 'input, select ', $( this ) ).hasClass( setting ) ) {80 // Hide this row if the input, select, link or span element within the row has the CSS class of the setting name. 81 if ( $( 'input, select, a, span', $( this ) ).hasClass( setting ) ) { 82 82 $( this ).hide(); 83 83 } -
convertkit-for-woocommerce/tags/1.4.3/views/backend/product/disabled.php
r2668107 r2678577 13 13 echo sprintf( 14 14 /* translators: %1$s: Post Type Singular Name, %2$s: Link to Integration Settings */ 15 esc_html__( 'To configure the ConvertKit Form, Tag or Sequence to subscribe Customers to who purchase this %1$s, %2$s and enter a valid API Key andSecret.', 'woocommerce-convertkit' ),15 esc_html__( 'To configure the ConvertKit form, tag or sequence to subscribe customers to who purchase this %1$s, %2$s and enter a valid API Key and API Secret.', 'woocommerce-convertkit' ), 16 16 esc_attr( $post_type->labels->singular_name ), 17 17 '<a href="' . esc_attr( admin_url( 'admin.php?page=wc-settings&tab=integration§ion=ckwc' ) ) . '">' . esc_html__( 'enable the ConvertKit WooCommerce integration', 'woocommerce-convertkit' ) . '</a>' -
convertkit-for-woocommerce/tags/1.4.3/views/backend/product/meta-box.php
r2668107 r2678577 12 12 13 13 <p class="description"> 14 <?php esc_html_e( 'The ConvertKit Form, Tag or Sequence to subscribe Customers to who purchase this Product.', 'woocommerce-convertkit' ); ?>14 <?php esc_html_e( 'The ConvertKit form, tag or sequence to subscribe customers to who purchase this product.', 'woocommerce-convertkit' ); ?> 15 15 </p> 16 16 -
convertkit-for-woocommerce/tags/1.4.3/views/backend/settings/subscription-disabled.php
r2668107 r2678577 15 15 </th> 16 16 <td class="forminp"> 17 <?php esc_html_e( 'To select the Form, Tag or Sequence to subscribe Customers to, specify a valid API Key and Secret, and click Save changes.', 'woocommerce-convertkit' ); ?> 17 <span class="<?php echo esc_attr( $data['class'] ); ?>"> 18 <?php esc_html_e( 'To select the Form, Tag or Sequence to subscribe Customers to, specify a valid API Key and Secret, and click Save changes.', 'woocommerce-convertkit' ); ?> 19 </span> 18 20 </td> 19 21 </tr> -
convertkit-for-woocommerce/tags/1.4.3/woocommerce-convertkit.php
r2668107 r2678577 10 10 * Plugin URI: https://www.convertkit.com 11 11 * Description: Integrates WooCommerce with ConvertKit, allowing customers to be automatically sent to your ConvertKit account. 12 * Version: 1.4. 212 * Version: 1.4.3 13 13 * Author: ConvertKit 14 14 * Author URI: https://www.convertkit.com … … 16 16 * 17 17 * WC requires at least: 3.0 18 * WC tested up to: 6. 118 * WC tested up to: 6.2 19 19 */ 20 20 … … 28 28 define( 'CKWC_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 29 29 define( 'CKWC_PLUGIN_PATH', __DIR__ ); 30 define( 'CKWC_PLUGIN_VERSION', '1.4. 2' );30 define( 'CKWC_PLUGIN_VERSION', '1.4.3' ); 31 31 32 32 // Load files that are always used. … … 37 37 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-order.php'; 38 38 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-resource.php'; 39 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-resource-custom-fields.php'; 39 40 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-resource-forms.php'; 40 41 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-resource-sequences.php'; 41 42 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-resource-tags.php'; 43 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-review-request.php'; 42 44 43 45 // Load files that are only used in the WordPress Administration interface. -
convertkit-for-woocommerce/trunk/admin/class-ckwc-admin-product.php
r2668107 r2678577 35 35 $this->integration = WP_CKWC_Integration(); 36 36 37 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 38 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) ); 37 39 add_action( 'add_meta_boxes_product', array( $this, 'add_meta_boxes' ) ); 38 40 add_action( 'save_post_product', array( $this, 'save_product' ) ); 41 42 } 43 44 /** 45 * Enqueue Javascript for the WooCommerce Add / Edit Product screen. 46 * 47 * @since 1.4.3 48 */ 49 public function enqueue_scripts() { 50 51 // Bail if we're not on the Add / Edit Product screen. 52 if ( ! $this->is_edit_product_screen() ) { 53 return; 54 } 55 56 // Enqueue Select2 JS. 57 ckwc_select2_enqueue_scripts(); 58 59 } 60 61 /** 62 * Enqueue CSS for the WooCommerce Add / Edit Product screen. 63 * 64 * @since 1.4.3 65 */ 66 public function enqueue_styles() { 67 68 // Bail if we're not on the Add / Edit Product screen. 69 if ( ! $this->is_edit_product_screen() ) { 70 return; 71 } 72 73 // Enqueue CSS. 74 wp_enqueue_style( 'ckwc-product', CKWC_PLUGIN_URL . '/resources/backend/css/product.css', false, CKWC_PLUGIN_VERSION ); 75 76 // Enqueue Select2 CSS. 77 ckwc_select2_enqueue_styles(); 39 78 40 79 } … … 77 116 $subscription = array( 78 117 'id' => 'ckwc_subscription', 79 'class' => ' widefat',118 'class' => 'ckwc-select2 widefat', 80 119 'name' => 'ckwc_subscription', 81 120 'value' => get_post_meta( $post->ID, 'ckwc_subscription', true ), … … 127 166 } 128 167 168 /** 169 * Checks if the request is for viewing the WooCommerce Add / Edit Product screen. 170 * 171 * @since 1.4.3 172 * 173 * @return bool 174 */ 175 private function is_edit_product_screen() { 176 177 // Return false if we cannot reliably determine the current screen that is viewed, 178 // due to WordPress' get_current_screen() function being unavailable. 179 if ( ! function_exists( 'get_current_screen' ) ) { 180 return false; 181 } 182 183 // Get screen. 184 $screen = get_current_screen(); 185 186 // Return false if we're not on the Add / Edit Product screen. 187 if ( $screen->id !== 'product' ) { 188 return false; 189 } 190 191 return true; 192 193 } 194 129 195 } -
convertkit-for-woocommerce/trunk/includes/class-ckwc-integration.php
r2668107 r2678577 17 17 18 18 /** 19 * Holds the Form resources instance. 20 * 21 * @since 1.4.3 22 * 23 * @var CKWC_Resource_Forms 24 */ 25 private $forms; 26 27 /** 28 * Holds the Form resources instance. 29 * 30 * @since 1.4.3 31 * 32 * @var CKWC_Resource_Tags 33 */ 34 private $tags; 35 36 /** 37 * Holds the Form resources instance. 38 * 39 * @since 1.4.3 40 * 41 * @var CKWC_Resource_Sequences 42 */ 43 private $sequences; 44 45 /** 46 * Holds the Form resources instance. 47 * 48 * @since 1.4.3 49 * 50 * @var CKWC_Resource_Custom_Fields 51 */ 52 private $custom_fields; 53 54 /** 19 55 * Constructor 20 56 * … … 35 71 if ( is_admin() ) { 36 72 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 73 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) ); 37 74 add_action( "woocommerce_update_options_integration_{$this->id}", array( $this, 'process_admin_options' ) ); 38 75 add_filter( "woocommerce_settings_api_sanitized_fields_{$this->id}", array( $this, 'sanitize_settings' ) ); … … 52 89 $this->form_fields = array( 53 90 // Enable/Disable entire integration. 54 'enabled' => array(91 'enabled' => array( 55 92 'title' => __( 'Enable/Disable', 'woocommerce-convertkit' ), 56 93 'type' => 'checkbox', … … 60 97 61 98 // API Key and Secret. 62 'api_key' => array(99 'api_key' => array( 63 100 'title' => __( 'API Key', 'woocommerce-convertkit' ), 64 101 'type' => 'text', … … 77 114 'class' => 'enabled', 78 115 ), 79 'api_secret' => array(116 'api_secret' => array( 80 117 'title' => __( 'API Secret', 'woocommerce-convertkit' ), 81 118 'type' => 'text', … … 96 133 97 134 // Subscribe. 98 'event' => array(135 'event' => array( 99 136 'title' => __( 'Subscribe Event', 'woocommerce-convertkit' ), 100 137 'type' => 'select', … … 111 148 'class' => 'enabled subscribe', 112 149 ), 113 'subscription' => array(150 'subscription' => array( 114 151 'title' => __( 'Subscription', 'woocommerce-convertkit' ), 115 152 'type' => 'subscription', 116 153 'default' => '', 117 'description' => __( 'The ConvertKit Form, Tag or Sequence to subscribe Customers to.', 'woocommerce-convertkit' ),118 119 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 120 'class' => 'enabled subscribe', 121 ), 122 'name_format' => array(154 'description' => __( 'The ConvertKit form, tag or sequence to subscribe customers to.', 'woocommerce-convertkit' ), 155 156 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 157 'class' => 'enabled subscribe', 158 ), 159 'name_format' => array( 123 160 'title' => __( 'Name Format', 'woocommerce-convertkit' ), 124 161 'type' => 'select', … … 136 173 ), 137 174 175 // Custom Field Mappings. 176 'custom_field_phone' => array( 177 'title' => __( 'Send Phone Number', 'woocommerce-convertkit' ), 178 'type' => 'custom_field', 179 'default' => '', 180 'description' => __( 'The ConvertKit custom field to store the order\'s phone number.', 'woocommerce-convertkit' ), 181 182 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 183 'class' => 'enabled subscribe', 184 ), 185 'custom_field_billing_address' => array( 186 'title' => __( 'Send Billing Address', 'woocommerce-convertkit' ), 187 'type' => 'custom_field', 188 'default' => '', 189 'description' => __( 'The ConvertKit custom field to store the order\'s billing address.', 'woocommerce-convertkit' ), 190 191 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 192 'class' => 'enabled subscribe', 193 ), 194 'custom_field_shipping_address' => array( 195 'title' => __( 'Send Shipping Address', 'woocommerce-convertkit' ), 196 'type' => 'custom_field', 197 'default' => '', 198 'description' => __( 'The ConvertKit custom field to store the order\'s shipping address.', 'woocommerce-convertkit' ), 199 200 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 201 'class' => 'enabled subscribe', 202 ), 203 'custom_field_payment_method' => array( 204 'title' => __( 'Send Payment Method', 'woocommerce-convertkit' ), 205 'type' => 'custom_field', 206 'default' => '', 207 'description' => __( 'The ConvertKit custom field to store the order\'s payment method.', 'woocommerce-convertkit' ), 208 209 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 210 'class' => 'enabled subscribe', 211 ), 212 'custom_field_customer_note' => array( 213 'title' => __( 'Send Customer Note', 'woocommerce-convertkit' ), 214 'type' => 'custom_field', 215 'default' => '', 216 'description' => __( 'The ConvertKit custom field to store the order\'s customer note.', 'woocommerce-convertkit' ), 217 218 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 219 'class' => 'enabled subscribe', 220 ), 221 138 222 // Subscribe: Display Opt In Checkbox Settings. 139 'display_opt_in' => array(223 'display_opt_in' => array( 140 224 'title' => __( 'Opt-In Checkbox', 'woocommerce-convertkit' ), 141 'label' => __( 'Display an Opt-In checkbox on checkout', 'woocommerce-convertkit' ),225 'label' => __( 'Display an opt-in checkbox on checkout', 'woocommerce-convertkit' ), 142 226 'type' => 'checkbox', 143 227 'default' => 'no', 144 228 'description' => __( 145 'If enabled, customers will <strong>only</strong> be subscribed to the chosen Forms, Tags and Sequences if they check the "Opt-In"checkbox at checkout.<br />146 If disabled, customers will <strong>always</strong> be subscribed to the chosen Forms, Tags and Sequences at checkout.',229 'If enabled, customers will <strong>only</strong> be subscribed to the chosen forms, tags and sequences if they check the opt-in checkbox at checkout.<br /> 230 If disabled, customers will <strong>always</strong> be subscribed to the chosen forms, tags and sequences at checkout.', 147 231 'woocommerce-convertkit' 148 232 ), … … 152 236 'class' => 'enabled subscribe', 153 237 ), 154 'opt_in_label' => array(238 'opt_in_label' => array( 155 239 'title' => __( 'Opt-In Checkbox: Label', 'woocommerce-convertkit' ), 156 240 'type' => 'text', 157 241 'default' => __( 'I want to subscribe to the newsletter', 'woocommerce-convertkit' ), 158 'description' => __( ' Optional (only used if the above field is checked):Customize the label next to the opt-in checkbox.', 'woocommerce-convertkit' ),242 'description' => __( 'Customize the label next to the opt-in checkbox.', 'woocommerce-convertkit' ), 159 243 'desc_tip' => false, 160 244 … … 162 246 'class' => 'enabled subscribe display_opt_in', 163 247 ), 164 'opt_in_status' => array(248 'opt_in_status' => array( 165 249 'title' => __( 'Opt-In Checkbox: Default Status', 'woocommerce-convertkit' ), 166 250 'type' => 'select', … … 176 260 'class' => 'enabled subscribe display_opt_in', 177 261 ), 178 'opt_in_location' => array(262 'opt_in_location' => array( 179 263 'title' => __( 'Opt-In Checkbox: Display Location', 'woocommerce-convertkit' ), 180 264 'type' => 'select', 181 265 'default' => 'billing', 182 'description' => __( 'Where to display the opt-in checkbox on the checkout page (under Billing Info or Order Info).', 'woocommerce-convertkit' ),266 'description' => __( 'Where to display the opt-in checkbox on the checkout page (under "Billing details" or "Additional information").', 'woocommerce-convertkit' ), 183 267 'desc_tip' => false, 184 268 'options' => array( … … 192 276 193 277 // Purchase Data. 194 'send_purchases' => array(278 'send_purchases' => array( 195 279 'title' => __( 'Purchase Data', 'woocommerce-convertkit' ), 196 280 'label' => __( 'Send purchase data to ConvertKit.', 'woocommerce-convertkit' ), … … 209 293 210 294 // Debugging. 211 'debug' => array(295 'debug' => array( 212 296 'title' => __( 'Debug', 'woocommerce-convertkit' ), 213 297 'type' => 'checkbox', 214 298 'label' => __( 'Write data to a log file', 'woocommerce-convertkit' ), 215 299 'description' => sprintf( 216 /* translators: %1$s: URL to Log File, %2$s: View Log File text */300 /* translators: %1$s: URL to Log File, %2$s: View log file text */ 217 301 '<a href="%1$s" target="_blank">%2$s</a>', 218 302 admin_url( 'admin.php?page=wc-status&tab=logs' ), 219 __( 'View Log File', 'woocommerce-convertkit' )303 __( 'View log file', 'woocommerce-convertkit' ) 220 304 ), 221 305 'default' => 'no', … … 235 319 public function enqueue_scripts() { 236 320 237 // Bail if we cannot determine if we are viewing the Integration Settings screen.238 if ( ! function_exists( 'get_current_screen' ) ) {239 return;240 }241 242 // Get screen.243 $screen = get_current_screen();244 245 321 // Bail if we're not on the Integration Settings screen. 246 if ( $screen->id !== 'woocommerce_page_wc-settings') {322 if ( ! $this->is_integration_settings_screen() ) { 247 323 return; 248 324 } … … 250 326 // Enqueue JS. 251 327 wp_enqueue_script( 'ckwc-integration', CKWC_PLUGIN_URL . 'resources/backend/js/integration.js', array( 'jquery' ), CKWC_PLUGIN_VERSION, true ); 328 329 // Enqueue Select2 JS. 330 ckwc_select2_enqueue_scripts(); 331 332 } 333 334 /** 335 * Enqueue CSS for the Integration Settings screen. 336 * 337 * @since 1.4.3 338 */ 339 public function enqueue_styles() { 340 341 // Bail if we're not on the Integration Settings screen. 342 if ( ! $this->is_integration_settings_screen() ) { 343 return; 344 } 345 346 // Enqueue Select2 CSS. 347 ckwc_select2_enqueue_styles(); 252 348 253 349 } … … 282 378 if ( ! $this->is_enabled() ) { 283 379 ob_start(); 284 require _onceCKWC_PLUGIN_PATH . '/views/backend/settings/subscription-disabled.php';380 require CKWC_PLUGIN_PATH . '/views/backend/settings/subscription-disabled.php'; 285 381 return ob_get_clean(); 286 382 } 287 383 288 // Get Forms, Tags and Sequences, refreshing them to fetch the latest data from the API. 289 $forms = new CKWC_Resource_Forms(); 290 $forms->refresh(); 291 $sequences = new CKWC_Resource_Sequences(); 292 $sequences->refresh(); 293 $tags = new CKWC_Resource_Tags(); 294 $tags->refresh(); 384 // Get Forms, Tags and Sequences, refreshing them to fetch the latest data from the API, 385 // if we haven't already fetched them. 386 if ( ! $this->forms ) { 387 $this->forms = new CKWC_Resource_Forms(); 388 $this->forms->refresh(); 389 } 390 if ( ! $this->sequences ) { 391 $this->sequences = new CKWC_Resource_Sequences(); 392 $this->sequences->refresh(); 393 } 394 if ( ! $this->tags ) { 395 $this->tags = new CKWC_Resource_Tags(); 396 $this->tags->refresh(); 397 } 295 398 296 399 // Get current subscription setting and other settings to render the subscription dropdown field. 297 400 $subscription = array( 298 401 'id' => 'woocommerce_ckwc_subscription', 299 'class' => 'select ' . $data['class'],402 'class' => 'select ckwc-select2 ' . $data['class'], 300 403 'name' => $field, 301 404 'value' => $this->get_option( $key ), 302 'forms' => $ forms,303 'tags' => $t ags,304 'sequences' => $ sequences,405 'forms' => $this->forms, 406 'tags' => $this->tags, 407 'sequences' => $this->sequences, 305 408 ); 306 409 307 410 ob_start(); 308 require_once CKWC_PLUGIN_PATH . '/views/backend/settings/subscription.php'; 411 require CKWC_PLUGIN_PATH . '/views/backend/settings/subscription.php'; 412 return ob_get_clean(); 413 414 } 415 416 /** 417 * Output HTML for a Custom Field dropdown. 418 * 419 * Used when init_form_fields() field type is set to custom_field i.e. used 420 * for Phone, Billing Address and Shipping Address to Custom Field mapping settings. 421 * 422 * @since 1.4.3 423 * 424 * @param string $key Setting Field Key. 425 * @param array $data Setting Field Configuration. 426 */ 427 public function generate_custom_field_html( $key, $data ) { 428 429 $field = $this->get_field_key( $key ); 430 $defaults = array( 431 'title' => '', 432 'disabled' => false, 433 'class' => '', 434 'css' => '', 435 'placeholder' => '', 436 'type' => 'text', 437 'desc_tip' => false, 438 'description' => '', 439 'custom_attributes' => array(), 440 'options' => array(), 441 ); 442 443 $data = wp_parse_args( $data, $defaults ); 444 445 // If the integration isn't enabled, don't output a selection field. 446 if ( ! $this->is_enabled() ) { 447 ob_start(); 448 include CKWC_PLUGIN_PATH . '/views/backend/settings/custom-field-disabled.php'; 449 return ob_get_clean(); 450 } 451 452 // Get Custom Fields, refreshing them to fetch the latest data from the API, 453 // if we haven't already fetched them. 454 if ( ! $this->custom_fields ) { 455 $this->custom_fields = new CKWC_Resource_Custom_Fields(); 456 $this->custom_fields->refresh(); 457 } 458 459 // Get current custom field setting and other settings to render the custom field dropdown field. 460 $custom_field = array( 461 'id' => $field, 462 'class' => 'select ' . $data['class'], 463 'name' => $field, 464 'value' => $this->get_option( $key ), 465 'custom_fields' => $this->custom_fields, 466 ); 467 468 ob_start(); 469 include CKWC_PLUGIN_PATH . '/views/backend/settings/custom-field.php'; 309 470 return ob_get_clean(); 310 471 … … 421 582 422 583 /** 584 * Checks if the request is for this integration's settings screen. 585 * 586 * @since 1.4.3 587 * 588 * @return bool 589 */ 590 private function is_integration_settings_screen() { 591 592 // Return false if we cannot reliably determine the current screen that is viewed, 593 // due to WordPress' get_current_screen() function being unavailable. 594 if ( ! function_exists( 'get_current_screen' ) ) { 595 return false; 596 } 597 598 // Get screen. 599 $screen = get_current_screen(); 600 601 // Return false if we're not on the Integration Settings screen. 602 if ( $screen->id !== 'woocommerce_page_wc-settings' ) { 603 return false; 604 } 605 606 return true; 607 608 } 609 610 /** 423 611 * Deletes all cached Forms, Tags and Sequences from the options table. 424 612 * … … 436 624 $sequences->delete(); 437 625 626 $custom_fields = new CKWC_Resource_Custom_Fields(); 627 $custom_fields->delete(); 628 438 629 } 439 630 -
convertkit-for-woocommerce/trunk/includes/class-ckwc-order.php
r2668107 r2678577 51 51 } 52 52 53 // Subscribe customer's email address to a form or tag.53 // Subscribe customer's email address to a form, tag or sequence. 54 54 add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'maybe_subscribe_customer' ), 99999, 1 ); 55 55 add_action( 'woocommerce_order_status_changed', array( $this, 'maybe_subscribe_customer' ), 99999, 3 ); … … 97 97 return; 98 98 } 99 100 // If configured in the Integration, map Phone, Billing and/or Shipping Addresses to ConvertKit 101 // Custom Fields now. 102 $fields = $this->custom_field_data( $order ); 99 103 100 104 // Build an array of Forms, Tags and Sequences to subscribe the Customer to, based on … … 156 160 $this->email( $order ), 157 161 $this->name( $order ), 158 $order_id 162 $order_id, 163 $fields 159 164 ); 160 165 } 166 167 // The customer was subscribed to ConvertKit, so request a Plugin review. 168 // This can safely be called multiple times, as the review request 169 // class will ensure once a review request is dismissed by the user, 170 // it is never displayed again. 171 WP_CKWC()->get_class( 'review_request' )->request_review(); 161 172 162 173 } … … 173 184 * @param string $name Customer Name. 174 185 * @param int $order_id WooCommerce Order ID. 186 * @param mixed $custom_fields Custom Fields (false | array). 175 187 * @return mixed WP_Error | array 176 188 */ 177 public function subscribe_customer( $resource_type, $resource_id, $email, $name, $order_id ) {189 public function subscribe_customer( $resource_type, $resource_id, $email, $name, $order_id, $custom_fields ) { 178 190 179 191 // Call API to subscribe the email address to the given Form, Tag or Sequence. 180 192 switch ( $resource_type ) { 181 193 case 'form': 182 $result = $this->api->form_subscribe( $resource_id, $email, $name );194 $result = $this->api->form_subscribe( $resource_id, $email, $name, $custom_fields ); 183 195 break; 184 196 185 197 case 'tag': 186 $result = $this->api->tag_subscribe( $resource_id, $email );198 $result = $this->api->tag_subscribe( $resource_id, $email, $custom_fields ); 187 199 break; 188 200 189 201 case 'sequence': 190 202 case 'course': 191 $result = $this->api->sequence_subscribe( $resource_id, $email );203 $result = $this->api->sequence_subscribe( $resource_id, $email, $custom_fields ); 192 204 break; 193 205 } … … 373 385 $order->add_order_note( __( '[ConvertKit] Purchase Data sent successfully', 'woocommerce-convertkit' ) ); 374 386 387 // The customer's purchase data was sent to ConvertKit, so request a Plugin review. 388 // This can safely be called multiple times, as the review request 389 // class will ensure once a review request is dismissed by the user, 390 // it is never displayed again. 391 WP_CKWC()->get_class( 'review_request' )->request_review(); 392 375 393 // Return. 376 394 return $response; … … 455 473 * Returns the customer's email address for the given WooCommerce Order, 456 474 * immediately before it is sent to ConvertKit when subscribing the Customer 457 * to a Form or Tag.475 * to a Form, Tag or Sequence. 458 476 * 459 477 * @since 1.0.0 … … 470 488 * Returns the customer's email address for the given WooCommerce Order, 471 489 * immediately before it is sent to ConvertKit when subscribing the Customer 472 * to a Form or Tag.490 * to a Form, Tag or Sequence. 473 491 * 474 492 * @since 1.0.0 … … 574 592 * Returns the customer's last name for the given WooCommerce Order, 575 593 * immediately before it is sent to ConvertKit when subscribing the Customer 576 * to a Form or Tag.594 * to a Form, Tag or Sequence. 577 595 * 578 596 * @since 1.0.0 … … 589 607 * Returns the customer's last name for the given WooCommerce Order, 590 608 * immediately before it is sent to ConvertKit when subscribing the Customer 591 * to a Form or Tag.609 * to a Form, Tag or Sequence. 592 610 * 593 611 * @since 1.0.0 … … 603 621 } 604 622 623 /** 624 * Returns an array of ConvertKit Custom Field Key/Value pairs, with values 625 * comprising of Order data based, to be sent to ConvertKit when an Order's 626 * Customer is subscribed via a Form, Tag or Sequence. 627 * 628 * Returns false if no Order data should be stored in ConvertKit Custom Fields. 629 * 630 * @since 1.4.3 631 * 632 * @param WC_Order|WC_Order_Refund $order Order. 633 * @return mixed array | false 634 */ 635 private function custom_field_data( $order ) { 636 637 $fields = array(); 638 639 if ( $this->integration->get_option( 'custom_field_phone' ) ) { 640 $fields[ $this->integration->get_option( 'custom_field_phone' ) ] = $order->get_billing_phone(); 641 } 642 if ( $this->integration->get_option( 'custom_field_billing_address' ) ) { 643 $fields[ $this->integration->get_option( 'custom_field_billing_address' ) ] = str_replace( '<br/>', ', ', $order->get_formatted_billing_address() ); 644 } 645 if ( $this->integration->get_option( 'custom_field_shipping_address' ) ) { 646 $fields[ $this->integration->get_option( 'custom_field_shipping_address' ) ] = str_replace( '<br/>', ', ', $order->get_formatted_shipping_address() ); 647 } 648 if ( $this->integration->get_option( 'custom_field_payment_method' ) ) { 649 $fields[ $this->integration->get_option( 'custom_field_payment_method' ) ] = $order->get_payment_method(); 650 } 651 if ( $this->integration->get_option( 'custom_field_customer_note' ) ) { 652 $fields[ $this->integration->get_option( 'custom_field_customer_note' ) ] = $order->get_customer_note(); 653 } 654 655 /** 656 * Returns an array of ConvertKit Custom Field Key/Value pairs, with values 657 * comprising of Order data based, to be sent to ConvertKit when an Order's 658 * Customer is subscribed via a Form, Tag or Sequence. 659 * 660 * Returns false if no Order data should be stored in ConvertKit Custom Fields. 661 * 662 * @since 1.4.3 663 * 664 * @param mixed $fields Custom Field Key/Value pairs (false | array). 665 * @param WC_Order|WC_Order_Refund $order WooCommerce Order. 666 */ 667 $fields = apply_filters( 'convertkit_for_woocommerce_custom_field_data', $fields, $order ); 668 669 // If the fields array is empty, no Custom Field mappings exist. 670 if ( ! count( $fields ) ) { 671 return false; 672 } 673 674 return $fields; 675 676 } 677 605 678 } -
convertkit-for-woocommerce/trunk/includes/class-ckwc-resource.php
r2668107 r2678577 125 125 $results = $api->get_tags(); 126 126 break; 127 128 case 'custom_fields': 129 $results = $api->get_custom_fields(); 130 break; 127 131 } 128 132 -
convertkit-for-woocommerce/trunk/includes/class-wp-ckwc.php
r2668107 r2678577 143 143 private function initialize_global() { 144 144 145 $this->classes['order'] = new CKWC_Order(); 145 $this->classes['order'] = new CKWC_Order(); 146 $this->classes['review_request'] = new CKWC_Review_Request( 'ConvertKit for WooCommerce', 'convertkit-for-woocommerce' ); 146 147 147 148 /** -
convertkit-for-woocommerce/trunk/includes/functions.php
r2668107 r2678577 68 68 69 69 } 70 71 /** 72 * Helper method to enqueue Select2 scripts for use within the ConvertKit Plugin. 73 * 74 * @since 1.4.3 75 */ 76 function ckwc_select2_enqueue_scripts() { 77 78 wp_enqueue_script( 'ckwc-select2', 'https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js', array( 'jquery' ), CKWC_PLUGIN_VERSION, false ); 79 wp_enqueue_script( 'ckwc-admin-select2', CKWC_PLUGIN_URL . '/resources/backend/js/select2.js', array( 'ckwc-select2' ), CKWC_PLUGIN_VERSION, false ); 80 81 } 82 83 /** 84 * Helper method to enqueue Select2 stylesheets for use within the ConvertKit Plugin. 85 * 86 * @since 1.4.3 87 */ 88 function ckwc_select2_enqueue_styles() { 89 90 wp_enqueue_style( 'ckwc-select2', 'https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css', false, CKWC_PLUGIN_VERSION ); 91 wp_enqueue_style( 'ckwc-admin-select2', CKWC_PLUGIN_URL . '/resources/backend/css/select2.css', false, CKWC_PLUGIN_VERSION ); 92 93 } -
convertkit-for-woocommerce/trunk/languages/woocommerce-convertkit.pot
r2668107 r2678577 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: ConvertKit for WooCommerce 1.4. 2\n"5 "Project-Id-Version: ConvertKit for WooCommerce 1.4.3\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/convertkit-woocommerce\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2022-0 1-27T19:06:35+00:00\n"12 "POT-Creation-Date: 2022-02-14T13:41:17+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.5.0\n" … … 29 29 30 30 #. Author of the plugin 31 #: includes/class-ckwc-integration.php: 2731 #: includes/class-ckwc-integration.php:63 32 32 msgid "ConvertKit" 33 33 msgstr "" … … 37 37 msgstr "" 38 38 39 #: admin/class-ckwc-admin-product.php: 5039 #: admin/class-ckwc-admin-product.php:89 40 40 msgid "ConvertKit Integration" 41 41 msgstr "" … … 80 80 msgstr "" 81 81 82 #: includes/class-ckwc-integration.php: 2882 #: includes/class-ckwc-integration.php:64 83 83 msgid "Enter your ConvertKit settings below to control how WooCommerce integrates with your ConvertKit account." 84 84 msgstr "" 85 85 86 #: includes/class-ckwc-integration.php: 5586 #: includes/class-ckwc-integration.php:92 87 87 msgid "Enable/Disable" 88 88 msgstr "" 89 89 90 #: includes/class-ckwc-integration.php: 5790 #: includes/class-ckwc-integration.php:94 91 91 msgid "Enable ConvertKit integration" 92 92 msgstr "" 93 93 94 #: includes/class-ckwc-integration.php: 6394 #: includes/class-ckwc-integration.php:100 95 95 msgid "API Key" 96 96 msgstr "" 97 97 98 98 #. translators: %1$s: Link to ConvertKit Account, %2$s: <br>, %3$s Link to ConvertKit Signup 99 #: includes/class-ckwc-integration.php: 69100 #: includes/class-ckwc-integration.php: 8699 #: includes/class-ckwc-integration.php:106 100 #: includes/class-ckwc-integration.php:123 101 101 msgid "%1$s Required for proper plugin function. %2$s Don't have a ConvertKit account? %3$s" 102 102 msgstr "" 103 103 104 #: includes/class-ckwc-integration.php: 70104 #: includes/class-ckwc-integration.php:107 105 105 msgid "Get your ConvertKit API Key." 106 106 msgstr "" 107 107 108 #: includes/class-ckwc-integration.php: 72109 #: includes/class-ckwc-integration.php: 89108 #: includes/class-ckwc-integration.php:109 109 #: includes/class-ckwc-integration.php:126 110 110 msgid "Sign up here." 111 111 msgstr "" 112 112 113 #: includes/class-ckwc-integration.php: 80113 #: includes/class-ckwc-integration.php:117 114 114 msgid "API Secret" 115 115 msgstr "" 116 116 117 #: includes/class-ckwc-integration.php: 87117 #: includes/class-ckwc-integration.php:124 118 118 msgid "Get your ConvertKit API Secret." 119 119 msgstr "" 120 120 121 #: includes/class-ckwc-integration.php: 99121 #: includes/class-ckwc-integration.php:136 122 122 msgid "Subscribe Event" 123 123 msgstr "" 124 124 125 #: includes/class-ckwc-integration.php:1 02125 #: includes/class-ckwc-integration.php:139 126 126 msgid "When should customers be subscribed?" 127 127 msgstr "" 128 128 129 #: includes/class-ckwc-integration.php:1 05129 #: includes/class-ckwc-integration.php:142 130 130 msgid "Order Created" 131 131 msgstr "" 132 132 133 #: includes/class-ckwc-integration.php:1 06133 #: includes/class-ckwc-integration.php:143 134 134 msgid "Order Processing" 135 135 msgstr "" 136 136 137 #: includes/class-ckwc-integration.php:1 07137 #: includes/class-ckwc-integration.php:144 138 138 msgid "Order Completed" 139 139 msgstr "" 140 140 141 #: includes/class-ckwc-integration.php:1 14141 #: includes/class-ckwc-integration.php:151 142 142 msgid "Subscription" 143 143 msgstr "" 144 144 145 #: includes/class-ckwc-integration.php:1 17146 msgid "The ConvertKit Form, Tag or Sequence to subscribe Customers to."147 msgstr "" 148 149 #: includes/class-ckwc-integration.php:1 23145 #: includes/class-ckwc-integration.php:154 146 msgid "The ConvertKit form, tag or sequence to subscribe customers to." 147 msgstr "" 148 149 #: includes/class-ckwc-integration.php:160 150 150 msgid "Name Format" 151 151 msgstr "" 152 152 153 #: includes/class-ckwc-integration.php:1 26153 #: includes/class-ckwc-integration.php:163 154 154 msgid "How should the customer name be sent to ConvertKit?" 155 155 msgstr "" 156 156 157 #: includes/class-ckwc-integration.php:1 29157 #: includes/class-ckwc-integration.php:166 158 158 msgid "Billing First Name" 159 159 msgstr "" 160 160 161 #: includes/class-ckwc-integration.php:1 30161 #: includes/class-ckwc-integration.php:167 162 162 msgid "Billing Last Name" 163 163 msgstr "" 164 164 165 #: includes/class-ckwc-integration.php:1 31165 #: includes/class-ckwc-integration.php:168 166 166 msgid "Billing First Name + Billing Last Name" 167 167 msgstr "" 168 168 169 #: includes/class-ckwc-integration.php:140 169 #: includes/class-ckwc-integration.php:177 170 msgid "Send Phone Number" 171 msgstr "" 172 173 #: includes/class-ckwc-integration.php:180 174 msgid "The ConvertKit custom field to store the order's phone number." 175 msgstr "" 176 177 #: includes/class-ckwc-integration.php:186 178 msgid "Send Billing Address" 179 msgstr "" 180 181 #: includes/class-ckwc-integration.php:189 182 msgid "The ConvertKit custom field to store the order's billing address." 183 msgstr "" 184 185 #: includes/class-ckwc-integration.php:195 186 msgid "Send Shipping Address" 187 msgstr "" 188 189 #: includes/class-ckwc-integration.php:198 190 msgid "The ConvertKit custom field to store the order's shipping address." 191 msgstr "" 192 193 #: includes/class-ckwc-integration.php:204 194 msgid "Send Payment Method" 195 msgstr "" 196 197 #: includes/class-ckwc-integration.php:207 198 msgid "The ConvertKit custom field to store the order's payment method." 199 msgstr "" 200 201 #: includes/class-ckwc-integration.php:213 202 msgid "Send Customer Note" 203 msgstr "" 204 205 #: includes/class-ckwc-integration.php:216 206 msgid "The ConvertKit custom field to store the order's customer note." 207 msgstr "" 208 209 #: includes/class-ckwc-integration.php:224 170 210 msgid "Opt-In Checkbox" 171 211 msgstr "" 172 212 173 #: includes/class-ckwc-integration.php: 141174 msgid "Display an Opt-In checkbox on checkout"175 msgstr "" 176 177 #: includes/class-ckwc-integration.php: 144213 #: includes/class-ckwc-integration.php:225 214 msgid "Display an opt-in checkbox on checkout" 215 msgstr "" 216 217 #: includes/class-ckwc-integration.php:228 178 218 msgid "" 179 "If enabled, customers will <strong>only</strong> be subscribed to the chosen Forms, Tags and Sequences if they check the \"Opt-In\"checkbox at checkout.<br />\n"180 "\t\t\t\t\t\t\t\t\t If disabled, customers will <strong>always</strong> be subscribed to the chosen Forms, Tags and Sequences at checkout."181 msgstr "" 182 183 #: includes/class-ckwc-integration.php: 155219 "If enabled, customers will <strong>only</strong> be subscribed to the chosen forms, tags and sequences if they check the opt-in checkbox at checkout.<br />\n" 220 "\t\t\t\t\t\t\t\t\t If disabled, customers will <strong>always</strong> be subscribed to the chosen forms, tags and sequences at checkout." 221 msgstr "" 222 223 #: includes/class-ckwc-integration.php:239 184 224 msgid "Opt-In Checkbox: Label" 185 225 msgstr "" 186 226 187 #: includes/class-ckwc-integration.php: 157227 #: includes/class-ckwc-integration.php:241 188 228 msgid "I want to subscribe to the newsletter" 189 229 msgstr "" 190 230 191 #: includes/class-ckwc-integration.php: 158192 msgid " Optional (only used if the above field is checked):Customize the label next to the opt-in checkbox."193 msgstr "" 194 195 #: includes/class-ckwc-integration.php: 165231 #: includes/class-ckwc-integration.php:242 232 msgid "Customize the label next to the opt-in checkbox." 233 msgstr "" 234 235 #: includes/class-ckwc-integration.php:249 196 236 msgid "Opt-In Checkbox: Default Status" 197 237 msgstr "" 198 238 199 #: includes/class-ckwc-integration.php: 168239 #: includes/class-ckwc-integration.php:252 200 240 msgid "The default state of the opt-in checkbox." 201 241 msgstr "" 202 242 203 #: includes/class-ckwc-integration.php: 171243 #: includes/class-ckwc-integration.php:255 204 244 msgid "Checked" 205 245 msgstr "" 206 246 207 #: includes/class-ckwc-integration.php: 172247 #: includes/class-ckwc-integration.php:256 208 248 msgid "Unchecked" 209 249 msgstr "" 210 250 211 #: includes/class-ckwc-integration.php: 179251 #: includes/class-ckwc-integration.php:263 212 252 msgid "Opt-In Checkbox: Display Location" 213 253 msgstr "" 214 254 215 #: includes/class-ckwc-integration.php: 182216 msgid "Where to display the opt-in checkbox on the checkout page (under Billing Info or Order Info)."217 msgstr "" 218 219 #: includes/class-ckwc-integration.php: 185255 #: includes/class-ckwc-integration.php:266 256 msgid "Where to display the opt-in checkbox on the checkout page (under \"Billing details\" or \"Additional information\")." 257 msgstr "" 258 259 #: includes/class-ckwc-integration.php:269 220 260 msgid "Billing" 221 261 msgstr "" 222 262 223 #: includes/class-ckwc-integration.php: 186263 #: includes/class-ckwc-integration.php:270 224 264 msgid "Order" 225 265 msgstr "" 226 266 227 #: includes/class-ckwc-integration.php: 195267 #: includes/class-ckwc-integration.php:279 228 268 msgid "Purchase Data" 229 269 msgstr "" 230 270 231 #: includes/class-ckwc-integration.php: 196271 #: includes/class-ckwc-integration.php:280 232 272 msgid "Send purchase data to ConvertKit." 233 273 msgstr "" 234 274 235 #: includes/class-ckwc-integration.php: 199275 #: includes/class-ckwc-integration.php:283 236 276 msgid "" 237 277 "If enabled, the customer's order data will be sent to ConvertKit. Their email address will always be subscribed to ConvertKit, <strong>regardless of the Customer's opt in status.</strong><br />\n" … … 239 279 msgstr "" 240 280 241 #: includes/class-ckwc-integration.php:2 12281 #: includes/class-ckwc-integration.php:296 242 282 msgid "Debug" 243 283 msgstr "" 244 284 245 #: includes/class-ckwc-integration.php:2 14285 #: includes/class-ckwc-integration.php:298 246 286 msgid "Write data to a log file" 247 287 msgstr "" 248 288 249 #: includes/class-ckwc-integration.php: 219250 msgid "View Log File"251 msgstr "" 252 253 #: includes/class-ckwc-integration.php: 349289 #: includes/class-ckwc-integration.php:303 290 msgid "View log file" 291 msgstr "" 292 293 #: includes/class-ckwc-integration.php:510 254 294 msgid "Please provide your ConvertKit API Key." 255 295 msgstr "" 256 296 257 #: includes/class-ckwc-integration.php: 364297 #: includes/class-ckwc-integration.php:525 258 298 msgid "Your ConvertKit API Key appears to be invalid. Please double check the value." 259 299 msgstr "" 260 300 261 301 #. translators: %1$s: Form Name, %2$s: Form ID 262 #: includes/class-ckwc-order.php:2 21302 #: includes/class-ckwc-order.php:233 263 303 msgid "[ConvertKit] Customer subscribed to the Form: %1$s [%2$s]" 264 304 msgstr "" 265 305 266 306 #. translators: %1$s: Tag Name, %2$s: Tag ID 267 #: includes/class-ckwc-order.php:2 38307 #: includes/class-ckwc-order.php:250 268 308 msgid "[ConvertKit] Customer subscribed to the Tag: %1$s [%2$s]" 269 309 msgstr "" 270 310 271 311 #. translators: %1$s: Sequence Name, %2$s: Sequence ID 272 #: includes/class-ckwc-order.php:2 56312 #: includes/class-ckwc-order.php:268 273 313 msgid "[ConvertKit] Customer subscribed to the Sequence: %1$s [%2$s]" 274 314 msgstr "" 275 315 276 316 #. translators: %1$s: Error Code, %2$s: Error Message 277 #: includes/class-ckwc-order.php:3 60317 #: includes/class-ckwc-order.php:372 278 318 msgid "[ConvertKit] Send Purchase Data Error: %1$s %2$s" 279 319 msgstr "" 280 320 281 #: includes/class-ckwc-order.php:3 73321 #: includes/class-ckwc-order.php:385 282 322 msgid "[ConvertKit] Purchase Data sent successfully" 283 323 msgstr "" 284 324 285 325 #. translators: %1$s: PHP class name 286 #: includes/class-wp-ckwc.php:18 5326 #: includes/class-wp-ckwc.php:186 287 327 msgid "ConvertKit for WooCommerce Error: Could not load Plugin class <strong>%1$s</strong>" 288 328 msgstr "" 289 329 290 #: includes/class-wp-ckwc.php:19 5330 #: includes/class-wp-ckwc.php:196 291 331 msgid "ConvertKit for WooCommerce Error" 332 msgstr "" 333 334 #: views/backend/custom-field-dropdown-field.php:13 335 msgid "(Don't send or map)" 292 336 msgstr "" 293 337 294 338 #. translators: %1$s: Post Type Singular Name, %2$s: Link to Integration Settings 295 339 #: views/backend/product/disabled.php:15 296 msgid "To configure the ConvertKit Form, Tag or Sequence to subscribe Customers to who purchase this %1$s, %2$s and enter a valid API Key andSecret."340 msgid "To configure the ConvertKit form, tag or sequence to subscribe customers to who purchase this %1$s, %2$s and enter a valid API Key and API Secret." 297 341 msgstr "" 298 342 … … 302 346 303 347 #: views/backend/product/meta-box.php:14 304 msgid "The ConvertKit Form, Tag or Sequence to subscribe Customers to who purchase this Product." 305 msgstr "" 306 307 #: views/backend/settings/subscription-disabled.php:17 348 msgid "The ConvertKit form, tag or sequence to subscribe customers to who purchase this product." 349 msgstr "" 350 351 #. translators: Plugin Name 352 #: views/backend/review/notice.php:17 353 msgid "We'd be super grateful if you could spread the word about %s and give it a 5 star rating on WordPress?" 354 msgstr "" 355 356 #: views/backend/review/notice.php:25 357 msgid "Yes, leave review" 358 msgstr "" 359 360 #. translators: Plugin Name 361 #: views/backend/review/notice.php:32 362 msgid "No, I'm having issues with %s" 363 msgstr "" 364 365 #: views/backend/settings/custom-field-disabled.php:18 366 msgid "To select the custom field to map this order value to, specify a valid API Key, API Secret, and click Save changes." 367 msgstr "" 368 369 #: views/backend/settings/subscription-disabled.php:18 308 370 msgid "To select the Form, Tag or Sequence to subscribe Customers to, specify a valid API Key and Secret, and click Save changes." 309 371 msgstr "" -
convertkit-for-woocommerce/trunk/readme.txt
r2668107 r2678577 46 46 47 47 == Changelog == 48 49 ### 1.4.3 2022-02-14 50 * Added: Settings: Options to Map WooCommerce Order Data (Phone, Billing Address etc) to ConvertKit Custom Fields 51 * Added: Select2 dropdown for Forms, Tags and Sequence selection with search functionality for improved UX. 48 52 49 53 ### 1.4.2 2022-01-28 -
convertkit-for-woocommerce/trunk/resources/backend/js/integration.js
r2668107 r2678577 78 78 } 79 79 80 // Hide this row if the input or selectelement within the row has the CSS class of the setting name.81 if ( $( 'input, select ', $( this ) ).hasClass( setting ) ) {80 // Hide this row if the input, select, link or span element within the row has the CSS class of the setting name. 81 if ( $( 'input, select, a, span', $( this ) ).hasClass( setting ) ) { 82 82 $( this ).hide(); 83 83 } -
convertkit-for-woocommerce/trunk/views/backend/product/disabled.php
r2668107 r2678577 13 13 echo sprintf( 14 14 /* translators: %1$s: Post Type Singular Name, %2$s: Link to Integration Settings */ 15 esc_html__( 'To configure the ConvertKit Form, Tag or Sequence to subscribe Customers to who purchase this %1$s, %2$s and enter a valid API Key andSecret.', 'woocommerce-convertkit' ),15 esc_html__( 'To configure the ConvertKit form, tag or sequence to subscribe customers to who purchase this %1$s, %2$s and enter a valid API Key and API Secret.', 'woocommerce-convertkit' ), 16 16 esc_attr( $post_type->labels->singular_name ), 17 17 '<a href="' . esc_attr( admin_url( 'admin.php?page=wc-settings&tab=integration§ion=ckwc' ) ) . '">' . esc_html__( 'enable the ConvertKit WooCommerce integration', 'woocommerce-convertkit' ) . '</a>' -
convertkit-for-woocommerce/trunk/views/backend/product/meta-box.php
r2668107 r2678577 12 12 13 13 <p class="description"> 14 <?php esc_html_e( 'The ConvertKit Form, Tag or Sequence to subscribe Customers to who purchase this Product.', 'woocommerce-convertkit' ); ?>14 <?php esc_html_e( 'The ConvertKit form, tag or sequence to subscribe customers to who purchase this product.', 'woocommerce-convertkit' ); ?> 15 15 </p> 16 16 -
convertkit-for-woocommerce/trunk/views/backend/settings/subscription-disabled.php
r2668107 r2678577 15 15 </th> 16 16 <td class="forminp"> 17 <?php esc_html_e( 'To select the Form, Tag or Sequence to subscribe Customers to, specify a valid API Key and Secret, and click Save changes.', 'woocommerce-convertkit' ); ?> 17 <span class="<?php echo esc_attr( $data['class'] ); ?>"> 18 <?php esc_html_e( 'To select the Form, Tag or Sequence to subscribe Customers to, specify a valid API Key and Secret, and click Save changes.', 'woocommerce-convertkit' ); ?> 19 </span> 18 20 </td> 19 21 </tr> -
convertkit-for-woocommerce/trunk/woocommerce-convertkit.php
r2668107 r2678577 10 10 * Plugin URI: https://www.convertkit.com 11 11 * Description: Integrates WooCommerce with ConvertKit, allowing customers to be automatically sent to your ConvertKit account. 12 * Version: 1.4. 212 * Version: 1.4.3 13 13 * Author: ConvertKit 14 14 * Author URI: https://www.convertkit.com … … 16 16 * 17 17 * WC requires at least: 3.0 18 * WC tested up to: 6. 118 * WC tested up to: 6.2 19 19 */ 20 20 … … 28 28 define( 'CKWC_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 29 29 define( 'CKWC_PLUGIN_PATH', __DIR__ ); 30 define( 'CKWC_PLUGIN_VERSION', '1.4. 2' );30 define( 'CKWC_PLUGIN_VERSION', '1.4.3' ); 31 31 32 32 // Load files that are always used. … … 37 37 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-order.php'; 38 38 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-resource.php'; 39 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-resource-custom-fields.php'; 39 40 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-resource-forms.php'; 40 41 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-resource-sequences.php'; 41 42 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-resource-tags.php'; 43 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-review-request.php'; 42 44 43 45 // Load files that are only used in the WordPress Administration interface.
Note: See TracChangeset
for help on using the changeset viewer.