svtmontagna
Forum Replies Created
-
Hi,
since the website is in maintenance, I added the interest page in the exclusions and that’s the only page available. You can see this problem by yourself: https://www.advancedawareness.it/test
Thanks.
I solved by deactivating iubenda plugin and load the script manually with another plugin.
Forum: Plugins
In reply to: [Affiliates] Number of users who purchase through an affiliateIt works, but you need to edit the array on the first snippet:
$current_user_role = prefix_get_current_user_roles()[0];
Need to be:
$current_user_role = prefix_get_current_user_roles()[1];
On my case at least, because I don’t let user to signup as affiliate but I manually add an affiliate already registered which is a subscriber by default and the array returns [subscriber, affiliate].
Forum: Plugins
In reply to: [Affiliates] Number of users who purchase through an affiliateThis works even if I add manual affiliate or only through registration?
Forum: Plugins
In reply to: [Affiliates] Number of users who purchase through an affiliateI just noticed that the “affiliate” role doesn’t seem to work if I add it to the snippet whitelist above. I tried roles like “administrator” or “shop-manager” am I wrong? What is the name of the affiliate role?
Forum: Plugins
In reply to: [Affiliates] Number of users who purchase through an affiliateI also reordered the tabs to not have the “Affiliation” tab under logout. But this is only an aesthetic thing.
add_filter( 'woocommerce_account_menu_items', 'bbloomer_add_link_my_account' ); function bbloomer_add_link_my_account( $items ) { $newitems = array( 'dashboard' => __( 'Dashboard', 'woocommerce' ), 'orders' => __( 'Orders', 'woocommerce' ), 'downloads' => __( 'Downloads', 'woocommerce' ), 'edit-address' => _n( 'Addresses', 'Address', (int) wc_shipping_enabled(), 'woocommerce' ), 'edit-account' => __( 'Account details', 'woocommerce' ), 'affiliate' => __( 'Affiliate', 'woocommerce' ), 'customer-logout' => __( 'Logout', 'woocommerce' ), ); return $newitems; }
Forum: Plugins
In reply to: [Affiliates] Number of users who purchase through an affiliateHello,
I’m happy to share my solution with you. I found a snippet online to add a tab inside woocommerce dashboard and show a shortcode or a text inside of it. Besides I check if the logged user have the affiliate role before showing the tab.$whitelist_roles = array( 'affiliate' ); $current_user_role = prefix_get_current_user_roles()[0]; if ( in_array( $current_user_role, $whitelist_roles ) ) { // Add rewrite url. add_action( 'init', function() { add_rewrite_endpoint( 'custom', EP_ROOT | EP_PAGES ); }); // Add custom menu item to the sidebar. add_filter( 'woocommerce_account_menu_items', function( $items ) { $items['custom'] = esc_html__( 'Affiliate', 'text-domain' ); return $items; } ); // Display the content for the custom endpoint. add_action( 'woocommerce_account_custom_endpoint', function() { echo do_shortcode( ' [affiliates_dashboard] ' );//For shortcode }); } function prefix_get_current_user_roles() { if ( ! is_user_logged_in() ) { return array(); } $user = wp_get_current_user(); $roles = (array) $user->roles; return $roles; }
Forum: Plugins
In reply to: [Affiliates] Number of users who purchase through an affiliateI did it through PHP. Thanks for all, my problem is solved.
Forum: Plugins
In reply to: [Affiliates] Number of users who purchase through an affiliateI confirm it works now. I was buying as affiliate before. I tried to buy a product without affiliate role and it worked. Is it possible to add affiliate dashboard on woocommerce user dashboard?
Forum: Plugins
In reply to: [Affiliates] Number of users who purchase through an affiliateHello and thanks for your answer,
I have already installed Affiliates WooCommerce Light. I have not set any percentage because I just want to know the number of people who bought through that affiliate and then solve it in person with him (it’s a very local thing at the moment). The product is digital, so the order is immediately placed in the “completed” status. However, after I buy that product I can see the clicks but any references.Forum: Plugins
In reply to: [Affiliates] Number of users who purchase through an affiliateHi,
I’m trying to test this plugin but no accepeted refferal is appearing. Maybe because I’m buying through a plugin that allow me to bypass payment for testing purposes?Hi,
I added [min-file:2 max-file:2] inside the short code and I solved. Thanks.Risolto mettendo al div dei pulsanti un display flex con direzione in colonna. Probabilmente entrava in conflitto col tema. Metto il code per chi dovesse avere un problema:
@media only screen and (max-width: 600px) { #iubenda-cs-banner .iubenda-cs-opt-group>div { display:flex !important; flex-direction:column !important } }
The second one get bad when I select the second language and when I see the website as mobile view.
Hi,
I’m using Archies Progression. Problem is on homepage I’ve already linked: [ redundant link removed ]- This reply was modified 2 years, 6 months ago by Jan Dembowski.