Skip to content

Commit

Permalink
Merge pull request #196 from ConvertKit/use-kit-domain
Browse files Browse the repository at this point in the history
Merge `use-kit-domain`
  • Loading branch information
n7studios authored Oct 1, 2024
2 parents 9b67ad0 + ada35cb commit 7bef6ee
Show file tree
Hide file tree
Showing 32 changed files with 119 additions and 119 deletions.
Binary file added .wordpress-org/banner-1544x500.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed .wordpress-org/banner-1544x500.png
Binary file not shown.
Binary file added .wordpress-org/banner-772x250.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed .wordpress-org/banner-772x250.png
Binary file not shown.
Binary file added .wordpress-org/icon-128x128.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed .wordpress-org/icon-128x128.png
Binary file not shown.
Binary file added .wordpress-org/icon-256x256.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed .wordpress-org/icon-256x256.png
Binary file not shown.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# ConvertKit for WooCommerce

Welcome to the ConvertKit WooCommerce Addon for WordPress repository on GitHub. Here you can view the plugin source code, review open issues, and see releases of the plugin.
Welcome to the Kit (formerly ConvertKit) WooCommerce Addon for WordPress repository on GitHub. Here you can view the plugin source code, review open issues, and see releases of the plugin.

**If you're not a developer, please download the plugin from [WordPress.org](https://wordpress.org/plugins/convertkit-woocommerce/). Downloading and installing directly from GitHub will not work.**

## Support

If you are having issues setting up this plugin on your WordPress site, or have issues with your ConvertKit forms please do the following:
If you are having issues setting up this plugin on your WordPress site, or have issues with your Kit forms please do the following:

