I have some doubts
I noticed that we can set up points for user login and user social sharing separately. Is it possible to combine these two scenarios into one condition so that users can earn points for either action?
Is there any way to earn points when a user submits a review via Yotpo?
we need to set it up so that users can only use their points on specific products, not all products on the checkout page. Is this possible?
Additionally, is it possible to set up a frequency for points consumption? For example, can we restrict a user to consume points only once per year?
Thank you for your assistance.
]]>It’s probably never been a good idea, but PHP is getting stricter about not allowing class variables to be declared dynamically. Most of your code has an easy fix, but you have one place that will need some more thought. I’ve included code to disable the warning, but presumably you should work harder than I did to clean up the code.
I started out making them all public to be safe, but there were some that were obvious (theoretically) that shouldn’t be public, so again, you can do a better job than I did.
Modified:
customer//dev/wp-content/plugins/badgeos-badgestack-add-on/badgeos-badgestack.php
customer//dev/wp-content/plugins/badgeos-community-add-on/badgeos-community.php
customer//dev/wp-content/plugins/badgeos/badgeos.php
customer//dev/wp-content/plugins/badgeos/includes/p2p/p2p-core/autoload.php
customer//dev/wp-content/plugins/badgeos/includes/p2p/p2p-core/connection-type.php
customer//dev/wp-content/plugins/badgeos/includes/p2p/p2p-core/side-post.php
customer//dev/wp-content/plugins/badgeos/includes/p2p/scb/AdminPage.php
Log:
PHP deprecation warnings (undeclared class variables dynamically created)
Modified: customer//dev/wp-content/plugins/badgeos/badgeos.php
===================================================================
--- customer//dev/wp-content/plugins/badgeos/badgeos.php 2024-06-09 10:29:56 UTC (rev 30066)
+++ customer//dev/wp-content/plugins/badgeos/badgeos.php 2024-06-09 10:32:20 UTC (rev 30067)
@@ -68,6 +68,8 @@
*/
public $mysql_deduct_points;
+ public $basename, $directory_path, $directory_url, $start_time, $award_ids, $achievement_types, $award_points_activity_triggers, $deduct_points_activity_triggers, $badgeos_ranks_req_activity_triggers, $activity_triggers;
+
/**
* Define class constants and hooks for displaying Comments.
*
Modified: customer//dev/wp-content/plugins/badgeos/includes/p2p/p2p-core/autoload.php
===================================================================
--- customer//dev/wp-content/plugins/badgeos/includes/p2p/p2p-core/autoload.php 2024-06-09 10:29:56 UTC (rev 30066)
+++ customer//dev/wp-content/plugins/badgeos/includes/p2p/p2p-core/autoload.php 2024-06-09 10:32:20 UTC (rev 30067)
@@ -1,7 +1,7 @@
<?php
class P2P_Autoload {
-
+ public $prefix, $basedir;
protected function __construct( $prefix, $basedir ) {
$this->prefix = $prefix;
$this->basedir = $basedir;
Modified: customer//dev/wp-content/plugins/badgeos/includes/p2p/p2p-core/connection-type.php
===================================================================
--- customer//dev/wp-content/plugins/badgeos/includes/p2p/p2p-core/connection-type.php 2024-06-09 10:29:56 UTC (rev 30066)
+++ customer//dev/wp-content/plugins/badgeos/includes/p2p/p2p-core/connection-type.php 2024-06-09 10:32:20 UTC (rev 30067)
@@ -1,5 +1,5 @@
<?php
-
+#[AllowDynamicProperties]
class P2P_Connection_Type {
public $side;
@@ -9,7 +9,8 @@
public $labels;
protected $title;
-
+ public $fields, $strategy;
+
public function __construct( $args, $sides ) {
$this->side = $sides;
@@ -26,7 +27,8 @@
$this->fields = $this->expand_fields( _p2p_pluck( $args, 'fields' ) );
- foreach ( $args as $key => $value ) {
+ foreach ( $args as $key => $value ) {
+ // creating class variables dynamically is deprecated as of PHP 8.2
$this->$key = $value;
}
}
Modified: customer//dev/wp-content/plugins/badgeos/includes/p2p/p2p-core/side-post.php
===================================================================
--- customer//dev/wp-content/plugins/badgeos/includes/p2p/p2p-core/side-post.php 2024-06-09 10:29:56 UTC (rev 30066)
+++ customer//dev/wp-content/plugins/badgeos/includes/p2p/p2p-core/side-post.php 2024-06-09 10:32:20 UTC (rev 30067)
@@ -3,7 +3,8 @@
class P2P_Side_Post extends P2P_Side {
protected $item_type = 'P2P_Item_Post';
-
+ protected $query_vars;
+
function __construct( $query_vars ) {
$this->query_vars = $query_vars;
}
Modified: customer//dev/wp-content/plugins/badgeos/includes/p2p/scb/AdminPage.php
===================================================================
--- customer//dev/wp-content/plugins/badgeos/includes/p2p/scb/AdminPage.php 2024-06-09 10:29:56 UTC (rev 30066)
+++ customer//dev/wp-content/plugins/badgeos/includes/p2p/scb/AdminPage.php 2024-06-09 10:32:20 UTC (rev 30067)
@@ -20,6 +20,7 @@
* $admin_action_priority int The priority that the admin_menu action should be executed at (default: 10)
*/
protected $args;
+ protected $nonce;
// URL to the current plugin directory.
// Useful for adding css and js files
Modified: customer//dev/wp-content/plugins/badgeos-badgestack-add-on/badgeos-badgestack.php
===================================================================
--- customer//dev/wp-content/plugins/badgeos-badgestack-add-on/badgeos-badgestack.php 2024-06-09 10:29:56 UTC (rev 30066)
+++ customer//dev/wp-content/plugins/badgeos-badgestack-add-on/badgeos-badgestack.php 2024-06-09 10:32:20 UTC (rev 30067)
@@ -26,7 +26,7 @@
*/
final class BadgeOS_BadgeStack {
-
+ public $basename, $directory_path, $directory_url;
function __construct() {
// Define plugin constants
$this->basename = plugin_basename( __FILE__ );
Modified: customer//dev/wp-content/plugins/badgeos-community-add-on/badgeos-community.php
===================================================================
--- customer//dev/wp-content/plugins/badgeos-community-add-on/badgeos-community.php 2024-06-09 10:29:56 UTC (rev 30066)
+++ customer//dev/wp-content/plugins/badgeos-community-add-on/badgeos-community.php 2024-06-09 10:32:20 UTC (rev 30067)
@@ -30,7 +30,7 @@
register_activation_hook( __FILE__, array( 'BadgeOS_Community', 'activate' ) );
class BadgeOS_Community {
-
+ public $basename, $directory_path, $directory_url, $community_triggers;
function __construct() {
// Define plugin constants
@@ -216,4 +216,4 @@
}
}
-$GLOBALS['badgeos_community'] = new BadgeOS_Community();
\ No newline at end of file
+$GLOBALS['badgeos_community'] = new BadgeOS_Community();
]]>
When someone adds a badge to their LinkedIn profile, is it possible to not show the “Show Credential” button?
]]>I am using a Kadence theme with the Kadence Blocks, which are basically enhanced Gutenberg blocks.
Yesterday I installed the latest BadgeOs plugin and noticed that some elements of my Home page were broken. e.g. the grid cards of my blog archive, the pictures of my tabs disappeared and the LearnDash grid cards were also displaying incorrectly.
I am 100% sure this relates to the BadgeOS plugin, becasue when I disactivate it, things go back to normal.
Does anybody experienced similar issues with the Kadence blocks / Gutenberg blocks?
]]>Hello,
I couldn’t find a place to contact you elsewhere, so sharing our update here.
We are releasing a major update to Paid Memberships Pro in the next three weeks. Since you manage a plugin that integrates with PMPro, we wanted to make sure you are aware of this update and can run necessary tests and updates so that this upgrade doesn’t break compatibility.
Here is information about the upcoming version and a link to download the current beta:
https://www.paidmembershipspro.com/pmpro-v3-0-beta/
Hi,
as the BadgeOS plugin currently results temporarily closed (27/07/2023), I’d like to ask if there is some prevision on when it will be available for download again. It would be very useful to use in an upcoming elearning project that uses a WordPress platform.
Thank you!
]]>I am using the BadgeOs plugin. After earning a badge, it is not validated with badgr(https://badgecheck.io/). Whenever I am trying to validate the badge, it always returns an error.
Please check this link: https://prnt.sc/PoJxIFHzMUcN
Please let me know how can I solve this issue.
Thank youl.
Hi
How does rank, points, and awards work?
can I have points earn a rank, and several ranks an award? Or is it different?
Steve
]]>Hi There, I am getting a critical warning on WordFence for the plugin. Please can this be resolved?
https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/badgeos/badgeos-3716-cross-site-request-forgery
Thanks!
Hi, I want to retrieve all user achievements title and it is not showing all of them.
Can you help us, what’s wrong with the array of achievements?
Here is my code:
$achievements_arr = get_user_meta($current_user->id, ‘_badgeos_achievements’, 1);
foreach ($achievements_arr as $achievement) {
echo $achievement->achievement_title . ‘<br>’;
}
The user has 4 achievements also in wp admin user page, but here is showing only 3.
Thanks ??
Hi,
I am wanting to create a showcase of badges earned by a user on a page.
Ive tried the following shortcode however there is a lot of white space and dotted borders around badges and also no ability t change the image size of the badge. I want the badges to be displayed side-by-side.
[badgeos_user_earned_achievements order="ASC" show_title="false" show_thumb="true" show_description="false"]
Please could someone help me achieve this, or point out which table in the wpdb stores the badges so I can pull the featured images myself and do it manually.
Kind Regards.
]]>Hi,
We are premium users of badgeos with Social sharing add-on installed. We allow badge baking and thus we expect the evidence pages to show expiry date and issue date. However, the evidence page right now(even for freshly issued badges), does not show an issue date or an expiry date. These fields are blank for the badges, which is strange.
Is this a known problem? Is there a way to fix this?
]]>Badges are not being issued automatically based on learndash activities. Even with the logs confirming the step to trigger the award, it is not issued. @mvarela and others with the same problem.
]]>Only 100 badges are shown when you want to award a badge manually, not the full list.
]]>Hello! I need help! I’m creating a place where users get a digital badge for completing exercise. Badges are based on location (a state park), what kind of activity (biking, hiking), the amount of miles completed (25 miles, 100 miles). I need a plugin I can customize and that will also automate putting the badge on a user’s account when the threshold is met.
BadgeOS would be nice but the line items are not customizable. I’ve tried reaching out to get more info and haven’t heard anything.
Any help would be greatly appreciated!
]]>I am trying to use badgeOS to award my credly badges, but I have no credly integration options please advise
]]>I bought the social sharing add-on and it was working fine until recently when I upgraded the badgeos and social sharing plugins. I tried to contact you via your website and by email and have not heard back.
Can you please help me resolve this issue?
]]>When there is an error when adding a redirect in yoast wp-admin/admin.php?page=wpseo_redirects it would appear the badgeOS style sheet/wp-content/plugins/badgeos/css/admin.min.css?ver=6.1.1 is overriding JQuery UI styling making these messages unreadable.
We are using latest badge os and yoast premium
]]>The plugin is causing a crash on PHP 8.0
badgeos/includes/p2p/p2p-admin/dropdown.php
Function each() is deprecated since PHP 7.2 and removed since PHP 8.0
Will this be patched in future versions?
]]>Hello.
Every time I try to activate the plugin, my website goes down and gives the 500 error.
I spoke to Hostgator about it and they said:
“because the website is running on php 7.4 and BadgeOS might only run on lower versions like 5.6 or 7.1”
They also suggested to just wait for an update.
I’m not sure if this is an issue for anyone else, but I figured I’d just post and see what others said/thought.
Cheers
]]>I’m currently setting up a new instance of BadgeOS in a new site. No matter what trigger we use we are not seeing the badge be issued to the user. We can see it in the log, but the badge is not present in the users account.
Manually issuing the badge does work as the badge appears in the users account.
Any assistance is appreciated.
]]>Greetings,
When editing a user in WordPress, the following option does not yield a complete list of badges:
“Select an Achievement Type to Award: Badges”
The full list of available badges does not show. Currently only 10 of the 30+ badges are showing on the list for choosing. Alphabetically, the first badge and the last 9.
Anyone else having this problem as of the last two updates? Solution? I have verified that the missing badges are setup the same as showing badges. Could it be the badge display list-box not having scrolling option, as does this message box?
Thanks in advance!
Manny
[email protected]
I’m having to manually award my badges to users because badgeos isn’t triggering to automatically give it to them with they reach a step or credit. My website is built with peepso with the gecko theme. I have badgeos plug in and all the boxes are checked with it
]]>We have a profile page build out for customers but when I enable the BadgeOS plugin it adds space between elements and creates these rectangles boxes that are empty.
]]>Hello, I have fresh installed BadgeOS, however when I tried to display Badges
menu in the BadgeOS menu, I got this fatal error.
Fatal error: Uncaught TypeError: unlink(): Argument #1 ($filename) must be of type string, WP_Error given in /Users/septiyan.nariyanto/workspace/peepso.dev/app/public/wp-content/plugins/badgeos/includes/achievement-functions.php on line 1006
Your FAQ needs an update, the Credly link no longer exists and nor does the free signup page.
The examples link just 404’s – https://badgeos.org/about/sample-sites/
]]>In the latest version of the plugin (3.7.1.2), the badgeos_award_achievement
hook no longer fires properly, and breaks third party APIs. In this example, we were using that hook to trigger a Credly badge.
Second, the verification page wpautop()
change has broken any custom HTML on the pages.
We’ve reverted to the old version, but hopefully these things are addressed.
]]>As others on this forum have reported. Upgrading to 3.7.1.2 breaks the display of previously earned badges. Rolling back to 3.7 fixes it and earned badges are displayed again.
I run a paid learning site where people earn badges towards final graduation. Having everyone’s progress disappear is understandably concerning for people. So I rolled my site back to the previous version.
I want to be on the latest version of the plugin but need this fixed first.
]]>I have many Open Badges on my site but starting today some of them stopped being “Open” and I have made no changes. I do not understand why this is happening.
]]>After upgrade, User Earned Achievements display block and shortcode no longer work (do not display any achievements the user has earned).
Version: 3.7.1.2
Solutions I have tried:
– Removing and re-adding block.
– Ensuring proper setup of block (e.g., ensuring achievement type is selected).
– Deactivating all plugins but BadgeOS plugin.
– Deleting the plugin and reinstalling.
– Upgrading the BadgeOS database via Tools.
– Using WordPress default theme.
Any ideas on what to try now?
]]>