• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Stripe Plugins

Stripe payment plugins for your WordPress site

  • Home
  • Documentation
  • Addons
  • Login
    • Sign In
    • Edit Profile
    • My Downloads
  • Support
    • Support Forum
    • Forum Search
    • Forum Login
    • Forum Registration
  • Contact Us
  • Show Search
Hide Search
You are here: Home / Topics / How to get JSON data from custom field?

[Support request] How to get JSON data from custom field?

· ·

Home › Forums › Stripe Payments Plugin › How to get JSON data from custom field?

Tagged: custom field

This topic contains 2 replies, has 3 voices, and was last updated by  alexanderfoxc 1 year ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • December 30, 2019 at 3:07 am #2564

    moonbase
    Participant

    Uses the stripe custom plug-in additional custom field. Could you tell me how to get the value entered in the created field as JSON data?

    December 30, 2019 at 7:12 am #2565

    Admin
    Keymaster

    This is not something we offer (this is not an advertized feature). The custom field data is available in the orders menu. You can also add it to the seller notification email.

    January 6, 2020 at 11:00 am #2593

    alexanderfoxc
    Keymaster

    If you know WP programming, you can get custom fields by hooking into following action:

    asp_stripe_payment_completed

    Here’s a quick example:

    function get_custom_fields_data($data, $charge) {
    if (isset($data['custom_fields']) {
    // we got custom fields
    $custom_fields=$data['custom_fields'];
    } else {
    // no custom fields
    }
    }
    
    add_action('asp_stripe_payment_completed','get_custom_fields_data',10,2);
    

    You’ll get custom fields in $custom_fields PHP array. You can then convert it to JSON or do whatever you like with it.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Primary Sidebar

Search

Featured Addons and Extensions

  • Subscription Payments Addon
  • Additional Custom Fields
  • Secure Downloads Addon
  • Apple Pay and Google Pay

Addon Bundle

Stripe Payments Addon Bundle

Support Links

  • Support Forum
  • Forum Registration

Copyright © 2021 | Stripe Plugins | A member of the Tips and Tricks HQ family.