Post Pay Counter

The best way to pay authors on WordPress

  • Features
    • PRO version
  • Cart
    • Addons
  • Documentation
  • Support

Recently Purchased need help

by

› Forums › Post Pay Counter PRO › Support › Recently Purchased need help

We are based in Europe with a GMT+1/GMT+2 time zone - support replies may be delayed due to time zone differences with your country.

  • This topic has 7 replies, 1 voice, and was last updated 4 years, 11 months ago by Stefano.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • May 15, 2020 at 6:41 am #72466
    Rogger
    Guest

    Hi,
    Wonderful plugin, I need the following guidance from you to get the following data to show on a page separately.

    1. Total Adsense Earnings for current logged in author
    2. Total Views To date for current author
    3. Total Views this month current author
    4. Total Paid for current author.

    I need all this data separately using shortcode or a php post meta function. Kindly put me in the right direction.

    Thanks

    May 15, 2020 at 3:36 pm #72480
    Stefano
    Keymaster

    Hi Rogger,
    have you already had a look at our shortcode tutorial? ๐Ÿ™‚

    Display stats details in public pages with Post Pay Counter PRO shortcode

    A nice day,
    Stefano

    May 15, 2020 at 9:02 pm #72488
    Rogger
    Guest

    Yes, Stefano, I have looking into it. But I need to get the one number per shortcode like Total Adsense revenue not all the table. Thanks

    May 17, 2020 at 10:19 am #72544
    Stefano
    Keymaster

    Hi Rogger,
    there is no straightforward to get that figure out individually, I am afraid. You can find it in the overall stats at the bottom of the shortcode stats, but not individually :\

    May 17, 2020 at 10:31 am #72547
    Rogger
    Guest

    Can I do it using a function or some php code? It’s quite important

    May 19, 2020 at 5:21 am #72582
    Stefano
    Keymaster

    This PHP snippet will extract the total adsense revenue for the given author ID (for the default time range), and store it in the variable $total_adsense:

    PPC_general_functions::get_default_stats_time_range( PPC_general_functions::get_settings('general') );
    $start_time = $ppc_global_settings['stats_tstart'];
    $end_time = $ppc_global_settings['stats_tend'];
    
    $stats = PPC_generate_stats::produce_stats($start_time, $end_time);
    $raw_stats = $stats['raw_stats'];
    $author_ID = 1;
    $total_adsense = $raw_stats[$author_ID]['total']['ppc_payment']['due_payment']['adsense_revenues'];

    If you want to see all possible choices/the data structure, add
    var_dump($raw_stats[$author_ID]['total']);

    Some more details

    Hope this helps! ๐Ÿ™‚
    A nice day,
    Stefano

    • This reply was modified 4 years, 11 months ago by Stefano.
    • This reply was modified 4 years, 11 months ago by Stefano. Reason: added new doc link
    May 29, 2020 at 12:55 pm #72793
    Joe C
    Guest

    Hey Stefano

    Used this for years. Recently changed my website and repurchased Pro

    When I install, connect my key, and go to connect analytics, enter my code, I get this error:

    Error: 401: {“error”:{“errors”:[{“domain”:”global”,”reason”:”required”,”message”:”Login Required”,”locationType”:”header”,”location”:”Authorization”}],”code”:401,”message”:”Login Required”}}

    Sorry I’m posting here, I can’t create a new thread on this forum (chrome issue?)

    Joe

    May 29, 2020 at 9:13 pm #72809
    Stefano
    Keymaster

    Hi Joe,
    Uhm, I a bit at a loos here, we didn’t change anything in the auth flow… Could you please try to deactivate for a second all other plugins (or at least all which have google dependencies) and check if it persists? ๐Ÿ™‚

    A nice day,
    Stefano

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Recently Purchased need help’ is closed to new replies.

Your cart

Number of items in cart: 0

  • Your cart is empty.
  • Total: €0.00
  • Checkout

What are you looking for?

BEFORE POSTING

Before posting, please please please do have a look at our Documentation section. Your problem may be addressed there, allowing you to solve it without help from us :)

Copyright © 2025 ยท Centric Theme on Genesis Framework ยท WordPress ยท Log in