PHPackages                             hametuha/sharee - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. hametuha/sharee

ActiveLibrary

hametuha/sharee
===============

Library to share revenue to users.

1.0.1(4mo ago)11.5k[2 issues](https://github.com/hametuha/sharee/issues)GPL-3.0-or-laterPHPPHP &gt;=8.2CI failing

Since Oct 9Pushed 4mo agoCompare

[ Source](https://github.com/hametuha/sharee)[ Packagist](https://packagist.org/packages/hametuha/sharee)[ RSS](/packages/hametuha-sharee/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (7)Versions (14)Used By (0)

Sharēe
======

[](#sharēe)

WordPress library for Reward manager.

Installation
------------

[](#installation)

```
composer require hametuha/sharee

```

To enable sharee, call bootstrap method.

```
// Call before after_setup_theme
\Hametuha\Sharee::get_instance();
```

Features
--------

[](#features)

### Reward List

[](#reward-list)

Reward list on WordPress Dashboard.

### Payment List

[](#payment-list)

Payment list is an expected payment list for user's reward. Works fine with [hametuha/hashboard](https://packagist.org/packages/hametuha/hashboard).

```
/**
 * Enable payment list
 *
 * @param bool $enabled Default false.
 * @param bool $service Service name to be enabled.
 */
add_filter( 'sharee_should_enable', function( $enabled, $service ) {
	switch ( $service ) {
		case 'billing': // Billing is billing list.
			return true;
		default:
			return $enabled;
	}
}, 10, 2 );
```

API
---

[](#api)

Sharee has no screen to add reward record. Some lines of code are required.

### Add Record

[](#add-record)

```
// Add revenue.
$result = RevenueModel::get_instance()->add_revenue( 'kdp', $user_id, $price, [
	'unit'        => $unit,
	'total'       => $total,
	'tax'         => $tax,
	'deducting'   => $deducting,
	'description' => $label
] );
if ( $result && ! is_wp_error( $result ) ) {
	$success++;
}
```

Query User
----------

[](#query-user)

There are 2 additional query vars for user query.

- `paid_since`: Filter users who have been paid since the date.
- `paid_until`: Filter users who have been paid until the date.

This works with `WP_User_Query`.

```
// get users who got paid between Year 2018.
$query = new WP_User_Query( [
	'role'        => 'subscriber',
	'paid_since'  => '2018-01-01',
	'paid_until'  => '2018-12-31',
	'number'      => 10,
	'paged'       => 1,
] );
```

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance55

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~219 days

Recently: every ~254 days

Total

13

Last Release

135d ago

Major Versions

0.8.11 → 1.0.02025-12-02

PHP version history (5 changes)0.8.0PHP &gt;=5.5.0

0.8.2PHP ^5.6|^7.0

0.8.5PHP ^7.2|^8

0.8.7PHP &gt;=7.2

1.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/84587?v=4)[Takahashi Fumiki](/maintainers/fumikito)[@fumikito](https://github.com/fumikito)

---

Top Contributors

[![fumikito](https://avatars.githubusercontent.com/u/84587?v=4)](https://github.com/fumikito "fumikito (60 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hametuha-sharee/health.svg)

```
[![Health](https://phpackages.com/badges/hametuha-sharee/health.svg)](https://phpackages.com/packages/hametuha-sharee)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
