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

Payments Plugin for Stripe

Stripe payment plugins for your WordPress site

  • Home
  • Documentation
  • Addons
  • Login
    • Sign In
    • Edit Profile
    • Terms & Conditions
    • My Downloads
    • License Key
  • Support
    • Support Forum
    • Forum Search
    • Forum Login
    • Forum Registration
    • Email Support for Customers
  • Contact Us
  • Show Search
Hide Search
You are here: Home / Replies /

Reply To: How to get JSON data from custom field?

· ·

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

January 6, 2020 at 11:00 am #2593
alexanderfoxc
Participant

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.

Primary Sidebar

Featured Addons and Extensions

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

Addon Bundle

Stripe Payments Addon Bundle

A Simple & Lightweight Plugin

Our Philosophy with the Plugin

Support Links

  • Support Forum
  • Support Contact

Search

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