• Resolved wmhit

    (@wmhit)


    Is there an easy way we can import player data with CAPs Metric, to update current players, we have over 5000 so cant really do this manually.

    we can see how to import player csv but it looks like it doesn’t update the Metrics or custom fields, any advice appreciated

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Savvas

    (@savvasha)

    Hi there @wmhit,

    Currently SportsPress Players Import tool support the following details to be imported:

    • Squad Number
    • Name
    • Positions
    • Teams
    • Leagues
    • Seasons
    • Nationality
    • Date of Birth

    To include other details to the import process you will need to customize the SP_Player_Importer Class, which can be found at /wp-content/plugins/sportspress/includes/admin/importers/class-sp-player-importer.php

    Thanks,
    Savvas

    Thread Starter wmhit

    (@wmhit)

    Thanks Savvas, appreciate the advice, is there any guidance or things to watch out for there or in the GitHub for this customization process?

    Thread Starter wmhit

    (@wmhit)

    so I have customised the importer and it imports to the player record, but adds it to the custom fields of the player rather than the metric, is there a different way to get it into the metric? I tried using the name of the metric but it just added another custom field

    Plugin Contributor Savvas

    (@savvasha)

    Metrics are stored as post_meta on each player. The key for this post_meta is sp_metrics. It is stored as an array, which array includes all the metrics of the player. So you will need to populate the array and update the post_meta of each player.

    Thanks,
    Savvas

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Updating stats with import?’ is closed to new replies.