Skip to content

Instantly share code, notes, and snippets.

@dlyamkin
Created August 25, 2022 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlyamkin/4b7ff1fcba2187ca6df5b96fafdfa31c to your computer and use it in GitHub Desktop.
Save dlyamkin/4b7ff1fcba2187ca6df5b96fafdfa31c to your computer and use it in GitHub Desktop.
diff --git a/app/addons/reward_points/func.php b/app/addons/reward_points/func.php
index 40f752e8782..01fba4b9616 100644
--- a/app/addons/reward_points/func.php
+++ b/app/addons/reward_points/func.php
@@ -649,6 +649,13 @@ function fn_reward_points_gather_additional_product_data_post(&$product, &$auth,
*/
function fn_gather_reward_points_data(&$product, &$auth, $get_point_info = true)
{
+ if (empty($auth['usergroup_ids'])) {
+ $auth['usergroup_ids'] = [
+ USERGROUP_ALL,
+ empty($auth['user_id']) ? USERGROUP_GUEST : USERGROUP_REGISTERED
+ ];
+ }
+
/**
* Executed before the reward point data is gathered.
*v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment