Documentation

Service
in package
Uses UtilsProvider

Create an example REST Service.

Table of Contents

Methods

getPluginConstantPrefix()  : string
Get the prefix of this package so we can utils package natively.
instance()  : mixed
New instance.
permission_callback()  : mixed
Check if user is allowed to call this service requests.
rest_api_init()  : mixed
Register endpoints.
routeCrossDismiss()  : mixed
See API docs.
routeFeedbackCreate()  : mixed
See API docs.
routeNewsletterSubscribe()  : mixed
See API docs.
routeRatingDismiss()  : mixed
See API docs.
setupConstants()  : mixed
Make sure the REAL_UTILS constants are available.
sendDeactivationFeedbackEmail()  : mixed
Send a deactivation feedback via email. Internally it uses the support form API.
__construct()  : mixed
C'tor.

Methods

getPluginConstantPrefix()

Get the prefix of this package so we can utils package natively.

public getPluginConstantPrefix() : string
Return values
string

instance()

New instance.

public static instance() : mixed
Tags
codeCoverageIgnore

permission_callback()

Check if user is allowed to call this service requests.

public permission_callback() : mixed

rest_api_init()

Register endpoints.

public rest_api_init() : mixed

routeCrossDismiss()

See API docs.

public routeCrossDismiss(WP_REST_Request $request) : mixed
APIYes
Parameters
$request : WP_REST_Request
Tags
apiHeader

{string} X-WP-Nonce

apiParam

{string} slug

apiParam

{string} action

apiParam

{boolean} force

apiName

CrossDismiss

apiPermission

activate_plugins

apiGroup

Service

apiVersion

1.0.0

routeFeedbackCreate()

See API docs.

public routeFeedbackCreate(WP_REST_Request $request) : mixed
APIYes
Parameters
$request : WP_REST_Request
Tags
deprecated

Use package real-product-manager-wp-client instead

apiHeader

{string} X-WP-Nonce

apiParam

{string} slug

apiParam

{string} reason

apiParam

{string} note

apiParam

{string} [email]

apiName

FeedbackCreate

apiPermission

activate_plugins

apiGroup

Service

apiVersion

1.0.0

routeNewsletterSubscribe()

See API docs.

public routeNewsletterSubscribe(WP_REST_Request $request) : mixed
APIYes
Parameters
$request : WP_REST_Request
Tags
apiHeader

{string} X-WP-Nonce

apiParam

{string} slug

apiParam

{string} email

apiParam

{boolean} privacy

apiName

NewsletterSubscribe

apiPermission

activate_plugins

apiGroup

Service

apiVersion

1.0.0

routeRatingDismiss()

See API docs.

public routeRatingDismiss(WP_REST_Request $request) : mixed
APIYes
Parameters
$request : WP_REST_Request
Tags
apiHeader

{string} X-WP-Nonce

apiParam

{string} slug

apiParam

{boolean} force

apiName

RatingDismiss

apiPermission

activate_plugins

apiGroup

Service

apiVersion

1.0.0

setupConstants()

Make sure the REAL_UTILS constants are available.

public static setupConstants() : mixed

sendDeactivationFeedbackEmail()

Send a deactivation feedback via email. Internally it uses the support form API.

protected sendDeactivationFeedbackEmail(string $apiHost, string $slug, string $email, string $reason, string $note) : mixed

There are no validations done for e. g. passed email.

Parameters
$apiHost : string
$slug : string
$email : string
$reason : string
$note : string
Tags
deprecated

Use package real-product-manager-wp-client instead

__construct()

C'tor.

private __construct() : mixed
Tags
codeCoverageIgnore

        
On this page

Search results