* Check the [Knowledge Base](https://help.kit.com/) for an answer to your question.
* If you're still having trouble contact [ConvertKit Support](https://kit.com/support/).
* If you're still having trouble contact [Kit Support](https://kit.com/support/).

## Developers

For ConvertKit Developers, there are guides in the main ConvertKit Plugin repository covering:
For Kit Developers, there are guides in the main Kit Plugin repository covering:
- [Setup](https://github.com/ConvertKit/convertkit-wordpress/blob/main/SETUP.md) - setting up your local environment for development and testing
- [Development](https://github.com/ConvertKit/convertkit-wordpress/blob/main/DEVELOPMENT.md) - best practices for development
- [Testing](https://github.com/ConvertKit/convertkit-wordpress/blob/main/TESTING.md) - how to write and run tests
- [Actions and Filters](ACTIONS-FILTERS.md) - Actions and Filters available to WordPress Developers looking to extend ConvertKit's functionality
- [Actions and Filters](ACTIONS-FILTERS.md) - Actions and Filters available to WordPress Developers looking to extend Kit's functionality

For ConvertKit, there is a separate guide to deploying new versions to wordpress.org:
For Kit, there is a separate guide to deploying new versions to wordpress.org:
- [Deployment](https://github.com/ConvertKit/convertkit-wordpress/blob/main/DEPLOYMENT.md) - how to deploy a new Plugin version to [WordPress.org](https://wordpress.org/plugins/convertkit-for-woocommerce/)

These guides can be applied to this Plugin; there may be some minor differences in terms of .env.testing configuration.
2 changes: 1 addition & 1 deletion admin/class-ckwc-admin-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function sync_past_orders() {
wp_send_json_success(
sprintf(
/* translators: %1$s: WooCommerce Order ID, %2$s: ConvertKit API Purchase ID */
__( 'WooCommerce Order ID #%1$s added to ConvertKit Purchase Data successfully. ConvertKit Purchase ID: #%2$s', 'woocommerce-convertkit' ),
__( 'WooCommerce Order ID #%1$s added to Kit Purchase Data successfully. Kit Purchase ID: #%2$s', 'woocommerce-convertkit' ),
$id,
$result['purchase']['id']
)
Expand Down
2 changes: 1 addition & 1 deletion admin/class-ckwc-admin-post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function enqueue_styles() {
*/
public function add_meta_boxes() {

add_meta_box( 'ckwc', __( 'ConvertKit Integration', 'woocommerce-convertkit' ), array( $this, 'display_meta_box' ), null, 'side', 'default' );
add_meta_box( 'ckwc', __( 'Kit Integration', 'woocommerce-convertkit' ), array( $this, 'display_meta_box' ), null, 'side', 'default' );

}

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "convertkit/convertkit-woocommerce",
"description": "ConvertKit: WooCommerce Addon",
"description": "Kit: WooCommerce Addon",
"type": "project",
"license": "GPLv3",
"require": {
"convertkit/convertkit-wordpress-libraries": "dev-use-kit-domain"
"convertkit/convertkit-wordpress-libraries": "2.0.4"
},
"require-dev": {
"lucatume/wp-browser": "<3.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public function get_metadata() {

return array(
'name' => 'ckwc/opt-in',
'title' => __( 'ConvertKit Opt In', 'woocommerce-convertkit' ),
'title' => __( 'Kit Opt In', 'woocommerce-convertkit' ),
'category' => 'woocommerce',
'description' => __( 'Displays a ConvertKit opt in checkbox at Checkout.', 'woocommerce-convertkit' ),
'description' => __( 'Displays a Kit opt in checkbox at Checkout.', 'woocommerce-convertkit' ),
'keywords' => array(
'subscriber',
'newsletter',
Expand Down Expand Up @@ -195,7 +195,7 @@ public function get_editor_script_handles() {
*
* Typically these would be presented as options to the user in the block
* editor, however this plugin has historically stored the settings
* at WooCommerce > Settings > Integrations > ConvertKit, prior to WooCommerce
* at WooCommerce > Settings > Integrations > Kit, prior to WooCommerce
* introducing the concept of a Checkout Block - so we need to honor those settings.
*
* @since 1.7.1
Expand Down
10 changes: 5 additions & 5 deletions includes/class-ckwc-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function __construct( $client_id, $redirect_uri, $access_token = false, $

'get_subscriber_by_email_email_empty' => __( 'get_subscriber_by_email(): the email parameter is empty.', 'woocommerce-convertkit' ),
/* translators: Email Address */
'get_subscriber_by_email_none' => __( 'No subscriber(s) exist in ConvertKit matching the email address %s.', 'woocommerce-convertkit' ),
'get_subscriber_by_email_none' => __( 'No subscriber(s) exist in Kit matching the email address %s.', 'woocommerce-convertkit' ),

'get_subscriber_by_id_subscriber_id_empty' => __( 'get_subscriber_by_id(): the subscriber_id parameter is empty.', 'woocommerce-convertkit' ),

Expand Down Expand Up @@ -105,10 +105,10 @@ public function __construct( $client_id, $redirect_uri, $access_token = false, $

/* translators: HTTP method */
'request_method_unsupported' => __( 'API request method %s is not supported in ConvertKit_API class.', 'woocommerce-convertkit' ),
'request_rate_limit_exceeded' => __( 'ConvertKit API Error: Rate limit hit.', 'woocommerce-convertkit' ),
'request_internal_server_error' => __( 'ConvertKit API Error: Internal server error.', 'woocommerce-convertkit' ),
'request_bad_gateway' => __( 'ConvertKit API Error: Bad gateway.', 'woocommerce-convertkit' ),
'response_type_unexpected' => __( 'ConvertKit API Error: The response is not of the expected type array.', 'woocommerce-convertkit' ),
'request_rate_limit_exceeded' => __( 'Kit API Error: Rate limit hit.', 'woocommerce-convertkit' ),
'request_internal_server_error' => __( 'Kit API Error: Internal server error.', 'woocommerce-convertkit' ),
'request_bad_gateway' => __( 'Kit API Error: Bad gateway.', 'woocommerce-convertkit' ),
'response_type_unexpected' => __( 'Kit API Error: The response is not of the expected type array.', 'woocommerce-convertkit' ),
);

}
Expand Down
12 changes: 6 additions & 6 deletions includes/class-ckwc-cli-sync-past-orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,27 @@ public function __invoke( $args, $arguments ) {
// Fetch integration.
$this->integration = WP_CKWC_Integration();

WP_CLI::log( __( 'ConvertKit for WooCommerce: Sync Past Orders: Started', 'woocommerce-convertkit' ) );
WP_CLI::log( __( 'Kit for WooCommerce: Sync Past Orders: Started', 'woocommerce-convertkit' ) );

// Bail if the integration isn't enabled.
if ( ! $this->integration->is_enabled() ) {
WP_CLI::error( __( 'Please connect your ConvertKit account and enable the integration at WooCommerce > Settings > Integration > ConvertKit.', 'woocommerce-convertkit' ) );
WP_CLI::error( __( 'Please connect your Kit account and enable the integration at WooCommerce > Settings > Integration > Kit.', 'woocommerce-convertkit' ) );
}

// Fetch all WooCommerce Orders not sent to ConvertKit.
$order_ids = WP_CKWC()->get_class( 'order' )->get_orders_not_sent_to_convertkit();

// Bail if no Orders exist, or all Orders sent to ConvertKit.
if ( ! $order_ids ) {
WP_CLI::log( __( 'No outstanding Orders to send to ConvertKit', 'woocommerce-convertkit' ) );
WP_CLI::log( __( 'No outstanding Orders to send to Kit', 'woocommerce-convertkit' ) );
return;
}

// Log number of orders found.
WP_CLI::log(
sprintf(
/* translators: Number of WooCommerce Orders found not synchronised to ConvertKit */
__( 'ConvertKit for WooCommerce: Sync Past Orders: %s orders found not synchronised to ConvertKit.', 'woocommerce-convertkit' ),
__( 'Kit for WooCommerce: Sync Past Orders: %s orders found not synchronised to Kit.', 'woocommerce-convertkit' ),
count( $order_ids )
)
);
Expand Down Expand Up @@ -94,14 +94,14 @@ public function __invoke( $args, $arguments ) {
WP_CLI::success(
sprintf(
/* translators: %1$s: WooCommerce Order ID, %2$s: ConvertKit API Purchase ID */
__( 'WooCommerce Order ID #%1$s added to ConvertKit Purchase Data successfully. ConvertKit Purchase ID: #%2$s', 'woocommerce-convertkit' ),
__( 'WooCommerce Order ID #%1$s added to Kit Purchase Data successfully. Kit Purchase ID: #%2$s', 'woocommerce-convertkit' ),
$id,
$result['purchase']['id']
)
);
}

WP_CLI::log( 'ConvertKit for WooCommerce: Sync Past Orders: Finished' );
WP_CLI::log( 'Kit for WooCommerce: Sync Past Orders: Finished' );

}

Expand Down
34 changes: 17 additions & 17 deletions includes/class-ckwc-integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public function __construct() {

// Define the ID, Title and Description of this Integration.
$this->id = 'ckwc';
$this->method_title = __( 'ConvertKit', 'woocommerce-convertkit' );
$this->method_description = __( 'Enter your ConvertKit settings below to control how WooCommerce integrates with your ConvertKit account.', 'woocommerce-convertkit' );
$this->method_title = __( 'Kit', 'woocommerce-convertkit' );
$this->method_description = __( 'Enter your Kit settings below to control how WooCommerce integrates with your Kit account.', 'woocommerce-convertkit' );

// Initialize form fields and settings.
$this->init_form_fields();
Expand Down Expand Up @@ -465,7 +465,7 @@ public function init_form_fields() {
'enabled' => array(
'title' => __( 'Enable/Disable', 'woocommerce-convertkit' ),
'type' => 'checkbox',
'label' => __( 'Enable ConvertKit integration', 'woocommerce-convertkit' ),
'label' => __( 'Enable Kit integration', 'woocommerce-convertkit' ),
'default' => 'no',
),

Expand Down Expand Up @@ -512,7 +512,7 @@ public function init_form_fields() {
'title' => __( 'Subscription', 'woocommerce-convertkit' ),
'type' => 'subscription',
'default' => '',
'description' => __( 'The ConvertKit form, tag or sequence to subscribe customers to.', 'woocommerce-convertkit' ),
'description' => __( 'The Kit form, tag or sequence to subscribe customers to.', 'woocommerce-convertkit' ),

// The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility.
'class' => 'enabled subscribe',
Expand All @@ -521,7 +521,7 @@ public function init_form_fields() {
'title' => __( 'Name Format', 'woocommerce-convertkit' ),
'type' => 'select',
'default' => 'first',
'description' => __( 'How should the customer name be sent to ConvertKit?', 'woocommerce-convertkit' ),
'description' => __( 'How should the customer name be sent to Kit?', 'woocommerce-convertkit' ),
'desc_tip' => false,
'options' => array(
'first' => __( 'Billing First Name', 'woocommerce-convertkit' ),
Expand All @@ -538,7 +538,7 @@ public function init_form_fields() {
'title' => __( 'Send Last Name', 'woocommerce-convertkit' ),
'type' => 'custom_field',
'default' => '',
'description' => __( 'The ConvertKit custom field to store the order\'s last name.', 'woocommerce-convertkit' ),
'description' => __( 'The Kit custom field to store the order\'s last name.', 'woocommerce-convertkit' ),

// The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility.
'class' => 'enabled subscribe',
Expand All @@ -547,7 +547,7 @@ public function init_form_fields() {
'title' => __( 'Send Phone Number', 'woocommerce-convertkit' ),
'type' => 'custom_field',
'default' => '',
'description' => __( 'The ConvertKit custom field to store the order\'s phone number.', 'woocommerce-convertkit' ),
'description' => __( 'The Kit custom field to store the order\'s phone number.', 'woocommerce-convertkit' ),

// The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility.
'class' => 'enabled subscribe',
Expand All @@ -556,7 +556,7 @@ public function init_form_fields() {
'title' => __( 'Send Billing Address', 'woocommerce-convertkit' ),
'type' => 'custom_field',
'default' => '',
'description' => __( 'The ConvertKit custom field to store the order\'s billing address.', 'woocommerce-convertkit' ),
'description' => __( 'The Kit custom field to store the order\'s billing address.', 'woocommerce-convertkit' ),

// The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility.
'class' => 'enabled subscribe',
Expand All @@ -565,7 +565,7 @@ public function init_form_fields() {
'title' => __( 'Send Shipping Address', 'woocommerce-convertkit' ),
'type' => 'custom_field',
'default' => '',
'description' => __( 'The ConvertKit custom field to store the order\'s shipping address.', 'woocommerce-convertkit' ),
'description' => __( 'The Kit custom field to store the order\'s shipping address.', 'woocommerce-convertkit' ),

// The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility.
'class' => 'enabled subscribe',
Expand All @@ -583,7 +583,7 @@ public function init_form_fields() {
'title' => __( 'Send Payment Method', 'woocommerce-convertkit' ),
'type' => 'custom_field',
'default' => '',
'description' => __( 'The ConvertKit custom field to store the order\'s payment method.', 'woocommerce-convertkit' ),
'description' => __( 'The Kit custom field to store the order\'s payment method.', 'woocommerce-convertkit' ),

// The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility.
'class' => 'enabled subscribe',
Expand All @@ -592,7 +592,7 @@ public function init_form_fields() {
'title' => __( 'Send Customer Note', 'woocommerce-convertkit' ),
'type' => 'custom_field',
'default' => '',
'description' => __( 'The ConvertKit custom field to store the order\'s customer note.', 'woocommerce-convertkit' ),
'description' => __( 'The Kit custom field to store the order\'s customer note.', 'woocommerce-convertkit' ),

// The setting name that needs to be checked/enabled for this setting to display. Used by JS to toggle visibility.
'class' => 'enabled subscribe',
Expand Down Expand Up @@ -656,12 +656,12 @@ public function init_form_fields() {
// Purchase Data.
'send_purchases' => array(
'title' => __( 'Purchase Data', 'woocommerce-convertkit' ),
'label' => __( 'Send purchase data to ConvertKit.', 'woocommerce-convertkit' ),
'label' => __( 'Send purchase data to Kit.', 'woocommerce-convertkit' ),
'type' => 'checkbox',
'default' => 'no',
'description' => __(
'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 />
If disabled, no order data will be sent to ConvertKit.',
'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 />
If disabled, no order data will be sent to Kit.',
'woocommerce-convertkit'
),
'desc_tip' => false,
Expand Down Expand Up @@ -702,7 +702,7 @@ public function init_form_fields() {
),
'sync_past_orders' => array(
'title' => __( 'Sync Past Orders', 'woocommerce-convertkit' ),
'label' => __( 'Send old purchase data to ConvertKit i.e. Orders that were created in WooCommerce prior to this Plugin being installed.', 'woocommerce-convertkit' ),
'label' => __( 'Send old purchase data to Kit i.e. Orders that were created in WooCommerce prior to this Plugin being installed.', 'woocommerce-convertkit' ),
'type' => 'sync_past_orders_button',
'default' => '',
'desc_tip' => false,
Expand Down Expand Up @@ -795,7 +795,7 @@ public function enqueue_scripts() {
'ckwc-integration',
'ckwc_integration',
array(
'sync_past_orders_confirmation_message' => __( 'Do you want to send past WooCommerce Orders to ConvertKit?', 'woocommerce-convertkit' ),
'sync_past_orders_confirmation_message' => __( 'Do you want to send past WooCommerce Orders to Kit?', 'woocommerce-convertkit' ),
)
);

Expand Down Expand Up @@ -987,7 +987,7 @@ public function generate_sync_past_orders_button_html( $key, $data ) { // phpcs:
// Update the description based on the number of Orders that have not been sent to ConvertKit.
$data['description'] = sprintf(
/* translators: Number of WooCommerce Orders */
__( '%s not been sent to ConvertKit 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 ConvertKit.', 'woocommerce-convertkit' ),
__( '%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.', 'woocommerce-convertkit' ),
sprintf(
/* translators: number of Orders not sent to ConvertKit */
_n( '%s WooCommerce order has', '%s WooCommerce orders have', count( $unsynced_order_ids ), 'woocommerce-convertkit' ),
Expand Down
Loading

0 comments on commit 7bef6ee

Please sign in to comment.