Changeset 3442178
- Timestamp:
- 01/19/2026 03:03:41 AM (7 weeks ago)
- Location:
- convertkit-for-woocommerce
- Files:
-
- 4 added
- 20 edited
- 1 copied
-
tags/2.0.5 (copied) (copied from convertkit-for-woocommerce/trunk)
-
tags/2.0.5/includes/class-ckwc-abandoned-cart.php (added)
-
tags/2.0.5/includes/class-ckwc-integration.php (modified) (17 diffs)
-
tags/2.0.5/includes/class-ckwc-setup.php (modified) (1 diff)
-
tags/2.0.5/includes/class-wp-ckwc.php (modified) (1 diff)
-
tags/2.0.5/includes/cron-functions.php (modified) (1 diff)
-
tags/2.0.5/includes/functions.php (modified) (1 diff)
-
tags/2.0.5/languages/woocommerce-convertkit.pot (modified) (11 diffs)
-
tags/2.0.5/readme.txt (modified) (2 diffs)
-
tags/2.0.5/resources/backend/js/integration.js (modified) (3 diffs)
-
tags/2.0.5/resources/frontend/js/abandoned-cart.js (added)
-
tags/2.0.5/views/backend/subscription-dropdown-field.php (modified) (1 diff)
-
tags/2.0.5/woocommerce-convertkit.php (modified) (4 diffs)
-
trunk/includes/class-ckwc-abandoned-cart.php (added)
-
trunk/includes/class-ckwc-integration.php (modified) (17 diffs)
-
trunk/includes/class-ckwc-setup.php (modified) (1 diff)
-
trunk/includes/class-wp-ckwc.php (modified) (1 diff)
-
trunk/includes/cron-functions.php (modified) (1 diff)
-
trunk/includes/functions.php (modified) (1 diff)
-
trunk/languages/woocommerce-convertkit.pot (modified) (11 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/resources/backend/js/integration.js (modified) (3 diffs)
-
trunk/resources/frontend/js/abandoned-cart.js (added)
-
trunk/views/backend/subscription-dropdown-field.php (modified) (1 diff)
-
trunk/woocommerce-convertkit.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
convertkit-for-woocommerce/tags/2.0.5/includes/class-ckwc-integration.php
r3411835 r3442178 521 521 522 522 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 523 'class' => 'enabled subscribe',523 'class' => 'enabled', 524 524 ), 525 525 'subscription' => array( 526 'title' => __( 'Subscription', 'woocommerce-convertkit' ), 527 'type' => 'subscription', 528 'default' => '', 529 'description' => __( 'The Kit form, tag or sequence to subscribe customers to.', 'woocommerce-convertkit' ), 530 531 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 532 'class' => 'enabled subscribe', 526 'title' => __( 'Subscription', 'woocommerce-convertkit' ), 527 'type' => 'subscription', 528 'default' => '', 529 'description' => __( 'The Kit form, tag or sequence to subscribe customers to.', 'woocommerce-convertkit' ), 530 'include_forms' => true, 531 'include_tags' => true, 532 'include_sequences' => true, 533 534 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 535 'class' => 'enabled', 533 536 ), 534 537 'name_format' => array( … … 545 548 546 549 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 547 'class' => 'enabled subscribe',550 'class' => 'enabled', 548 551 ), 549 552 … … 556 559 557 560 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 558 'class' => 'enabled subscribe',561 'class' => 'enabled', 559 562 ), 560 563 'custom_field_phone' => array( … … 565 568 566 569 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 567 'class' => 'enabled subscribe',570 'class' => 'enabled', 568 571 ), 569 572 'custom_field_billing_address' => array( … … 574 577 575 578 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 576 'class' => 'enabled subscribe',579 'class' => 'enabled', 577 580 ), 578 581 'custom_field_shipping_address' => array( … … 583 586 584 587 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 585 'class' => 'enabled subscribe',588 'class' => 'enabled', 586 589 ), 587 590 'custom_field_address_format' => array( … … 620 623 621 624 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 622 'class' => 'enabled subscribe',625 'class' => 'enabled', 623 626 ), 624 627 'custom_field_customer_note' => array( … … 629 632 630 633 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 631 'class' => 'enabled subscribe',634 'class' => 'enabled', 632 635 ), 633 636 … … 646 649 647 650 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 648 'class' => 'enabled subscribe',651 'class' => 'enabled', 649 652 ), 650 653 'opt_in_label' => array( … … 656 659 657 660 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 658 'class' => 'enabled subscribedisplay_opt_in',661 'class' => 'enabled display_opt_in', 659 662 ), 660 663 'opt_in_status' => array( … … 670 673 671 674 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 672 'class' => 'enabled subscribedisplay_opt_in',675 'class' => 'enabled display_opt_in', 673 676 ), 674 677 'opt_in_location' => array( … … 684 687 685 688 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 686 'class' => 'enabled subscribedisplay_opt_in',689 'class' => 'enabled display_opt_in', 687 690 ), 688 691 … … 701 704 702 705 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 703 'class' => 'enabled subscribe',706 'class' => 'enabled', 704 707 ), 705 708 'send_purchases_event' => array( … … 732 735 733 736 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 734 'class' => 'enabled s ubscribe send_purchases',737 'class' => 'enabled send_purchases', 735 738 ), 736 739 'sync_past_orders' => array( … … 747 750 748 751 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 749 'class' => 'enabled subscribe', 752 'class' => 'enabled send_purchases', 753 ), 754 755 // Abandoned Cart. 756 'abandoned_cart' => array( 757 'title' => __( 'Abandoned Cart', 'woocommerce-convertkit' ), 758 'label' => __( 'Send abandoned cart data to Kit.', 'woocommerce-convertkit' ), 759 'type' => 'checkbox', 760 'default' => 'no', 761 'description' => __( 762 'If enabled, the visitor will be subscribed to a tag in Kit, if they leave items in their cart without completing the checkout process after the below number of minutes. The tag is removed when they complete checkout.', 763 'woocommerce-convertkit' 764 ), 765 'desc_tip' => false, 766 767 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 768 'class' => 'enabled', 769 ), 770 'abandoned_cart_threshold' => array( 771 'title' => __( 'Abandoned Cart: Threshold', 'woocommerce-convertkit' ), 772 'type' => 'number', 773 'default' => 15, 774 'description' => __( 'The number of minutes to wait before considering a cart abandoned.', 'woocommerce-convertkit' ), 775 'desc_tip' => false, 776 777 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 778 'class' => 'enabled abandoned_cart', 779 780 // Custom attributes for the number input. 781 'custom_attributes' => array( 782 'min' => 1, 783 'max' => 99999, 784 'step' => 1, 785 ), 786 ), 787 'abandoned_cart_subscription' => array( 788 'title' => __( 'Abandoned Cart: Tag', 'woocommerce-convertkit' ), 789 'type' => 'subscription', 790 'default' => '', 791 'description' => __( 'The Kit tag to subscribe visitors to when they abandon their cart. This can be used in a Sequence or Automation to send abandoned cart emails to the subscriber. This tag is removed when the customer completes the checkout process.', 'woocommerce-convertkit' ), 792 'include_forms' => false, 793 'include_tags' => true, 794 'include_sequences' => false, 795 796 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 797 'class' => 'enabled abandoned_cart', 750 798 ), 751 799 … … 892 940 'custom_attributes' => array(), 893 941 'options' => array(), 942 'include_forms' => false, 943 'include_tags' => false, 944 'include_sequences' => false, 894 945 ); 895 946 … … 913 964 // Get current subscription setting and other settings to render the subscription dropdown field. 914 965 $subscription = array( 915 'id' => 'woocommerce_ckwc_subscription', 916 'class' => 'select ckwc-select2 ' . $data['class'], 917 'name' => $field, 918 'value' => $this->get_option( $key ), 919 'forms' => $this->forms, 920 'tags' => $this->tags, 921 'sequences' => $this->sequences, 966 'id' => $field, 967 'class' => 'select ckwc-select2 ' . $data['class'], 968 'name' => $field, 969 'value' => $this->get_option( $key ), 922 970 ); 971 972 // Include Forms, Tags and Sequences in the subscription dropdown field. 973 if ( $data['include_forms'] ) { 974 $subscription['forms'] = $this->forms; 975 } 976 if ( $data['include_tags'] ) { 977 $subscription['tags'] = $this->tags; 978 } 979 if ( $data['include_sequences'] ) { 980 $subscription['sequences'] = $this->sequences; 981 } 923 982 924 983 ob_start(); -
convertkit-for-woocommerce/tags/2.0.5/includes/class-ckwc-setup.php
r3273267 r3442178 28 28 if ( $current_version === CKWC_PLUGIN_VERSION ) { 29 29 return; 30 } 31 32 /** 33 * 2.0.5: Register Action Scheduler actions. 34 */ 35 if ( ! $current_version || version_compare( $current_version, '2.0.5', '<' ) ) { 36 add_action( 'shutdown', 'ckwc_schedule_actions' ); 30 37 } 31 38 -
convertkit-for-woocommerce/tags/2.0.5/includes/class-wp-ckwc.php
r3408882 r3442178 249 249 private function initialize_global() { 250 250 251 $this->classes['abandoned_cart'] = new CKWC_Abandoned_Cart(); 251 252 $this->classes['admin_notices'] = new CKWC_Admin_Notices(); 252 253 $this->classes['checkout'] = new CKWC_Checkout(); -
convertkit-for-woocommerce/tags/2.0.5/includes/cron-functions.php
r3322555 r3442178 6 6 * @author ConvertKit 7 7 */ 8 9 /** 10 * Subscribe abandoned cart emails to the abandoned cart tag 11 * by checking the WooCommerce sessions table. 12 * 13 * @since 2.0.5 14 */ 15 function ckwc_abandoned_cart() { 16 17 // Bail if the integration is unavailable. 18 if ( ! function_exists( 'WP_CKWC_Integration' ) ) { 19 return; 20 } 21 22 // Bail if the integration is not enabled. 23 if ( ! WP_CKWC_Integration()->is_enabled() ) { 24 return; 25 } 26 27 // Bail if Abandoned Cart is not enabled. 28 if ( ! WP_CKWC_Integration()->get_option_bool( 'abandoned_cart' ) ) { 29 return; 30 } 31 32 // Bail if no tag is configured. 33 $subscription = WP_CKWC_Integration()->get_option( 'abandoned_cart_subscription' ); 34 if ( empty( $subscription ) ) { 35 return; 36 } 37 38 // Get the tag ID. 39 list( $resource_type, $tag_id ) = explode( ':', $subscription ); 40 41 // Calculate the threshold. 42 $threshold = time() - ( absint( WP_CKWC_Integration()->get_option( 'abandoned_cart_threshold' ) ) * MINUTE_IN_SECONDS ); 43 44 // Setup the API. 45 $api = new CKWC_API( 46 CKWC_OAUTH_CLIENT_ID, 47 CKWC_OAUTH_CLIENT_REDIRECT_URI, 48 WP_CKWC_Integration()->get_option( 'access_token' ), 49 WP_CKWC_Integration()->get_option( 'refresh_token' ), 50 WP_CKWC_Integration()->get_option_bool( 'debug' ) 51 ); 52 53 // Get WooCommerce sessions. 54 // WooCommerce does not provide a public native function to fetch all sessions. 55 // We must continue to use a direct query to the woocommerce_sessions table. 56 global $wpdb; 57 $results = $wpdb->get_results( "SELECT session_key, session_value FROM {$wpdb->prefix}woocommerce_sessions" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery 58 59 foreach ( $results as $row ) { 60 // Get the session data. 61 $session_data = maybe_unserialize( $row->session_value ); 62 63 // If no email or timestamp is set, continue. 64 if ( empty( $session_data['ckwc_abandoned_cart_email'] ) || empty( $session_data['ckwc_abandoned_cart_timestamp'] ) ) { 65 continue; 66 } 67 68 $email = $session_data['ckwc_abandoned_cart_email']; 69 $timestamp = intval( $session_data['ckwc_abandoned_cart_timestamp'] ); 70 71 // Check if cart looks abandoned. 72 if ( $timestamp < $threshold ) { 73 // Create subscriber and tag. 74 $api->create_subscriber( $email ); 75 $api->tag_subscriber_by_email( absint( $tag_id ), $email ); 76 77 // Remove session data so we don't trigger this email again. 78 unset( $session_data['ckwc_abandoned_cart_email'] ); 79 unset( $session_data['ckwc_abandoned_cart_timestamp'] ); 80 $wpdb->update( // phpcs:ignore WordPress.DB.DirectDatabaseQuery 81 $wpdb->prefix . 'woocommerce_sessions', 82 array( 'session_value' => maybe_serialize( $session_data ) ), 83 array( 'session_key' => $row->session_key ), 84 array( '%s' ), 85 array( '%s' ) 86 ); 87 } 88 } 89 90 } 91 add_action( 'ckwc_abandoned_cart', 'ckwc_abandoned_cart' ); 8 92 9 93 /** -
convertkit-for-woocommerce/tags/2.0.5/includes/functions.php
r3411835 r3442178 6 6 * @author ConvertKit 7 7 */ 8 9 /** 10 * Runs the activation and update routines when the plugin is activated. 11 * 12 * @since 2.0.5 13 * 14 * @param bool $network_wide Is network wide activation. 15 */ 16 function ckwc_plugin_activate( $network_wide ) { 17 18 // Check if we are on a multisite install, activating network wide, or a single install. 19 if ( ! is_multisite() || ! $network_wide ) { 20 // Single Site activation. 21 add_action( 'shutdown', 'ckwc_schedule_actions' ); 22 } else { 23 // Multisite network wide activation. 24 $sites = get_sites( 25 array( 26 'number' => 0, 27 ) 28 ); 29 foreach ( $sites as $site ) { 30 switch_to_blog( (int) $site->blog_id ); 31 add_action( 'shutdown', 'ckwc_schedule_actions' ); 32 restore_current_blog(); 33 } 34 } 35 36 } 37 38 /** 39 * Runs the activation and update routines when the plugin is activated 40 * on a WordPress multisite setup. 41 * 42 * @since 2.0.5 43 * 44 * @param WP_Site|int $site_or_blog_id WP_Site or Blog ID. 45 */ 46 function ckwc_plugin_activate_new_site( $site_or_blog_id ) { 47 48 // Check if $site_or_blog_id is a WP_Site or a blog ID. 49 if ( is_a( $site_or_blog_id, 'WP_Site' ) ) { 50 $site_or_blog_id = $site_or_blog_id->blog_id; 51 } 52 53 // Run installation routine. 54 switch_to_blog( $site_or_blog_id ); 55 add_action( 'shutdown', 'ckwc_schedule_actions' ); 56 restore_current_blog(); 57 58 } 59 60 /** 61 * Runs the deactivation routine when the plugin is deactivated. 62 * 63 * @since 2.0.5 64 * 65 * @param bool $network_wide Is network wide deactivation. 66 */ 67 function ckwc_plugin_deactivate( $network_wide ) { 68 69 // Check if we are on a multisite install, activating network wide, or a single install. 70 if ( ! is_multisite() || ! $network_wide ) { 71 // Single Site activation. 72 ckwc_unschedule_actions(); 73 } else { 74 // Multisite network wide activation. 75 $sites = get_sites( 76 array( 77 'number' => 0, 78 ) 79 ); 80 foreach ( $sites as $site ) { 81 switch_to_blog( (int) $site->blog_id ); 82 ckwc_unschedule_actions(); 83 restore_current_blog(); 84 } 85 } 86 87 } 88 89 /** 90 * Schedules the WordPress Cron events. 91 * 92 * @since 2.0.5 93 */ 94 function ckwc_schedule_actions() { 95 96 // Bail if the action scheduler is unavailable. 97 if ( ! function_exists( 'as_schedule_recurring_action' ) ) { 98 return; 99 } 100 101 // Bail if the scheduled action already exists. 102 if ( as_next_scheduled_action( 'ckwc_abandoned_cart' ) ) { 103 return; 104 } 105 106 // Schedule action. 107 as_schedule_recurring_action( 108 time(), 109 15 * MINUTE_IN_SECONDS, 110 'ckwc_abandoned_cart', 111 array(), 112 'ckwc' 113 ); 114 115 } 116 117 /** 118 * Unschedules the WordPress Cron events. 119 * 120 * @since 2.0.5 121 */ 122 function ckwc_unschedule_actions() { 123 124 // Bail if the action scheduler is unavailable. 125 if ( ! function_exists( 'as_unschedule_all_actions' ) ) { 126 return; 127 } 128 129 // Unschedule action. 130 as_unschedule_all_actions( 'ckwc_abandoned_cart' ); 131 132 } 8 133 9 134 /** -
convertkit-for-woocommerce/tags/2.0.5/languages/woocommerce-convertkit.pot
r3422972 r3442178 1 # Copyright (C) 202 5Kit1 # Copyright (C) 2026 Kit 2 2 # This file is distributed under the GPLv3 or later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Kit (formerly ConvertKit) for WooCommerce 2.0. 4\n"5 "Project-Id-Version: Kit (formerly ConvertKit) for WooCommerce 2.0.5\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: 202 5-12-18T10:49:33+00:00\n"12 "POT-Creation-Date: 2026-01-16T03:18:38+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 74 74 msgstr "" 75 75 76 #: includes/class-ckwc-abandoned-cart.php:105 77 msgid "Email is required." 78 msgstr "" 79 80 #: includes/class-ckwc-abandoned-cart.php:112 81 msgid "Invalid email." 82 msgstr "" 83 76 84 #: includes/class-ckwc-admin-notices.php:64 77 85 msgid "Kit for WooCommerce: Authorization failed. Please" … … 279 287 280 288 #: includes/class-ckwc-integration.php:504 281 #: includes/class-ckwc-integration.php:71 6289 #: includes/class-ckwc-integration.php:719 282 290 msgid "Processing:" 283 291 msgstr "" 284 292 285 293 #: includes/class-ckwc-integration.php:505 286 #: includes/class-ckwc-integration.php:7 17294 #: includes/class-ckwc-integration.php:720 287 295 msgid "WooCommerce order created, payment received, order awaiting fulfilment." 288 296 msgstr "" 289 297 290 298 #: includes/class-ckwc-integration.php:510 291 #: includes/class-ckwc-integration.php:72 2299 #: includes/class-ckwc-integration.php:725 292 300 msgid "Completed:" 293 301 msgstr "" 294 302 295 303 #: includes/class-ckwc-integration.php:511 296 #: includes/class-ckwc-integration.php:72 3304 #: includes/class-ckwc-integration.php:726 297 305 msgid "WooCommerce order created, payment received, order fulfiled." 298 306 msgstr "" … … 303 311 304 312 #: includes/class-ckwc-integration.php:518 305 #: includes/class-ckwc-integration.php:7 29313 #: includes/class-ckwc-integration.php:732 306 314 msgid "Order Processing" 307 315 msgstr "" 308 316 309 317 #: includes/class-ckwc-integration.php:519 310 #: includes/class-ckwc-integration.php:73 0318 #: includes/class-ckwc-integration.php:733 311 319 msgid "Order Completed" 312 320 msgstr "" … … 320 328 msgstr "" 321 329 322 #: includes/class-ckwc-integration.php:53 5330 #: includes/class-ckwc-integration.php:538 323 331 msgid "Name Format" 324 332 msgstr "" 325 333 326 #: includes/class-ckwc-integration.php:5 38334 #: includes/class-ckwc-integration.php:541 327 335 msgid "How should the customer name be sent to Kit?" 328 336 msgstr "" 329 337 330 #: includes/class-ckwc-integration.php:54 1338 #: includes/class-ckwc-integration.php:544 331 339 msgid "Billing First Name" 332 340 msgstr "" 333 341 334 #: includes/class-ckwc-integration.php:54 2342 #: includes/class-ckwc-integration.php:545 335 343 msgid "Billing Last Name" 336 344 msgstr "" 337 345 338 #: includes/class-ckwc-integration.php:54 3346 #: includes/class-ckwc-integration.php:546 339 347 msgid "Billing First Name + Billing Last Name" 340 348 msgstr "" 341 349 342 #: includes/class-ckwc-integration.php:55 2350 #: includes/class-ckwc-integration.php:555 343 351 msgid "Send Last Name" 344 352 msgstr "" 345 353 346 #: includes/class-ckwc-integration.php:55 5354 #: includes/class-ckwc-integration.php:558 347 355 msgid "The Kit custom field to store the order's last name." 348 356 msgstr "" 349 357 350 #: includes/class-ckwc-integration.php:56 1358 #: includes/class-ckwc-integration.php:564 351 359 msgid "Send Phone Number" 352 360 msgstr "" 353 361 354 #: includes/class-ckwc-integration.php:56 4362 #: includes/class-ckwc-integration.php:567 355 363 msgid "The Kit custom field to store the order's phone number." 356 364 msgstr "" 357 365 358 #: includes/class-ckwc-integration.php:57 0366 #: includes/class-ckwc-integration.php:573 359 367 msgid "Send Billing Address" 360 368 msgstr "" 361 369 362 #: includes/class-ckwc-integration.php:57 3370 #: includes/class-ckwc-integration.php:576 363 371 msgid "The Kit custom field to store the order's billing address." 364 372 msgstr "" 365 373 366 #: includes/class-ckwc-integration.php:5 79374 #: includes/class-ckwc-integration.php:582 367 375 msgid "Send Shipping Address" 368 376 msgstr "" 369 377 370 #: includes/class-ckwc-integration.php:58 2378 #: includes/class-ckwc-integration.php:585 371 379 msgid "The Kit custom field to store the order's shipping address." 372 380 msgstr "" 373 381 374 #: includes/class-ckwc-integration.php:5 88382 #: includes/class-ckwc-integration.php:591 375 383 msgid "Address Format" 376 384 msgstr "" 377 385 378 #: includes/class-ckwc-integration.php: 599386 #: includes/class-ckwc-integration.php:602 379 387 msgid "The format of the billing and shipping addresses to store in Kit." 380 388 msgstr "" 381 389 382 #: includes/class-ckwc-integration.php:60 2390 #: includes/class-ckwc-integration.php:605 383 391 msgid "Name" 384 392 msgstr "" 385 393 386 #: includes/class-ckwc-integration.php:60 3394 #: includes/class-ckwc-integration.php:606 387 395 msgid "Company Name" 388 396 msgstr "" 389 397 390 #: includes/class-ckwc-integration.php:60 4398 #: includes/class-ckwc-integration.php:607 391 399 msgid "Address 1" 392 400 msgstr "" 393 401 394 #: includes/class-ckwc-integration.php:60 5402 #: includes/class-ckwc-integration.php:608 395 403 msgid "Address 2" 396 404 msgstr "" 397 405 398 #: includes/class-ckwc-integration.php:60 6406 #: includes/class-ckwc-integration.php:609 399 407 msgid "City" 400 408 msgstr "" 401 409 402 #: includes/class-ckwc-integration.php:6 07410 #: includes/class-ckwc-integration.php:610 403 411 msgid "State" 404 412 msgstr "" 405 413 406 #: includes/class-ckwc-integration.php:6 08414 #: includes/class-ckwc-integration.php:611 407 415 msgid "Postcode" 408 416 msgstr "" 409 417 410 #: includes/class-ckwc-integration.php:6 09418 #: includes/class-ckwc-integration.php:612 411 419 msgid "Country" 412 420 msgstr "" 413 421 414 #: includes/class-ckwc-integration.php:61 6422 #: includes/class-ckwc-integration.php:619 415 423 msgid "Send Payment Method" 416 424 msgstr "" 417 425 418 #: includes/class-ckwc-integration.php:6 19426 #: includes/class-ckwc-integration.php:622 419 427 msgid "The Kit custom field to store the order's payment method." 420 428 msgstr "" 421 429 422 #: includes/class-ckwc-integration.php:62 5430 #: includes/class-ckwc-integration.php:628 423 431 msgid "Send Customer Note" 424 432 msgstr "" 425 433 426 #: includes/class-ckwc-integration.php:6 28434 #: includes/class-ckwc-integration.php:631 427 435 msgid "The Kit custom field to store the order's customer note." 428 436 msgstr "" 429 437 430 #: includes/class-ckwc-integration.php:63 6438 #: includes/class-ckwc-integration.php:639 431 439 msgid "Opt-In Checkbox" 432 440 msgstr "" 433 441 434 #: includes/class-ckwc-integration.php:6 37442 #: includes/class-ckwc-integration.php:640 435 443 msgid "Display an opt-in checkbox on checkout" 436 444 msgstr "" 437 445 438 #: includes/class-ckwc-integration.php:64 0446 #: includes/class-ckwc-integration.php:643 439 447 msgid "" 440 448 "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" … … 442 450 msgstr "" 443 451 444 #: includes/class-ckwc-integration.php:65 1452 #: includes/class-ckwc-integration.php:654 445 453 msgid "Opt-In Checkbox: Label" 446 454 msgstr "" 447 455 448 #: includes/class-ckwc-integration.php:65 3456 #: includes/class-ckwc-integration.php:656 449 457 msgid "I want to subscribe to the newsletter" 450 458 msgstr "" 451 459 452 #: includes/class-ckwc-integration.php:65 4460 #: includes/class-ckwc-integration.php:657 453 461 msgid "Customize the label next to the opt-in checkbox." 454 462 msgstr "" 455 463 456 #: includes/class-ckwc-integration.php:66 1464 #: includes/class-ckwc-integration.php:664 457 465 msgid "Opt-In Checkbox: Default Status" 458 466 msgstr "" 459 467 460 #: includes/class-ckwc-integration.php:66 4468 #: includes/class-ckwc-integration.php:667 461 469 msgid "The default state of the opt-in checkbox." 462 470 msgstr "" 463 471 464 #: includes/class-ckwc-integration.php:6 67472 #: includes/class-ckwc-integration.php:670 465 473 msgid "Checked" 466 474 msgstr "" 467 475 468 #: includes/class-ckwc-integration.php:6 68476 #: includes/class-ckwc-integration.php:671 469 477 msgid "Unchecked" 470 478 msgstr "" 471 479 472 #: includes/class-ckwc-integration.php:67 5480 #: includes/class-ckwc-integration.php:678 473 481 msgid "Opt-In Checkbox: Display Location" 474 482 msgstr "" 475 483 476 #: includes/class-ckwc-integration.php:6 78484 #: includes/class-ckwc-integration.php:681 477 485 msgid "Where to display the opt-in checkbox on the checkout page (under \"Billing details\" or \"Additional information\")." 478 486 msgstr "" 479 487 480 #: includes/class-ckwc-integration.php:68 1488 #: includes/class-ckwc-integration.php:684 481 489 msgid "Billing" 482 490 msgstr "" 483 491 484 #: includes/class-ckwc-integration.php:68 2492 #: includes/class-ckwc-integration.php:685 485 493 msgid "Order" 486 494 msgstr "" 487 495 488 #: includes/class-ckwc-integration.php:69 1496 #: includes/class-ckwc-integration.php:694 489 497 msgid "Purchase Data" 490 498 msgstr "" 491 499 492 #: includes/class-ckwc-integration.php:69 2500 #: includes/class-ckwc-integration.php:695 493 501 msgid "Send purchase data to Kit." 494 502 msgstr "" 495 503 496 #: includes/class-ckwc-integration.php:69 5504 #: includes/class-ckwc-integration.php:698 497 505 msgid "" 498 506 "If enabled, the customer's order data will be sent to Kit. Their email address will always be subscribed to Kit, <strong>regardless of the Customer's opt in status.</strong><br />\n" … … 500 508 msgstr "" 501 509 502 #: includes/class-ckwc-integration.php:70 6510 #: includes/class-ckwc-integration.php:709 503 511 msgid "Purchase Data Event" 504 512 msgstr "" 505 513 506 #: includes/class-ckwc-integration.php:71 2514 #: includes/class-ckwc-integration.php:715 507 515 msgid "When should purchase data be sent?" 508 516 msgstr "" 509 517 510 #: includes/class-ckwc-integration.php:7 37518 #: includes/class-ckwc-integration.php:740 511 519 msgid "Sync Past Orders" 512 520 msgstr "" 513 521 514 #: includes/class-ckwc-integration.php:7 38522 #: includes/class-ckwc-integration.php:741 515 523 msgid "Send old purchase data to Kit i.e. Orders that were created in WooCommerce prior to this Plugin being installed." 516 524 msgstr "" 517 525 518 #: includes/class-ckwc-integration.php:754 526 #: includes/class-ckwc-integration.php:757 527 msgid "Abandoned Cart" 528 msgstr "" 529 530 #: includes/class-ckwc-integration.php:758 531 msgid "Send abandoned cart data to Kit." 532 msgstr "" 533 534 #: includes/class-ckwc-integration.php:761 535 msgid "If enabled, the visitor will be subscribed to a tag in Kit, if they leave items in their cart without completing the checkout process after the below number of minutes. The tag is removed when they complete checkout." 536 msgstr "" 537 538 #: includes/class-ckwc-integration.php:771 539 msgid "Abandoned Cart: Threshold" 540 msgstr "" 541 542 #: includes/class-ckwc-integration.php:774 543 msgid "The number of minutes to wait before considering a cart abandoned." 544 msgstr "" 545 546 #: includes/class-ckwc-integration.php:788 547 msgid "Abandoned Cart: Tag" 548 msgstr "" 549 550 #: includes/class-ckwc-integration.php:791 551 msgid "The Kit tag to subscribe visitors to when they abandon their cart. This can be used in a Sequence or Automation to send abandoned cart emails to the subscriber. This tag is removed when the customer completes the checkout process." 552 msgstr "" 553 554 #: includes/class-ckwc-integration.php:802 519 555 msgid "Debug" 520 556 msgstr "" 521 557 522 #: includes/class-ckwc-integration.php: 756558 #: includes/class-ckwc-integration.php:804 523 559 msgid "Write data to a log file" 524 560 msgstr "" 525 561 526 #: includes/class-ckwc-integration.php: 761562 #: includes/class-ckwc-integration.php:809 527 563 msgid "View log file" 528 564 msgstr "" 529 565 530 #: includes/class-ckwc-integration.php:8 31566 #: includes/class-ckwc-integration.php:879 531 567 msgid "Do you want to send past WooCommerce Orders to Kit?" 532 568 msgstr "" 533 569 534 570 #. translators: Number of WooCommerce Orders 535 #: includes/class-ckwc-integration.php:10 11571 #: includes/class-ckwc-integration.php:1070 536 572 #, php-format 537 573 msgid "%s not been sent to Kit based on the Purchase Data Event setting above. This is either because sending purchase data is/was disabled, and/or orders were created prior to installing this integration.<br />Use the sync button to send data for these orders to Kit." … … 539 575 540 576 #. translators: number of Orders not sent to ConvertKit 541 #: includes/class-ckwc-integration.php:10 14577 #: includes/class-ckwc-integration.php:1073 542 578 #, php-format 543 579 msgid "%s WooCommerce order has" … … 633 669 634 670 #. translators: %1$s: PHP class name 635 #: includes/class-wp-ckwc.php:29 8671 #: includes/class-wp-ckwc.php:299 636 672 #, php-format 637 673 msgid "Kit for WooCommerce Error: Could not load Plugin class <strong>%1$s</strong>" 638 674 msgstr "" 639 675 640 #: includes/class-wp-ckwc.php:30 8676 #: includes/class-wp-ckwc.php:309 641 677 msgid "Kit for WooCommerce Error" 642 678 msgstr "" … … 742 778 msgstr "" 743 779 744 #: views/backend/subscription-dropdown-field.php:2 4780 #: views/backend/subscription-dropdown-field.php:27 745 781 msgid "Sequences" 746 782 msgstr "" 747 783 748 #: views/backend/subscription-dropdown-field.php: 37784 #: views/backend/subscription-dropdown-field.php:44 749 785 msgid "Forms" 750 786 msgstr "" 751 787 752 #: views/backend/subscription-dropdown-field.php: 49788 #: views/backend/subscription-dropdown-field.php:60 753 789 msgid "Tags" 754 790 msgstr "" -
convertkit-for-woocommerce/tags/2.0.5/readme.txt
r3422972 r3442178 6 6 Tested up to: 6.9 7 7 Requires PHP: 7.1 8 Stable tag: 2.0. 48 Stable tag: 2.0.5 9 9 License: GPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 46 46 47 47 == Changelog == 48 49 ### 2.0.5 2026-01-19 50 * Added: Abandoned Cart Functionality 48 51 49 52 ### 2.0.4 2025-12-18 -
convertkit-for-woocommerce/tags/2.0.5/resources/backend/js/integration.js
r3369639 r3442178 11 11 display_opt_in: false, 12 12 send_purchases: false, 13 abandoned_cart: false, 13 14 }; 14 15 … … 33 34 ), 34 35 send_purchases: $('input[name="woocommerce_ckwc_send_purchases"]').prop( 36 'checked' 37 ), 38 abandoned_cart: $('input[name="woocommerce_ckwc_abandoned_cart"]').prop( 35 39 'checked' 36 40 ), … … 95 99 } 96 100 }); 97 98 // Don't do anything else.99 break;100 101 } 101 102 } -
convertkit-for-woocommerce/tags/2.0.5/views/backend/subscription-dropdown-field.php
r2766502 r3442178 22 22 </option> 23 23 24 <optgroup label="<?php esc_attr_e( 'Sequences', 'woocommerce-convertkit' ); ?>" id="ckwc-sequences" data-option-value-prefix="course:"> 24 <?php 25 if ( isset( $subscription['sequences'] ) ) { 26 ?> 27 <optgroup label="<?php esc_attr_e( 'Sequences', 'woocommerce-convertkit' ); ?>" id="ckwc-sequences" data-option-value-prefix="course:"> 28 <?php 29 if ( $subscription['sequences']->exist() ) { 30 foreach ( $subscription['sequences']->get() as $sequence ) { 31 // 'course:' is deliberate for backward compat. functionality when Sequences used to be called Courses. 32 ?> 33 <option value="course:<?php echo esc_attr( $sequence['id'] ); ?>"<?php selected( 'course:' . esc_attr( $sequence['id'] ), $subscription['value'] ); ?>><?php echo esc_html( $sequence['name'] ); ?></option> 34 <?php 35 } 36 } 37 ?> 38 </optgroup> 25 39 <?php 26 if ( $subscription['sequences']->exist() ) { 27 foreach ( $subscription['sequences']->get() as $sequence ) { 28 // 'course:' is deliberate for backward compat. functionality when Sequences used to be called Courses. 29 ?> 30 <option value="course:<?php echo esc_attr( $sequence['id'] ); ?>"<?php selected( 'course:' . esc_attr( $sequence['id'] ), $subscription['value'] ); ?>><?php echo esc_html( $sequence['name'] ); ?></option> 31 <?php 40 } 41 42 if ( isset( $subscription['forms'] ) ) { 43 ?> 44 <optgroup label="<?php esc_attr_e( 'Forms', 'woocommerce-convertkit' ); ?>" id="ckwc-forms" data-option-value-prefix="form:"> 45 <?php 46 if ( $subscription['forms']->exist() ) { 47 foreach ( $subscription['forms']->get() as $form ) { 48 ?> 49 <option value="form:<?php echo esc_attr( $form['id'] ); ?>"<?php selected( 'form:' . esc_attr( $form['id'] ), $subscription['value'] ); ?>><?php echo esc_html( $form['name'] ); ?></option> 50 <?php 51 } 32 52 } 33 } 53 ?> 54 </optgroup> 55 <?php 56 } 57 58 if ( isset( $subscription['tags'] ) ) { 34 59 ?> 35 </optgroup> 36 37 <optgroup label="<?php esc_attr_e( 'Forms', 'woocommerce-convertkit' ); ?>" id="ckwc-forms" data-option-value-prefix="form:"> 60 <optgroup label="<?php esc_attr_e( 'Tags', 'woocommerce-convertkit' ); ?>" id="ckwc-tags" data-option-value-prefix="tag:"> 61 <?php 62 if ( $subscription['tags']->exist() ) { 63 foreach ( $subscription['tags']->get() as $convertkit_tag ) { 64 ?> 65 <option value="tag:<?php echo esc_attr( $convertkit_tag['id'] ); ?>"<?php selected( 'tag:' . esc_attr( $convertkit_tag['id'] ), $subscription['value'] ); ?>><?php echo esc_html( $convertkit_tag['name'] ); ?></option> 66 <?php 67 } 68 } 69 ?> 70 </optgroup> 38 71 <?php 39 if ( $subscription['forms']->exist() ) { 40 foreach ( $subscription['forms']->get() as $form ) { 41 ?> 42 <option value="form:<?php echo esc_attr( $form['id'] ); ?>"<?php selected( 'form:' . esc_attr( $form['id'] ), $subscription['value'] ); ?>><?php echo esc_html( $form['name'] ); ?></option> 43 <?php 44 } 45 } 46 ?> 47 </optgroup> 48 49 <optgroup label="<?php esc_attr_e( 'Tags', 'woocommerce-convertkit' ); ?>" id="ckwc-tags" data-option-value-prefix="tag:"> 50 <?php 51 if ( $subscription['tags']->exist() ) { 52 foreach ( $subscription['tags']->get() as $convertkit_tag ) { 53 ?> 54 <option value="tag:<?php echo esc_attr( $convertkit_tag['id'] ); ?>"<?php selected( 'tag:' . esc_attr( $convertkit_tag['id'] ), $subscription['value'] ); ?>><?php echo esc_html( $convertkit_tag['name'] ); ?></option> 55 <?php 56 } 57 } 58 ?> 59 </optgroup> 72 } 73 ?> 60 74 </select> -
convertkit-for-woocommerce/tags/2.0.5/woocommerce-convertkit.php
r3422972 r3442178 10 10 * Plugin URI: https://www.kit.com 11 11 * Description: Integrates WooCommerce with Kit, allowing customers to be automatically sent to your Kit account. 12 * Version: 2.0. 412 * Version: 2.0.5 13 13 * Author: Kit 14 14 * Author URI: https://www.kit.com … … 31 31 define( 'CKWC_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 32 32 define( 'CKWC_PLUGIN_PATH', __DIR__ ); 33 define( 'CKWC_PLUGIN_VERSION', '2.0. 4' );33 define( 'CKWC_PLUGIN_VERSION', '2.0.5' ); 34 34 define( 'CKWC_OAUTH_CLIENT_ID', 'L0kyADsB3WP5zO5MvUpXQU64gIntQg9BBAIme17r_7A' ); 35 35 define( 'CKWC_OAUTH_CLIENT_REDIRECT_URI', 'https://app.kit.com/wordpress/redirect' ); … … 53 53 require_once CKWC_PLUGIN_PATH . '/includes/functions.php'; 54 54 require_once CKWC_PLUGIN_PATH . '/includes/class-wp-ckwc.php'; 55 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-abandoned-cart.php'; 55 56 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-admin-notices.php'; 56 57 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-api.php'; … … 75 76 require_once CKWC_PLUGIN_PATH . '/admin/class-ckwc-admin-quick-edit.php'; 76 77 require_once CKWC_PLUGIN_PATH . '/admin/class-ckwc-admin-refresh-resources.php'; 78 79 // Register Plugin activation and deactivation functions. 80 register_activation_hook( __FILE__, 'ckwc_plugin_activate' ); 81 add_action( 'wp_insert_site', 'ckwc_plugin_activate_new_site' ); 82 add_action( 'activate_blog', 'ckwc_plugin_activate_new_site' ); 83 register_deactivation_hook( __FILE__, 'ckwc_plugin_deactivate' ); 77 84 78 85 /** -
convertkit-for-woocommerce/trunk/includes/class-ckwc-integration.php
r3411835 r3442178 521 521 522 522 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 523 'class' => 'enabled subscribe',523 'class' => 'enabled', 524 524 ), 525 525 'subscription' => array( 526 'title' => __( 'Subscription', 'woocommerce-convertkit' ), 527 'type' => 'subscription', 528 'default' => '', 529 'description' => __( 'The Kit form, tag or sequence to subscribe customers to.', 'woocommerce-convertkit' ), 530 531 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 532 'class' => 'enabled subscribe', 526 'title' => __( 'Subscription', 'woocommerce-convertkit' ), 527 'type' => 'subscription', 528 'default' => '', 529 'description' => __( 'The Kit form, tag or sequence to subscribe customers to.', 'woocommerce-convertkit' ), 530 'include_forms' => true, 531 'include_tags' => true, 532 'include_sequences' => true, 533 534 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 535 'class' => 'enabled', 533 536 ), 534 537 'name_format' => array( … … 545 548 546 549 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 547 'class' => 'enabled subscribe',550 'class' => 'enabled', 548 551 ), 549 552 … … 556 559 557 560 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 558 'class' => 'enabled subscribe',561 'class' => 'enabled', 559 562 ), 560 563 'custom_field_phone' => array( … … 565 568 566 569 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 567 'class' => 'enabled subscribe',570 'class' => 'enabled', 568 571 ), 569 572 'custom_field_billing_address' => array( … … 574 577 575 578 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 576 'class' => 'enabled subscribe',579 'class' => 'enabled', 577 580 ), 578 581 'custom_field_shipping_address' => array( … … 583 586 584 587 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 585 'class' => 'enabled subscribe',588 'class' => 'enabled', 586 589 ), 587 590 'custom_field_address_format' => array( … … 620 623 621 624 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 622 'class' => 'enabled subscribe',625 'class' => 'enabled', 623 626 ), 624 627 'custom_field_customer_note' => array( … … 629 632 630 633 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 631 'class' => 'enabled subscribe',634 'class' => 'enabled', 632 635 ), 633 636 … … 646 649 647 650 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 648 'class' => 'enabled subscribe',651 'class' => 'enabled', 649 652 ), 650 653 'opt_in_label' => array( … … 656 659 657 660 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 658 'class' => 'enabled subscribedisplay_opt_in',661 'class' => 'enabled display_opt_in', 659 662 ), 660 663 'opt_in_status' => array( … … 670 673 671 674 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 672 'class' => 'enabled subscribedisplay_opt_in',675 'class' => 'enabled display_opt_in', 673 676 ), 674 677 'opt_in_location' => array( … … 684 687 685 688 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 686 'class' => 'enabled subscribedisplay_opt_in',689 'class' => 'enabled display_opt_in', 687 690 ), 688 691 … … 701 704 702 705 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 703 'class' => 'enabled subscribe',706 'class' => 'enabled', 704 707 ), 705 708 'send_purchases_event' => array( … … 732 735 733 736 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 734 'class' => 'enabled s ubscribe send_purchases',737 'class' => 'enabled send_purchases', 735 738 ), 736 739 'sync_past_orders' => array( … … 747 750 748 751 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 749 'class' => 'enabled subscribe', 752 'class' => 'enabled send_purchases', 753 ), 754 755 // Abandoned Cart. 756 'abandoned_cart' => array( 757 'title' => __( 'Abandoned Cart', 'woocommerce-convertkit' ), 758 'label' => __( 'Send abandoned cart data to Kit.', 'woocommerce-convertkit' ), 759 'type' => 'checkbox', 760 'default' => 'no', 761 'description' => __( 762 'If enabled, the visitor will be subscribed to a tag in Kit, if they leave items in their cart without completing the checkout process after the below number of minutes. The tag is removed when they complete checkout.', 763 'woocommerce-convertkit' 764 ), 765 'desc_tip' => false, 766 767 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 768 'class' => 'enabled', 769 ), 770 'abandoned_cart_threshold' => array( 771 'title' => __( 'Abandoned Cart: Threshold', 'woocommerce-convertkit' ), 772 'type' => 'number', 773 'default' => 15, 774 'description' => __( 'The number of minutes to wait before considering a cart abandoned.', 'woocommerce-convertkit' ), 775 'desc_tip' => false, 776 777 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 778 'class' => 'enabled abandoned_cart', 779 780 // Custom attributes for the number input. 781 'custom_attributes' => array( 782 'min' => 1, 783 'max' => 99999, 784 'step' => 1, 785 ), 786 ), 787 'abandoned_cart_subscription' => array( 788 'title' => __( 'Abandoned Cart: Tag', 'woocommerce-convertkit' ), 789 'type' => 'subscription', 790 'default' => '', 791 'description' => __( 'The Kit tag to subscribe visitors to when they abandon their cart. This can be used in a Sequence or Automation to send abandoned cart emails to the subscriber. This tag is removed when the customer completes the checkout process.', 'woocommerce-convertkit' ), 792 'include_forms' => false, 793 'include_tags' => true, 794 'include_sequences' => false, 795 796 // The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility. 797 'class' => 'enabled abandoned_cart', 750 798 ), 751 799 … … 892 940 'custom_attributes' => array(), 893 941 'options' => array(), 942 'include_forms' => false, 943 'include_tags' => false, 944 'include_sequences' => false, 894 945 ); 895 946 … … 913 964 // Get current subscription setting and other settings to render the subscription dropdown field. 914 965 $subscription = array( 915 'id' => 'woocommerce_ckwc_subscription', 916 'class' => 'select ckwc-select2 ' . $data['class'], 917 'name' => $field, 918 'value' => $this->get_option( $key ), 919 'forms' => $this->forms, 920 'tags' => $this->tags, 921 'sequences' => $this->sequences, 966 'id' => $field, 967 'class' => 'select ckwc-select2 ' . $data['class'], 968 'name' => $field, 969 'value' => $this->get_option( $key ), 922 970 ); 971 972 // Include Forms, Tags and Sequences in the subscription dropdown field. 973 if ( $data['include_forms'] ) { 974 $subscription['forms'] = $this->forms; 975 } 976 if ( $data['include_tags'] ) { 977 $subscription['tags'] = $this->tags; 978 } 979 if ( $data['include_sequences'] ) { 980 $subscription['sequences'] = $this->sequences; 981 } 923 982 924 983 ob_start(); -
convertkit-for-woocommerce/trunk/includes/class-ckwc-setup.php
r3273267 r3442178 28 28 if ( $current_version === CKWC_PLUGIN_VERSION ) { 29 29 return; 30 } 31 32 /** 33 * 2.0.5: Register Action Scheduler actions. 34 */ 35 if ( ! $current_version || version_compare( $current_version, '2.0.5', '<' ) ) { 36 add_action( 'shutdown', 'ckwc_schedule_actions' ); 30 37 } 31 38 -
convertkit-for-woocommerce/trunk/includes/class-wp-ckwc.php
r3408882 r3442178 249 249 private function initialize_global() { 250 250 251 $this->classes['abandoned_cart'] = new CKWC_Abandoned_Cart(); 251 252 $this->classes['admin_notices'] = new CKWC_Admin_Notices(); 252 253 $this->classes['checkout'] = new CKWC_Checkout(); -
convertkit-for-woocommerce/trunk/includes/cron-functions.php
r3322555 r3442178 6 6 * @author ConvertKit 7 7 */ 8 9 /** 10 * Subscribe abandoned cart emails to the abandoned cart tag 11 * by checking the WooCommerce sessions table. 12 * 13 * @since 2.0.5 14 */ 15 function ckwc_abandoned_cart() { 16 17 // Bail if the integration is unavailable. 18 if ( ! function_exists( 'WP_CKWC_Integration' ) ) { 19 return; 20 } 21 22 // Bail if the integration is not enabled. 23 if ( ! WP_CKWC_Integration()->is_enabled() ) { 24 return; 25 } 26 27 // Bail if Abandoned Cart is not enabled. 28 if ( ! WP_CKWC_Integration()->get_option_bool( 'abandoned_cart' ) ) { 29 return; 30 } 31 32 // Bail if no tag is configured. 33 $subscription = WP_CKWC_Integration()->get_option( 'abandoned_cart_subscription' ); 34 if ( empty( $subscription ) ) { 35 return; 36 } 37 38 // Get the tag ID. 39 list( $resource_type, $tag_id ) = explode( ':', $subscription ); 40 41 // Calculate the threshold. 42 $threshold = time() - ( absint( WP_CKWC_Integration()->get_option( 'abandoned_cart_threshold' ) ) * MINUTE_IN_SECONDS ); 43 44 // Setup the API. 45 $api = new CKWC_API( 46 CKWC_OAUTH_CLIENT_ID, 47 CKWC_OAUTH_CLIENT_REDIRECT_URI, 48 WP_CKWC_Integration()->get_option( 'access_token' ), 49 WP_CKWC_Integration()->get_option( 'refresh_token' ), 50 WP_CKWC_Integration()->get_option_bool( 'debug' ) 51 ); 52 53 // Get WooCommerce sessions. 54 // WooCommerce does not provide a public native function to fetch all sessions. 55 // We must continue to use a direct query to the woocommerce_sessions table. 56 global $wpdb; 57 $results = $wpdb->get_results( "SELECT session_key, session_value FROM {$wpdb->prefix}woocommerce_sessions" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery 58 59 foreach ( $results as $row ) { 60 // Get the session data. 61 $session_data = maybe_unserialize( $row->session_value ); 62 63 // If no email or timestamp is set, continue. 64 if ( empty( $session_data['ckwc_abandoned_cart_email'] ) || empty( $session_data['ckwc_abandoned_cart_timestamp'] ) ) { 65 continue; 66 } 67 68 $email = $session_data['ckwc_abandoned_cart_email']; 69 $timestamp = intval( $session_data['ckwc_abandoned_cart_timestamp'] ); 70 71 // Check if cart looks abandoned. 72 if ( $timestamp < $threshold ) { 73 // Create subscriber and tag. 74 $api->create_subscriber( $email ); 75 $api->tag_subscriber_by_email( absint( $tag_id ), $email ); 76 77 // Remove session data so we don't trigger this email again. 78 unset( $session_data['ckwc_abandoned_cart_email'] ); 79 unset( $session_data['ckwc_abandoned_cart_timestamp'] ); 80 $wpdb->update( // phpcs:ignore WordPress.DB.DirectDatabaseQuery 81 $wpdb->prefix . 'woocommerce_sessions', 82 array( 'session_value' => maybe_serialize( $session_data ) ), 83 array( 'session_key' => $row->session_key ), 84 array( '%s' ), 85 array( '%s' ) 86 ); 87 } 88 } 89 90 } 91 add_action( 'ckwc_abandoned_cart', 'ckwc_abandoned_cart' ); 8 92 9 93 /** -
convertkit-for-woocommerce/trunk/includes/functions.php
r3411835 r3442178 6 6 * @author ConvertKit 7 7 */ 8 9 /** 10 * Runs the activation and update routines when the plugin is activated. 11 * 12 * @since 2.0.5 13 * 14 * @param bool $network_wide Is network wide activation. 15 */ 16 function ckwc_plugin_activate( $network_wide ) { 17 18 // Check if we are on a multisite install, activating network wide, or a single install. 19 if ( ! is_multisite() || ! $network_wide ) { 20 // Single Site activation. 21 add_action( 'shutdown', 'ckwc_schedule_actions' ); 22 } else { 23 // Multisite network wide activation. 24 $sites = get_sites( 25 array( 26 'number' => 0, 27 ) 28 ); 29 foreach ( $sites as $site ) { 30 switch_to_blog( (int) $site->blog_id ); 31 add_action( 'shutdown', 'ckwc_schedule_actions' ); 32 restore_current_blog(); 33 } 34 } 35 36 } 37 38 /** 39 * Runs the activation and update routines when the plugin is activated 40 * on a WordPress multisite setup. 41 * 42 * @since 2.0.5 43 * 44 * @param WP_Site|int $site_or_blog_id WP_Site or Blog ID. 45 */ 46 function ckwc_plugin_activate_new_site( $site_or_blog_id ) { 47 48 // Check if $site_or_blog_id is a WP_Site or a blog ID. 49 if ( is_a( $site_or_blog_id, 'WP_Site' ) ) { 50 $site_or_blog_id = $site_or_blog_id->blog_id; 51 } 52 53 // Run installation routine. 54 switch_to_blog( $site_or_blog_id ); 55 add_action( 'shutdown', 'ckwc_schedule_actions' ); 56 restore_current_blog(); 57 58 } 59 60 /** 61 * Runs the deactivation routine when the plugin is deactivated. 62 * 63 * @since 2.0.5 64 * 65 * @param bool $network_wide Is network wide deactivation. 66 */ 67 function ckwc_plugin_deactivate( $network_wide ) { 68 69 // Check if we are on a multisite install, activating network wide, or a single install. 70 if ( ! is_multisite() || ! $network_wide ) { 71 // Single Site activation. 72 ckwc_unschedule_actions(); 73 } else { 74 // Multisite network wide activation. 75 $sites = get_sites( 76 array( 77 'number' => 0, 78 ) 79 ); 80 foreach ( $sites as $site ) { 81 switch_to_blog( (int) $site->blog_id ); 82 ckwc_unschedule_actions(); 83 restore_current_blog(); 84 } 85 } 86 87 } 88 89 /** 90 * Schedules the WordPress Cron events. 91 * 92 * @since 2.0.5 93 */ 94 function ckwc_schedule_actions() { 95 96 // Bail if the action scheduler is unavailable. 97 if ( ! function_exists( 'as_schedule_recurring_action' ) ) { 98 return; 99 } 100 101 // Bail if the scheduled action already exists. 102 if ( as_next_scheduled_action( 'ckwc_abandoned_cart' ) ) { 103 return; 104 } 105 106 // Schedule action. 107 as_schedule_recurring_action( 108 time(), 109 15 * MINUTE_IN_SECONDS, 110 'ckwc_abandoned_cart', 111 array(), 112 'ckwc' 113 ); 114 115 } 116 117 /** 118 * Unschedules the WordPress Cron events. 119 * 120 * @since 2.0.5 121 */ 122 function ckwc_unschedule_actions() { 123 124 // Bail if the action scheduler is unavailable. 125 if ( ! function_exists( 'as_unschedule_all_actions' ) ) { 126 return; 127 } 128 129 // Unschedule action. 130 as_unschedule_all_actions( 'ckwc_abandoned_cart' ); 131 132 } 8 133 9 134 /** -
convertkit-for-woocommerce/trunk/languages/woocommerce-convertkit.pot
r3422972 r3442178 1 # Copyright (C) 202 5Kit1 # Copyright (C) 2026 Kit 2 2 # This file is distributed under the GPLv3 or later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Kit (formerly ConvertKit) for WooCommerce 2.0. 4\n"5 "Project-Id-Version: Kit (formerly ConvertKit) for WooCommerce 2.0.5\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: 202 5-12-18T10:49:33+00:00\n"12 "POT-Creation-Date: 2026-01-16T03:18:38+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 74 74 msgstr "" 75 75 76 #: includes/class-ckwc-abandoned-cart.php:105 77 msgid "Email is required." 78 msgstr "" 79 80 #: includes/class-ckwc-abandoned-cart.php:112 81 msgid "Invalid email." 82 msgstr "" 83 76 84 #: includes/class-ckwc-admin-notices.php:64 77 85 msgid "Kit for WooCommerce: Authorization failed. Please" … … 279 287 280 288 #: includes/class-ckwc-integration.php:504 281 #: includes/class-ckwc-integration.php:71 6289 #: includes/class-ckwc-integration.php:719 282 290 msgid "Processing:" 283 291 msgstr "" 284 292 285 293 #: includes/class-ckwc-integration.php:505 286 #: includes/class-ckwc-integration.php:7 17294 #: includes/class-ckwc-integration.php:720 287 295 msgid "WooCommerce order created, payment received, order awaiting fulfilment." 288 296 msgstr "" 289 297 290 298 #: includes/class-ckwc-integration.php:510 291 #: includes/class-ckwc-integration.php:72 2299 #: includes/class-ckwc-integration.php:725 292 300 msgid "Completed:" 293 301 msgstr "" 294 302 295 303 #: includes/class-ckwc-integration.php:511 296 #: includes/class-ckwc-integration.php:72 3304 #: includes/class-ckwc-integration.php:726 297 305 msgid "WooCommerce order created, payment received, order fulfiled." 298 306 msgstr "" … … 303 311 304 312 #: includes/class-ckwc-integration.php:518 305 #: includes/class-ckwc-integration.php:7 29313 #: includes/class-ckwc-integration.php:732 306 314 msgid "Order Processing" 307 315 msgstr "" 308 316 309 317 #: includes/class-ckwc-integration.php:519 310 #: includes/class-ckwc-integration.php:73 0318 #: includes/class-ckwc-integration.php:733 311 319 msgid "Order Completed" 312 320 msgstr "" … … 320 328 msgstr "" 321 329 322 #: includes/class-ckwc-integration.php:53 5330 #: includes/class-ckwc-integration.php:538 323 331 msgid "Name Format" 324 332 msgstr "" 325 333 326 #: includes/class-ckwc-integration.php:5 38334 #: includes/class-ckwc-integration.php:541 327 335 msgid "How should the customer name be sent to Kit?" 328 336 msgstr "" 329 337 330 #: includes/class-ckwc-integration.php:54 1338 #: includes/class-ckwc-integration.php:544 331 339 msgid "Billing First Name" 332 340 msgstr "" 333 341 334 #: includes/class-ckwc-integration.php:54 2342 #: includes/class-ckwc-integration.php:545 335 343 msgid "Billing Last Name" 336 344 msgstr "" 337 345 338 #: includes/class-ckwc-integration.php:54 3346 #: includes/class-ckwc-integration.php:546 339 347 msgid "Billing First Name + Billing Last Name" 340 348 msgstr "" 341 349 342 #: includes/class-ckwc-integration.php:55 2350 #: includes/class-ckwc-integration.php:555 343 351 msgid "Send Last Name" 344 352 msgstr "" 345 353 346 #: includes/class-ckwc-integration.php:55 5354 #: includes/class-ckwc-integration.php:558 347 355 msgid "The Kit custom field to store the order's last name." 348 356 msgstr "" 349 357 350 #: includes/class-ckwc-integration.php:56 1358 #: includes/class-ckwc-integration.php:564 351 359 msgid "Send Phone Number" 352 360 msgstr "" 353 361 354 #: includes/class-ckwc-integration.php:56 4362 #: includes/class-ckwc-integration.php:567 355 363 msgid "The Kit custom field to store the order's phone number." 356 364 msgstr "" 357 365 358 #: includes/class-ckwc-integration.php:57 0366 #: includes/class-ckwc-integration.php:573 359 367 msgid "Send Billing Address" 360 368 msgstr "" 361 369 362 #: includes/class-ckwc-integration.php:57 3370 #: includes/class-ckwc-integration.php:576 363 371 msgid "The Kit custom field to store the order's billing address." 364 372 msgstr "" 365 373 366 #: includes/class-ckwc-integration.php:5 79374 #: includes/class-ckwc-integration.php:582 367 375 msgid "Send Shipping Address" 368 376 msgstr "" 369 377 370 #: includes/class-ckwc-integration.php:58 2378 #: includes/class-ckwc-integration.php:585 371 379 msgid "The Kit custom field to store the order's shipping address." 372 380 msgstr "" 373 381 374 #: includes/class-ckwc-integration.php:5 88382 #: includes/class-ckwc-integration.php:591 375 383 msgid "Address Format" 376 384 msgstr "" 377 385 378 #: includes/class-ckwc-integration.php: 599386 #: includes/class-ckwc-integration.php:602 379 387 msgid "The format of the billing and shipping addresses to store in Kit." 380 388 msgstr "" 381 389 382 #: includes/class-ckwc-integration.php:60 2390 #: includes/class-ckwc-integration.php:605 383 391 msgid "Name" 384 392 msgstr "" 385 393 386 #: includes/class-ckwc-integration.php:60 3394 #: includes/class-ckwc-integration.php:606 387 395 msgid "Company Name" 388 396 msgstr "" 389 397 390 #: includes/class-ckwc-integration.php:60 4398 #: includes/class-ckwc-integration.php:607 391 399 msgid "Address 1" 392 400 msgstr "" 393 401 394 #: includes/class-ckwc-integration.php:60 5402 #: includes/class-ckwc-integration.php:608 395 403 msgid "Address 2" 396 404 msgstr "" 397 405 398 #: includes/class-ckwc-integration.php:60 6406 #: includes/class-ckwc-integration.php:609 399 407 msgid "City" 400 408 msgstr "" 401 409 402 #: includes/class-ckwc-integration.php:6 07410 #: includes/class-ckwc-integration.php:610 403 411 msgid "State" 404 412 msgstr "" 405 413 406 #: includes/class-ckwc-integration.php:6 08414 #: includes/class-ckwc-integration.php:611 407 415 msgid "Postcode" 408 416 msgstr "" 409 417 410 #: includes/class-ckwc-integration.php:6 09418 #: includes/class-ckwc-integration.php:612 411 419 msgid "Country" 412 420 msgstr "" 413 421 414 #: includes/class-ckwc-integration.php:61 6422 #: includes/class-ckwc-integration.php:619 415 423 msgid "Send Payment Method" 416 424 msgstr "" 417 425 418 #: includes/class-ckwc-integration.php:6 19426 #: includes/class-ckwc-integration.php:622 419 427 msgid "The Kit custom field to store the order's payment method." 420 428 msgstr "" 421 429 422 #: includes/class-ckwc-integration.php:62 5430 #: includes/class-ckwc-integration.php:628 423 431 msgid "Send Customer Note" 424 432 msgstr "" 425 433 426 #: includes/class-ckwc-integration.php:6 28434 #: includes/class-ckwc-integration.php:631 427 435 msgid "The Kit custom field to store the order's customer note." 428 436 msgstr "" 429 437 430 #: includes/class-ckwc-integration.php:63 6438 #: includes/class-ckwc-integration.php:639 431 439 msgid "Opt-In Checkbox" 432 440 msgstr "" 433 441 434 #: includes/class-ckwc-integration.php:6 37442 #: includes/class-ckwc-integration.php:640 435 443 msgid "Display an opt-in checkbox on checkout" 436 444 msgstr "" 437 445 438 #: includes/class-ckwc-integration.php:64 0446 #: includes/class-ckwc-integration.php:643 439 447 msgid "" 440 448 "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" … … 442 450 msgstr "" 443 451 444 #: includes/class-ckwc-integration.php:65 1452 #: includes/class-ckwc-integration.php:654 445 453 msgid "Opt-In Checkbox: Label" 446 454 msgstr "" 447 455 448 #: includes/class-ckwc-integration.php:65 3456 #: includes/class-ckwc-integration.php:656 449 457 msgid "I want to subscribe to the newsletter" 450 458 msgstr "" 451 459 452 #: includes/class-ckwc-integration.php:65 4460 #: includes/class-ckwc-integration.php:657 453 461 msgid "Customize the label next to the opt-in checkbox." 454 462 msgstr "" 455 463 456 #: includes/class-ckwc-integration.php:66 1464 #: includes/class-ckwc-integration.php:664 457 465 msgid "Opt-In Checkbox: Default Status" 458 466 msgstr "" 459 467 460 #: includes/class-ckwc-integration.php:66 4468 #: includes/class-ckwc-integration.php:667 461 469 msgid "The default state of the opt-in checkbox." 462 470 msgstr "" 463 471 464 #: includes/class-ckwc-integration.php:6 67472 #: includes/class-ckwc-integration.php:670 465 473 msgid "Checked" 466 474 msgstr "" 467 475 468 #: includes/class-ckwc-integration.php:6 68476 #: includes/class-ckwc-integration.php:671 469 477 msgid "Unchecked" 470 478 msgstr "" 471 479 472 #: includes/class-ckwc-integration.php:67 5480 #: includes/class-ckwc-integration.php:678 473 481 msgid "Opt-In Checkbox: Display Location" 474 482 msgstr "" 475 483 476 #: includes/class-ckwc-integration.php:6 78484 #: includes/class-ckwc-integration.php:681 477 485 msgid "Where to display the opt-in checkbox on the checkout page (under \"Billing details\" or \"Additional information\")." 478 486 msgstr "" 479 487 480 #: includes/class-ckwc-integration.php:68 1488 #: includes/class-ckwc-integration.php:684 481 489 msgid "Billing" 482 490 msgstr "" 483 491 484 #: includes/class-ckwc-integration.php:68 2492 #: includes/class-ckwc-integration.php:685 485 493 msgid "Order" 486 494 msgstr "" 487 495 488 #: includes/class-ckwc-integration.php:69 1496 #: includes/class-ckwc-integration.php:694 489 497 msgid "Purchase Data" 490 498 msgstr "" 491 499 492 #: includes/class-ckwc-integration.php:69 2500 #: includes/class-ckwc-integration.php:695 493 501 msgid "Send purchase data to Kit." 494 502 msgstr "" 495 503 496 #: includes/class-ckwc-integration.php:69 5504 #: includes/class-ckwc-integration.php:698 497 505 msgid "" 498 506 "If enabled, the customer's order data will be sent to Kit. Their email address will always be subscribed to Kit, <strong>regardless of the Customer's opt in status.</strong><br />\n" … … 500 508 msgstr "" 501 509 502 #: includes/class-ckwc-integration.php:70 6510 #: includes/class-ckwc-integration.php:709 503 511 msgid "Purchase Data Event" 504 512 msgstr "" 505 513 506 #: includes/class-ckwc-integration.php:71 2514 #: includes/class-ckwc-integration.php:715 507 515 msgid "When should purchase data be sent?" 508 516 msgstr "" 509 517 510 #: includes/class-ckwc-integration.php:7 37518 #: includes/class-ckwc-integration.php:740 511 519 msgid "Sync Past Orders" 512 520 msgstr "" 513 521 514 #: includes/class-ckwc-integration.php:7 38522 #: includes/class-ckwc-integration.php:741 515 523 msgid "Send old purchase data to Kit i.e. Orders that were created in WooCommerce prior to this Plugin being installed." 516 524 msgstr "" 517 525 518 #: includes/class-ckwc-integration.php:754 526 #: includes/class-ckwc-integration.php:757 527 msgid "Abandoned Cart" 528 msgstr "" 529 530 #: includes/class-ckwc-integration.php:758 531 msgid "Send abandoned cart data to Kit." 532 msgstr "" 533 534 #: includes/class-ckwc-integration.php:761 535 msgid "If enabled, the visitor will be subscribed to a tag in Kit, if they leave items in their cart without completing the checkout process after the below number of minutes. The tag is removed when they complete checkout." 536 msgstr "" 537 538 #: includes/class-ckwc-integration.php:771 539 msgid "Abandoned Cart: Threshold" 540 msgstr "" 541 542 #: includes/class-ckwc-integration.php:774 543 msgid "The number of minutes to wait before considering a cart abandoned." 544 msgstr "" 545 546 #: includes/class-ckwc-integration.php:788 547 msgid "Abandoned Cart: Tag" 548 msgstr "" 549 550 #: includes/class-ckwc-integration.php:791 551 msgid "The Kit tag to subscribe visitors to when they abandon their cart. This can be used in a Sequence or Automation to send abandoned cart emails to the subscriber. This tag is removed when the customer completes the checkout process." 552 msgstr "" 553 554 #: includes/class-ckwc-integration.php:802 519 555 msgid "Debug" 520 556 msgstr "" 521 557 522 #: includes/class-ckwc-integration.php: 756558 #: includes/class-ckwc-integration.php:804 523 559 msgid "Write data to a log file" 524 560 msgstr "" 525 561 526 #: includes/class-ckwc-integration.php: 761562 #: includes/class-ckwc-integration.php:809 527 563 msgid "View log file" 528 564 msgstr "" 529 565 530 #: includes/class-ckwc-integration.php:8 31566 #: includes/class-ckwc-integration.php:879 531 567 msgid "Do you want to send past WooCommerce Orders to Kit?" 532 568 msgstr "" 533 569 534 570 #. translators: Number of WooCommerce Orders 535 #: includes/class-ckwc-integration.php:10 11571 #: includes/class-ckwc-integration.php:1070 536 572 #, php-format 537 573 msgid "%s not been sent to Kit based on the Purchase Data Event setting above. This is either because sending purchase data is/was disabled, and/or orders were created prior to installing this integration.<br />Use the sync button to send data for these orders to Kit." … … 539 575 540 576 #. translators: number of Orders not sent to ConvertKit 541 #: includes/class-ckwc-integration.php:10 14577 #: includes/class-ckwc-integration.php:1073 542 578 #, php-format 543 579 msgid "%s WooCommerce order has" … … 633 669 634 670 #. translators: %1$s: PHP class name 635 #: includes/class-wp-ckwc.php:29 8671 #: includes/class-wp-ckwc.php:299 636 672 #, php-format 637 673 msgid "Kit for WooCommerce Error: Could not load Plugin class <strong>%1$s</strong>" 638 674 msgstr "" 639 675 640 #: includes/class-wp-ckwc.php:30 8676 #: includes/class-wp-ckwc.php:309 641 677 msgid "Kit for WooCommerce Error" 642 678 msgstr "" … … 742 778 msgstr "" 743 779 744 #: views/backend/subscription-dropdown-field.php:2 4780 #: views/backend/subscription-dropdown-field.php:27 745 781 msgid "Sequences" 746 782 msgstr "" 747 783 748 #: views/backend/subscription-dropdown-field.php: 37784 #: views/backend/subscription-dropdown-field.php:44 749 785 msgid "Forms" 750 786 msgstr "" 751 787 752 #: views/backend/subscription-dropdown-field.php: 49788 #: views/backend/subscription-dropdown-field.php:60 753 789 msgid "Tags" 754 790 msgstr "" -
convertkit-for-woocommerce/trunk/readme.txt
r3422972 r3442178 6 6 Tested up to: 6.9 7 7 Requires PHP: 7.1 8 Stable tag: 2.0. 48 Stable tag: 2.0.5 9 9 License: GPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 46 46 47 47 == Changelog == 48 49 ### 2.0.5 2026-01-19 50 * Added: Abandoned Cart Functionality 48 51 49 52 ### 2.0.4 2025-12-18 -
convertkit-for-woocommerce/trunk/resources/backend/js/integration.js
r3369639 r3442178 11 11 display_opt_in: false, 12 12 send_purchases: false, 13 abandoned_cart: false, 13 14 }; 14 15 … … 33 34 ), 34 35 send_purchases: $('input[name="woocommerce_ckwc_send_purchases"]').prop( 36 'checked' 37 ), 38 abandoned_cart: $('input[name="woocommerce_ckwc_abandoned_cart"]').prop( 35 39 'checked' 36 40 ), … … 95 99 } 96 100 }); 97 98 // Don't do anything else.99 break;100 101 } 101 102 } -
convertkit-for-woocommerce/trunk/views/backend/subscription-dropdown-field.php
r2766502 r3442178 22 22 </option> 23 23 24 <optgroup label="<?php esc_attr_e( 'Sequences', 'woocommerce-convertkit' ); ?>" id="ckwc-sequences" data-option-value-prefix="course:"> 24 <?php 25 if ( isset( $subscription['sequences'] ) ) { 26 ?> 27 <optgroup label="<?php esc_attr_e( 'Sequences', 'woocommerce-convertkit' ); ?>" id="ckwc-sequences" data-option-value-prefix="course:"> 28 <?php 29 if ( $subscription['sequences']->exist() ) { 30 foreach ( $subscription['sequences']->get() as $sequence ) { 31 // 'course:' is deliberate for backward compat. functionality when Sequences used to be called Courses. 32 ?> 33 <option value="course:<?php echo esc_attr( $sequence['id'] ); ?>"<?php selected( 'course:' . esc_attr( $sequence['id'] ), $subscription['value'] ); ?>><?php echo esc_html( $sequence['name'] ); ?></option> 34 <?php 35 } 36 } 37 ?> 38 </optgroup> 25 39 <?php 26 if ( $subscription['sequences']->exist() ) { 27 foreach ( $subscription['sequences']->get() as $sequence ) { 28 // 'course:' is deliberate for backward compat. functionality when Sequences used to be called Courses. 29 ?> 30 <option value="course:<?php echo esc_attr( $sequence['id'] ); ?>"<?php selected( 'course:' . esc_attr( $sequence['id'] ), $subscription['value'] ); ?>><?php echo esc_html( $sequence['name'] ); ?></option> 31 <?php 40 } 41 42 if ( isset( $subscription['forms'] ) ) { 43 ?> 44 <optgroup label="<?php esc_attr_e( 'Forms', 'woocommerce-convertkit' ); ?>" id="ckwc-forms" data-option-value-prefix="form:"> 45 <?php 46 if ( $subscription['forms']->exist() ) { 47 foreach ( $subscription['forms']->get() as $form ) { 48 ?> 49 <option value="form:<?php echo esc_attr( $form['id'] ); ?>"<?php selected( 'form:' . esc_attr( $form['id'] ), $subscription['value'] ); ?>><?php echo esc_html( $form['name'] ); ?></option> 50 <?php 51 } 32 52 } 33 } 53 ?> 54 </optgroup> 55 <?php 56 } 57 58 if ( isset( $subscription['tags'] ) ) { 34 59 ?> 35 </optgroup> 36 37 <optgroup label="<?php esc_attr_e( 'Forms', 'woocommerce-convertkit' ); ?>" id="ckwc-forms" data-option-value-prefix="form:"> 60 <optgroup label="<?php esc_attr_e( 'Tags', 'woocommerce-convertkit' ); ?>" id="ckwc-tags" data-option-value-prefix="tag:"> 61 <?php 62 if ( $subscription['tags']->exist() ) { 63 foreach ( $subscription['tags']->get() as $convertkit_tag ) { 64 ?> 65 <option value="tag:<?php echo esc_attr( $convertkit_tag['id'] ); ?>"<?php selected( 'tag:' . esc_attr( $convertkit_tag['id'] ), $subscription['value'] ); ?>><?php echo esc_html( $convertkit_tag['name'] ); ?></option> 66 <?php 67 } 68 } 69 ?> 70 </optgroup> 38 71 <?php 39 if ( $subscription['forms']->exist() ) { 40 foreach ( $subscription['forms']->get() as $form ) { 41 ?> 42 <option value="form:<?php echo esc_attr( $form['id'] ); ?>"<?php selected( 'form:' . esc_attr( $form['id'] ), $subscription['value'] ); ?>><?php echo esc_html( $form['name'] ); ?></option> 43 <?php 44 } 45 } 46 ?> 47 </optgroup> 48 49 <optgroup label="<?php esc_attr_e( 'Tags', 'woocommerce-convertkit' ); ?>" id="ckwc-tags" data-option-value-prefix="tag:"> 50 <?php 51 if ( $subscription['tags']->exist() ) { 52 foreach ( $subscription['tags']->get() as $convertkit_tag ) { 53 ?> 54 <option value="tag:<?php echo esc_attr( $convertkit_tag['id'] ); ?>"<?php selected( 'tag:' . esc_attr( $convertkit_tag['id'] ), $subscription['value'] ); ?>><?php echo esc_html( $convertkit_tag['name'] ); ?></option> 55 <?php 56 } 57 } 58 ?> 59 </optgroup> 72 } 73 ?> 60 74 </select> -
convertkit-for-woocommerce/trunk/woocommerce-convertkit.php
r3422972 r3442178 10 10 * Plugin URI: https://www.kit.com 11 11 * Description: Integrates WooCommerce with Kit, allowing customers to be automatically sent to your Kit account. 12 * Version: 2.0. 412 * Version: 2.0.5 13 13 * Author: Kit 14 14 * Author URI: https://www.kit.com … … 31 31 define( 'CKWC_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 32 32 define( 'CKWC_PLUGIN_PATH', __DIR__ ); 33 define( 'CKWC_PLUGIN_VERSION', '2.0. 4' );33 define( 'CKWC_PLUGIN_VERSION', '2.0.5' ); 34 34 define( 'CKWC_OAUTH_CLIENT_ID', 'L0kyADsB3WP5zO5MvUpXQU64gIntQg9BBAIme17r_7A' ); 35 35 define( 'CKWC_OAUTH_CLIENT_REDIRECT_URI', 'https://app.kit.com/wordpress/redirect' ); … … 53 53 require_once CKWC_PLUGIN_PATH . '/includes/functions.php'; 54 54 require_once CKWC_PLUGIN_PATH . '/includes/class-wp-ckwc.php'; 55 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-abandoned-cart.php'; 55 56 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-admin-notices.php'; 56 57 require_once CKWC_PLUGIN_PATH . '/includes/class-ckwc-api.php'; … … 75 76 require_once CKWC_PLUGIN_PATH . '/admin/class-ckwc-admin-quick-edit.php'; 76 77 require_once CKWC_PLUGIN_PATH . '/admin/class-ckwc-admin-refresh-resources.php'; 78 79 // Register Plugin activation and deactivation functions. 80 register_activation_hook( __FILE__, 'ckwc_plugin_activate' ); 81 add_action( 'wp_insert_site', 'ckwc_plugin_activate_new_site' ); 82 add_action( 'activate_blog', 'ckwc_plugin_activate_new_site' ); 83 register_deactivation_hook( __FILE__, 'ckwc_plugin_deactivate' ); 77 84 78 85 /**
Note: See TracChangeset
for help on using the changeset viewer.