Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter gaianhelmers

    (@gaianhelmers)

    I’ve been looking at the code in the addon and I see the function I want to call:
    awts_get_total_sales_per_product($product_id ='')

    But I don’t know how to call it from my little shortcode function.

    What do I have to include in my function to be able to refer to that method?

    Edit:
    As I’m reading through your functions, I’m not sure if that’s actually the function I want to call.
    What I want is what I’ve stated in the original question. A function where I call it with a product id as the argument and I receive the earnings that that product has accumulated. I know it already exists in some capacity because you display the product’s earnings in the back end on the edit product page.

    • This reply was modified 7 years, 9 months ago by gaianhelmers. Reason: Adding to the post
    Thread Starter gaianhelmers

    (@gaianhelmers)

    Due to the inactivity of the support mod and the urgency of my completing this design I took the function I needed from the plugin and pasted it into my own code so I can call the function as I need.

    I was correct in assuming that awts_get_total_sales_per_product($product_id ='') was the right function. It returns the total ‘number’ of sales as well as the total sales for the product.

    I wrote out my answer more in depth on my Stack Overflow question.

    Plugin Author Shiva Shanker Bhatta

    (@shivashankerbhatta)

    Sorry for late response.Really happy to know that you had found the solutions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Programatically call total sales by item?’ is closed to new replies.