How to edit the design
-
Hello guys I really like the plugin but the UI design is terrible, so I would like to change the affiliates page. What should I do?
-
Hi,
Thanks for the message.
Please could you send me a message of what your dashboard UI is looking like, and let me know what theme you are using? Do you have the affiliate dashboard page set to full width?
It should look something like this demo video: https://vimeo.com/725229128
You can style the dashboard design with custom CSS and there are a few options in the plugin settings to change colours etc.
Let me know if you have any other questions.
Thanks,
Elliot
Hi Elliot, I’m using Elessi theme.
The dashboard is 100% width. Preview: https://gyazo.com/1b592412bd88bd5b1a90d4dd427e384a
On your demo, it looks good.Btw what is the difference between Affiliate Dashboard and affiliate Area? Because the Affiliate area is showing only as a shortcode.
Also, I have this error when I try to visit for example my contact us page.
https://gyazo.com/1183188edfc25a5707640e6d8e4bcd64here is the log
[16-Sep-2022 09:08:56 UTC] PHP Fatal error: Uncaught Error: Call to undefined function WC() in /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php:352 Stack trace: #0 /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php(267): wcusage_auto_apply_discount_coupon('ivanoff20') #1 /home//mainastyle.com/wp-includes/class-wp-hook.php(307): wcusage_apply_coupon_to_cart(Object(WP)) #2 /home//mainastyle.com/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #3 /home//mainastyle.com/wp-includes/plugin.php(524): WP_Hook->do_action(Array) #4 /home//mainastyle.com/wp-includes/class-wp.php(787): do_action_ref_array('wp', Array) #5 /home//mainastyle.com/wp-includes/functions.php(1330): WP->main('') #6 /home//mainastyle.com/wp-blog-header.php(16): wp() #7 /home//mainastyle.com/index.php(17): require('/home//...') #8 {main} thrown in /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php on line 352 [16-Sep-2022 09:09:51 UTC] PHP Fatal error: Uncaught Error: Call to undefined function WC() in /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php:352 Stack trace: #0 /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php(267): wcusage_auto_apply_discount_coupon('ivanoff20') #1 /home//mainastyle.com/wp-includes/class-wp-hook.php(307): wcusage_apply_coupon_to_cart(Object(WP)) #2 /home//mainastyle.com/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #3 /home//mainastyle.com/wp-includes/plugin.php(524): WP_Hook->do_action(Array) #4 /home//mainastyle.com/wp-includes/class-wp.php(787): do_action_ref_array('wp', Array) #5 /home//mainastyle.com/wp-includes/functions.php(1330): WP->main('') #6 /home//mainastyle.com/wp-blog-header.php(16): wp() #7 /home//mainastyle.com/index.php(17): require('/home//...') #8 {main} thrown in /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php on line 352 [16-Sep-2022 09:10:22 UTC] PHP Fatal error: Uncaught Error: Call to undefined function WC() in /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php:352 Stack trace: #0 /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php(267): wcusage_auto_apply_discount_coupon('ivanoff20') #1 /home//mainastyle.com/wp-includes/class-wp-hook.php(307): wcusage_apply_coupon_to_cart(Object(WP)) #2 /home//mainastyle.com/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #3 /home//mainastyle.com/wp-includes/plugin.php(524): WP_Hook->do_action(Array) #4 /home//mainastyle.com/wp-includes/class-wp.php(787): do_action_ref_array('wp', Array) #5 /home//mainastyle.com/wp-includes/functions.php(1330): WP->main('') #6 /home//mainastyle.com/wp-blog-header.php(16): wp() #7 /home//mainastyle.com/index.php(17): require('/home//...') #8 {main} thrown in /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php on line 352 [16-Sep-2022 09:11:25 UTC] PHP Fatal error: Uncaught Error: Call to undefined function WC() in /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php:352 Stack trace: #0 /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php(267): wcusage_auto_apply_discount_coupon('ivanoff20') #1 /home//mainastyle.com/wp-includes/class-wp-hook.php(307): wcusage_apply_coupon_to_cart(Object(WP)) #2 /home//mainastyle.com/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #3 /home//mainastyle.com/wp-includes/plugin.php(524): WP_Hook->do_action(Array) #4 /home//mainastyle.com/wp-includes/class-wp.php(787): do_action_ref_array('wp', Array) #5 /home//mainastyle.com/wp-includes/functions.php(1330): WP->main('') #6 /home//mainastyle.com/wp-blog-header.php(16): wp() #7 /home//mainastyle.com/index.php(17): require('/home//...') #8 {main} thrown in /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php on line 352 [16-Sep-2022 09:16:57 UTC] PHP Fatal error: Uncaught Error: Call to undefined function WC() in /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php:352 Stack trace: #0 /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php(267): wcusage_auto_apply_discount_coupon('ivanoff20') #1 /home//mainastyle.com/wp-includes/class-wp-hook.php(307): wcusage_apply_coupon_to_cart(Object(WP)) #2 /home//mainastyle.com/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #3 /home//mainastyle.com/wp-includes/plugin.php(524): WP_Hook->do_action(Array) #4 /home//mainastyle.com/wp-includes/class-wp.php(787): do_action_ref_array('wp', Array) #5 /home//mainastyle.com/wp-includes/functions.php(1330): WP->main('') #6 /home//mainastyle.com/wp-blog-header.php(16): wp() #7 /home//mainastyle.com/index.php(17): require('/home//...') #8 {main} thrown in /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php on line 352 [16-Sep-2022 09:17:01 UTC] PHP Fatal error: Uncaught Error: Call to undefined function WC() in /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php:352 Stack trace: #0 /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php(267): wcusage_auto_apply_discount_coupon('ivanoff20') #1 /home//mainastyle.com/wp-includes/class-wp-hook.php(307): wcusage_apply_coupon_to_cart(Object(WP)) #2 /home//mainastyle.com/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #3 /home//mainastyle.com/wp-includes/plugin.php(524): WP_Hook->do_action(Array) #4 /home//mainastyle.com/wp-includes/class-wp.php(787): do_action_ref_array('wp', Array) #5 /home//mainastyle.com/wp-includes/functions.php(1330): WP->main('') #6 /home//mainastyle.com/wp-blog-header.php(16): wp() #7 /home//mainastyle.com/index.php(17): require('/home//...') #8 {main} thrown in /home//mainastyle.com/wp-content/plugins/woo-coupon-usage/inc/functions/functions-urls.php on line 352
Hi @pleasure94
Do you have a page layout that has some padding (boxed) but without widgets/sidebar?
You could also try adding this CSS to your site instead:
.page-id-5122 #main-content { max-width: 1190px; margin: 0 auto; }
In regards to the error, what version of WooCommerce are you using? Could you check that you have updated to the latest version?
-
This reply was modified 2 years, 6 months ago by
Elliot Sowersby / RelyWP.
Your “Affiliates Area” page is not part of our plugin (with the [affiliates_dashboard] shortcode on), looks like this may have been created by another plugin.
The page for our plugin is your “Affiliate Dashboard” page with the [couponaffiliates] shortcode on.
You will want to use this CSS instead for the “Affiliate Dashboard” page:
.page-id-5122 #main-content { max-width: 1190px; margin: 0 auto; }
Thanks, I have fixed the problem with the width.
My WooCommerce version is 6.9.2.I’ve tried a few ways to get rid of this error but still can’t find the solution.
Hi,
This error should only be showing if WooCommerce is outdated, or not installed on the same website that you are using the plugin on. Do you have anything installed that is blocking WooCommerce from running on certain pages?
We will however take a look into this and see if we can implement a fix in the next update.
Ohh I see. I have plugin “Freesoul Deactivate Plugins” Bcs I need to deactivate some plugins on some pages but this was the problem. Thanks for the help Elliot! Your plugin works well!
Ah yes, that’s probably what’s causing it. Glad you figured it out.
If you need any more help, feel free to get in touch.
If you don’t mind, please could you?leave us a review?about your overall experience with the Coupon Affiliates plugin? Would be much appreciated.
Hi @pleasure94, I’m the author of FDP.
You have the error because you have probably disabled WooCommerce but not WooCommerce Affiliate Plugin – Coupon Affiliates. If a plugin depends on the functions that are defined in a third plugin, and that plugin doesn’t check if those functions exist, you have this kind of error.
@elliotvs I think you should not use WC() in your code without first checking if it exists. The active plugins can be filtered, and it’s not enough to check if WooCommerce is active by checking the option active_plugins, or using the function is_plugin_active (that in the end checks the option active_plugins).
I would wrap the code in something that looks like this:if( function_exists( 'WC' ) ){ //your code }
This time it was Freesoul Deactivate Plugins, but the same issue may happen with all other plugins that disable plugins on specific pages.
I suggest you check the existence of the functions and classes before using them if they are defined in another plugin.
Only by checking if they exist you can be sure. Not only because WP gives you the possibility to filter the option active_plugin, but also because the other plugin that is not under your control may change the name of a function, or deprecate them. Surely, It will never happen for WooCommerce, but the same, why don’t you check with function_exists and class_exists? It’s also better in terms of performance.Hello Jose, thanks for the information. I’m still trying to setup your plugin to work correctly with the affiliate one, but now I think I will do it in the right way!
Hi @giuse,
Thanks for the message and feedback.
Yeah, we do have some checks in the most necessary places to prevent this kind of error, though it seems to be missing in the functions-urls.php file. We’ll add it in our next update to help prevent this same error for other users.
Cheers!
@pleasure94 many thanks to you for using FDP. For any question or issue don’t hesitate to open a thread on the support forum of FDP.
@elliotvs Many thanks to you for checking the code.
-
This reply was modified 2 years, 6 months ago by
- The topic ‘How to edit the design’ is closed to new replies.