Hi,
I’m using version 2.5.2 of your plugin with WooCommerce 9.1.4 and WordPress 6.6.1.
As a result of the code in referralcandy-for-woocommerce/includes/class-wc-referralcandy-integration.php, the following Javascript error appears in my browser console every time any WP Admin page is loaded:
TypeError: $('.popup-campaign-key-tooltip').tipTip is not a function. (In '$('.popup-campaign-key-tooltip').tipTip({
content: tooltipContent,
fadeIn: 50,
fadeOut: 50,
delay: 200,
maxWidth: '300px'
})', '$('.popup-campaign-key-tooltip').tipTip' is undefined)
Can you estimate when this will be fixed?
Thanks!
]]>Hi there,
I noticed that the checkbox on the checkout page is not displaying in the latest version.
Could you please provide some guidance?
Thank you.
]]>We’d love to hear from you!
Get in touch with us?here, or visit our?Help Center.
]]>Hi!
WooCommerce has introduced a new storage model for orders called High-Performance Order Storage. It will reduce order creation from at least 50 queries to just 3. Unfortunately, this plugin is not compatible with HPOS.
I don’t know if you are aware that this change renders your plugin incompatible with shops that use this DB schema. And that, starting in August this year, all new shops will use it!
To make the plugin compatible with HPOS you need to use the WC-specific CRUD classes and instead of accessing wp_postmeta directly. And compatibility must be declared.
There is a guide on how to upgrade to HPOS: https://github.com/woocommerce/woocommerce/wiki/High-Performance-Order-Storage-Upgrade-Recipe-Book
Thanks for your kind support
]]>We’d love to hear from you!
Get in touch with us here, or visit our Help Center.
]]>Hi, to do marketing a medical client of mine would like to create a software where every patient will have his QR Code, and when the patient recommends the service to another patient he gives him his QR Code and so when that patient comes, he is recorded under the first one who recommended him. It should be like multilevel marketing, where you can set, for example, a 15 percent profit and divide it by levels, so that patients are more interested in recommending to others-they will accumulate points and then these patients can do free work. The patient should then be able to see their network at the bottom. Can this plugin perform these functions or something similar? Thank you
]]>Checking our site performance looking for bottlenecks we have realized that we are experiencing a delay of 200ms in every request when initializing the plugin due to these lines in the WC_Referralcandy_Integration::init_form_fields() method:
$published_pages = get_pages(['status' => ['publish']]);
$tracking_page_options = [];
foreach ($published_pages as $page) {
$tracking_page_options[$page->post_name] = $page->post_title;
}
This variable is only used to fill the list of available options in the plugin settings. Could you calculate and fill it only when showing the settings page?
Alternately, could you cache this list in a transient, so it’s only calculated once in a while?
Thank you!
]]>Do you have an option to generate coupons as affiliate codes for him to share? Is this possible to appear on the order success screen?
]]>Looks like this has happened to a couple of other users before but I’m very occasionally getting the following error:
2021-03-25T15:05:55+00:00 CRITICAL Uncaught Error: Cannot use object of type WP_Error as array in /public_html/wp-content/plugins/referralcandy-for-woocommerce/includes/class-rc-order.php:149
Stack trace:
#0 /public_html/wp-content/plugins/referralcandy-for-woocommerce/includes/class-wc-referralcandy-integration.php(209): RC_Order->submit_purchase()
#1 /public_html/wp/wp-includes/class-wp-hook.php(294): WC_Referralcandy_Integration->rc_submit_purchase(70991)
#2 /public_html/wp/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
#3 /public_html/wp/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
#4 /public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(363): do_action('woocommerce_ord...', 70991, Object(Automattic\WooCommerce\Admin\Overrides\Order))
#5 /public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(221): WC_Order->status_trans in /home/goodlifecompetit/public_html/wp-content/plugins/referralcandy-for-woocommerce/includes/class-rc-order.php on line 149
Looking at the code, it seems like you need to check if the $response is not a WP_Error before #L149. Something like:
if ( is_wp_error( $response ) ) {
return;
}
]]>
Hi, I’d like to know if the plugin works with woocommerce subscription and if there’s a demo site I can look to to figure out how.
Thanks
]]>In our woocommerce website, orders are also created using the woocommerce APi from another website. We don’t want users form those orders to be added to the referral candy mailing list. Is there a way to do so? Like option to exclude orders with specific meta key?
]]>Hello, the plugin is giving an error a few times. And in this error the site goes offline for a few seconds / minutes.
Follows the error report
An error of type E_ERROR was caused at line 145 of file /var/www/html/wp-content/plugins/referralcandy-for-woocommerce/includes/class-rc-order.php. Error Message: Uncaught Error: Cannot use object of type WP_Error as array in /var/www/html/wp-content/plugins/referralcandy-for-woocommerce/includes/class-rc-order.php:145
Stack trace:
#0 /var/www/html/wp-content/plugins/referralcandy-for-woocommerce/includes/class-wc-referralcandy-integration.php(133): RC_Order->submit_purchase()
#1 /var/www/html/wp-includes/class-wp-hook.php(288): WC_Referralcandy_Integration->rc_submit_purchase(2459)
#2 /var/www/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#3 /var/www/html/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
#4 /var/www/html/wp-content/plugins/woocommerce/includes/class-wc-order.php(360): do_action(‘woocommerce_ord…’, 2459, Object(WC_Order))
#5 /var/www/html/wp-content/plugins/woocommerce/includes/class-wc-order.php(230): WC_Order->status_transition()
#6 /var/www/html/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php(620): WC_Order->save()
#7 /var/www/html/wp-includes/class-wp-hook.php(286): WC_
activating the plugin cause the too many redirects loop error
]]>Hello. Read through some docs, but wanted to make sure I didn’t overlook anything. Is there an option to reward by extending subscriptions? In other words, if Joe refers to his friend Matt, can Joe be rewarded with an extension to HIS current WC Subscription?
For WC sites where funds may be low, rewarding in this fashion is optimal, compared to monetary rewards. AutomateWoo has this feature, but it’s a paid add-on.
Thanks!
Ryan
In version 2.0.0 a new class file was added and the way in which these are being included was changed to use the autoload_classes()
function. However, this function is called via the woocommerce_integrations
hook, which is a filter hook expecting an array of integrations to be returned. This is removing the integrations of all other plugins from being loaded into this filter.
Relevant changes:
Index: referralcandy-for-woocommerce/trunk/woocommerce-referralcandy.php
===================================================================
--- a/referralcandy-for-woocommerce/trunk/woocommerce-referralcandy.php
+++ b/referralcandy-for-woocommerce/trunk/woocommerce-referralcandy.php
@@ -7,5 +7,5 @@
* Author URI: https://www.referralcandy.com
* Text Domain: woocommerce-referralcandy
- * Version: 1.3.7
+ * Version: 2.0.0
*
* This program is free software: you can redistribute it and/or modify
@@ -36,7 +36,6 @@
public function init() {
if (class_exists('WC_Integration')) {
- include_once 'includes/class-wc-referralcandy-integration.php';
-
- add_filter('woocommerce_integrations', array($this, 'add_integration'));
+ add_action('woocommerce_integrations', 'autoload_classes');
+ add_filter('woocommerce_integrations', [$this, 'add_integration']);
} else {
add_action('admin_notices', 'missing_prerequisite_notification');
@@ -54,4 +53,14 @@
$WC_Referralcandy = new WC_Referralcandy(__FILE__);
+ }
+
+ function autoload_classes() {
+ $files = scandir(dirname(__FILE__) . '/includes');
+ $valid_extensions = ['php'];
+ foreach ($files as $index => $file) {
+ if (in_array(pathinfo($file)['extension'], $valid_extensions)) {
+ require_once('includes/' . pathinfo($file)['basename']);
+ }
+ }
}
Fix
To fix this you can either roll back to a previous version of the plugin from a backup or patch the plugin manually until fixed by the author in a future version – to patch manually, replace the add_action()
call on line 39 with a call to the autoload_classes()
function:
public function init() {
if (class_exists('WC_Integration')) {
autoload_classes();
add_filter('woocommerce_integrations', [$this, 'add_integration']);
} else {
add_action('admin_notices', 'missing_prerequisite_notification');
}
load_plugin_textdomain('woocommerce-referralcandy', false, dirname(plugin_basename(__FILE__)) . '/languages/');
}
]]>
Hi, how are you? I’m having a problem with the plugin. I have installed it in a site (multisite) with theme and plugins updated to the day. When active the plugin does not appear in the integrations tab, and I can not configure it. I have it active in other site and it has worked without problems. Any idea how to fix it ?
]]>We’d love to hear from you!
Get in touch with us here: https://www.referralcandy.com/contact-us
Or visit our Support Center for help resources: https://help.referralcandy.com
]]>I’m getting a 500 Internal Server Error when I install this plugin. Why is that?
]]>