Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook chnages #179

Closed
wants to merge 13 commits into from
Closed
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '6131043b9611749a390c');
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '30db1eafa7aef5847551');
24 changes: 12 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions includes/ECommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class ECommerce {
'woocommerce_cheque_settings',
'onboarding_experience_level',
'yoast_seo_signup_status',
'fb_token'
);

/**
Expand Down
12 changes: 12 additions & 0 deletions includes/RestApi/IntegrationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use NewfoldLabs\WP\Module\ECommerce\Permissions;
use NewfoldLabs\WP\Module\Installer\Services\PluginInstaller;
use NewfoldLabs\WP\ModuleLoader\Container;
use NewfoldLabs\WP\Module\Data\HiiveConnection;

class IntegrationsController {

Expand Down Expand Up @@ -64,6 +65,17 @@ public function register_routes() {
),
)
);
\register_rest_route(
$this->namespace,
$this->rest_base . '/hiive',
array(
array(
'methods' => \WP_REST_Server::READABLE,
'callback' => array( $this, 'get_hiive_token' ),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are we using this API? I'm uneasy about passing a Hiive token to the front end.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this endpoint we're using it in facebook module to store facebook token against hiive token as key-value pair in cloudflare

'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ),
),
)
);
}

private function get_plugin_details( $plugin ) {
Expand Down
Loading
Loading