wpdesk/wp-nps
Composer 安装命令:
composer require wpdesk/wp-nps
包简介
Library for displaying NPS in plugins.
关键字:
README 文档
README
NPS
A WordPress library containing interfaces, abstracts and basic implementations to display the plugins-dedicated Net Promoter Score survey form.
Requirements
PHP 7.0 or later.
Installation via Composer
In order to install the bindings via Composer run the following command:
composer reqiure wpdesk/wp-nps
Example usage
Displaying the NPS on Flexible Shipping shipping method's settings screen:
$user_meta_name = 'fs_nps';
$nps = new \WPDesk\Nps\Nps(
'fs_nps',
'satismeter_write_key_here',
'satismeter_campaign_id_here',
'satismeter_feedback_id',
new \WPDesk\Nps\UuidUserId(),
$this->get_plugin_assets_url() . '../vendor_prefixed/wpdesk/wp-nps/assets/',
$this->scripts_version,
new \WPDesk\Nps\DisplayDecisions\DisplayNpsLocationsAndUserDecisions(
[
new \WPDesk\Nps\DisplayDecisions\ShippingMethodDisplayNpsDecision( 'flexible_shipping_single' ),
new \WPDesk\Nps\DisplayDecisions\AdminPageDisplayNpsDecision( [
'page' => 'wc-settings',
'tab' => 'shipping',
'section' => 'flexible_shipping_info',
] ),
],
[
new \WPDesk\Nps\DisplayDecisions\ShippingMethodDisplayNpsDecision( new \WPDesk\Nps\DisplayDecisions\UserDisplayNpsDecision( $user_meta_name ) ),
]
),
$user_meta_name,
admin_url( 'admin-ajax.php' )
);
$nps->set_question( __( 'Hey, we are curious how would you grade your first impression on Flexible Shipping so far?', 'flexible-shipping' ) );
$nps->set_best_label( __( 'Wow, it\'s awesome!', 'flexible-shipping' ) );
$nps->set_worst_label( __( 'Really poor', 'flexible-shipping' ) );
$nps->set_disclaimer(
sprintf(
__( 'By using the \'Send feedback\' button I hereby agree and consent to the terms of %1$sPrivacy Policy%2$s.', 'flexible-shipping' ),
'<a target="_blank" href="https://octolize.com/terms-of-service/privacy-policy/">',
'</a>'
)
);
$nps->add_feedback_option( new FeedbackOption( __( 'More calculation conditions', 'flexible-shipping' ), __( 'What exactly should the conditions you need be based on?', 'flexible-shipping' ) ) )
->add_feedback_option( new FeedbackOption( __( 'More detailed documentation', 'flexible-shipping' ) ) )
->add_feedback_option( new FeedbackOption( __( 'Easier contact with support', 'flexible-shipping' ) ) )
->add_feedback_option( new FeedbackOption( __( 'More user-friendly interface', 'flexible-shipping' ) ) )
->add_feedback_option( new FeedbackOption( __( 'Less complicated settings', 'flexible-shipping' ) ) )
->add_feedback_option( new FeedbackOption( __( 'Too soon to say', 'flexible-shipping' ) ) )
->add_feedback_option( new FeedbackOption( __( 'Other', 'flexible-shipping' ), __( 'Please tell us what exactly can we do to improve our plugin?', 'flexible-shipping' ) ) );
$nps->hooks();
Developers
Please remember to execute: npm run prod before commit!
wpdesk/wp-nps 适用场景与选型建议
wpdesk/wp-nps 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7.57k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 06 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「NPS」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 wpdesk/wp-nps 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wpdesk/wp-nps 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 wpdesk/wp-nps 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Php SDK for Ingenico ePayments - NPS LatAm Services
Laravel nps
PHP 8 Library for NPS Protocol
Core feedback, survey, response, invitation, analytics, and testimonial package for AI Armada applications.
KevaChat App for NPS Protocol
A simple, focused NPS (Net Promoter Score) package for Laravel applications.
统计信息
- 总下载量: 7.57k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-06-03