• Resolved villdaniel

    (@villdaniel)


    Hello!

    My client has been using slicewp for a few months. Because of the business model, commissions on recurring payments are the most common.

    Is there any solution that an affiliate can check which customer through their affiliate link completed the recurring payment in the given month?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author iova.mihai

    (@iovamihai)

    Hey @villdaniel,

    Thank you for reaching out! Currently, this is not possible out of the box.

    However, I believe that I may be able to help you out with this via custom code.

    Can you please let me know which eCommerce plugin your client is using?

    Thank you and best wishes,

    Mihai

    Thread Starter villdaniel

    (@villdaniel)

    Hi Mihai,

    Thank you!

    My client is using WooCommerce and WooCommerce Subscriptions are also in place.

    Daniel

    Plugin Author iova.mihai

    (@iovamihai)

    Hey @villdaniel,

    I believe the following code should help:

    function slicewp_custom_list_table_columns_affiliate_account_commissions( $columns ) {
    	
    	$columns = _slicewp_array_assoc_push_after_key( $columns, 'amount', array( 'customer' => 'Customer' ) );
    	
    	return $columns;
    	
    }
    add_filter( 'slicewp_list_table_columns_affiliate_account_commissions', 'slicewp_custom_list_table_columns_affiliate_account_commissions' );
    
    function slicewp_custom_list_table_row_item_affiliate_account_customers( $item ) {
    	
    	if ( empty( $item['reference'] ) ) {
    		return $item;
    	}
    	
    	$order = wc_get_order( $item['reference'] );
    	
    	if ( empty( $order ) ) {
    		return $item;
    	}
    	
    	$item['customer'] = $order->get_billing_first_name() . ' ' . $order->get_billing_last_name();
    	
    	return $item;
    	
    }
    add_filter( 'slicewp_list_table_row_item_affiliate_account_commissions', 'slicewp_custom_list_table_row_item_affiliate_account_customers' );

    The code does the following:

    1. Registers a new column, named “Customer”, in the commissions table from the affiliate’s account.
    2. Outputs the customer data saved in the WooCommerce order that is linked to the commission.

    I believe the code could help with this particular scenario your client needs.

    Please add the code to your client’s website and let me know how it goes.

    Thank you and best wishes,

    Mihai

    Thread Starter villdaniel

    (@villdaniel)

    Hi Mihai,

    Thank you very much. It works just as you described.

    Daniel

    Plugin Author iova.mihai

    (@iovamihai)

    Hey @villdaniel,

    Awesome! I’m happy to hear the code worked as intended! 😃

    Best wishes,

    Mihai

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Affiliate notification about purchase’ is closed to new replies.