Skip to content

Commit

Permalink
Fix/naming and installation issues (#8)
Browse files Browse the repository at this point in the history
* Rename plugin

* Fix namespace
  • Loading branch information
chrismccluskey authored Nov 14, 2024
1 parent 4da08e0 commit ac4319a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sift Decisions
# Sift for WooCommerce

This plugin will integrate with Sift Science's fraud detection suite and WooCommerce's decisions API.

Expand Down
2 changes: 1 addition & 1 deletion bin/bootstrap-woocommerce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ wp action-scheduler run
wp wc tool run install_pages --user=admin
product=$(wp post list --post_type=product --name=sift-for-woocommerce --ids)
if [[ -z $product ]]; then
wp wc product create --name="Sift Decisions" --regular_price=10 --user=admin
wp wc product create --name="Sift for WooCommerce" --regular_price=10 --user=admin
fi
id=$(wp post list --post_type=page --name=checkout --ids)
wp post update $id - <<EOF
Expand Down
6 changes: 3 additions & 3 deletions languages/sift-for-woocommerce.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is distributed under the GPL v3 or later.
msgid ""
msgstr ""
"Project-Id-Version: Sift Decisions 0.0.1-alpha\n"
"Project-Id-Version: Sift for WooCommerce 0.0.1-alpha\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/sift-for-woocommerce\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -16,7 +16,7 @@ msgstr ""

#. Plugin Name of the plugin
#: src/inc/wc-settings-tab.php:13
msgid "Sift Decisions"
msgid "Sift for WooCommerce"
msgstr ""

#. Plugin URI of the plugin
Expand All @@ -33,7 +33,7 @@ msgid "georgestephanis"
msgstr ""

#: sift-for-woocommerce.php:47
msgid "It seems like <strong>Sift Decisions</strong> is corrupted. Please reinstall!"
msgid "It seems like <strong>Sift for WooCommerce</strong> is corrupted. Please reinstall!"
msgstr ""

#: src/inc/wc-settings-tab.php:45
Expand Down
2 changes: 1 addition & 1 deletion sift-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static function () {
add_action(
'admin_notices',
static function () {
$message = __( 'It seems like <strong>Sift Decisions</strong> is corrupted. Please reinstall!', 'sift-for-woocommerce' );
$message = __( 'It seems like <strong>Sift for WooCommerce</strong> is corrupted. Please reinstall!', 'sift-for-woocommerce' );
$html_message = wp_sprintf( '<div class="error notice wpcomsp-scaffold-error">%s</div>', wpautop( $message ) );
echo wp_kses_post( $html_message );
}
Expand Down
6 changes: 4 additions & 2 deletions src/inc/wc-settings-tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Sift_For_WooCommerce\Sift_For_WooCommerce\WC_Settings_Tab;

use Sift_For_WooCommerce\Sift_For_WooCommerce\Sift_For_WooCommerce;

/**
* Filter to slip in our settings tab.
*
Expand All @@ -12,7 +14,7 @@
* @return array
*/
function add_settings_tab( array $settings_tabs ) {
$settings_tabs['sift_for_woocommerce'] = __( 'Sift Decisions', 'sift-for-woocommerce' );
$settings_tabs['sift_for_woocommerce'] = __( 'Sift for WooCommerce', 'sift-for-woocommerce' );
return $settings_tabs;
}

Expand Down Expand Up @@ -122,7 +124,7 @@ function test_api_credentials_result( $api_key = null, $account_id = null ) {

// TODO: Maybe find a way to leverage the Sift PHP API Client to fire these requests, rather than ad-hoc'ing together an alternate solution.

$client = \Sift_For_WooCommerce\Sift_For_WooCommerce::get_api_client();
$client = Sift_For_WooCommerce::get_api_client();
$response = $client->listAllWebhooks();

$code = $response->httpStatusCode;
Expand Down

0 comments on commit ac4319a

Please sign in to comment.