• Freelance
  • Anywhere

Website digitalcodenet Digital Code Network

PHP JavaScript WordPress CSS MySQL

(1) Mycred plugin has the feature for reward with credits after a woocommerce purchase.
I need to split those rewards into n° days following the purchase (example 100 days).
Every day, the logs must be updated with the quantities unlocked by the various purchases (example: the log balance history); it will not have to appear all at once. It would be ok an easy snippet in function.php and not to edit the plugin interface.

(2) I use two types of points on my site (both using mycred plugin): Apoints and Bpoints. Apoints are those that are gradually unlocked after the purchase of a product (1). Bpoints are those generated by referrals (affiliatewp plugin). After a referral is generated, I convert the referral into mycred points B (it already works, automatically). What I need is this: The user can only withdraw B points (using mycred cashcred integrated in the plugin) but can only withdraw the amount of points equivalent to the amount of A points unlocked.

Example: Paul buys a product; this product generates 1000 A points in 100 days (10 A points per day). Meanwhile, paul generates 170 B points thanks to referral purchases. The minimum withdrawal amount is 150B points, but you still need to have enough A points to withdraw. So if Paul wants to withdraw 170 B points, he must have unlocked at least 170 A points.
If paul has generated 100 pointsB and 100 pointsA, he cannot withdraw, because on cashcred I have set a minimum amount of 150 points.

The change to be made in point (2) is a check that is added to the minimum payout amount (already present in the cashcred plugin), a subtraction between Apoints and Bpoints. If the result is less than zero, the withdrawal button must be disabled.

To apply for this job email your details to digitalcodenetwork@gmail.com