Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

245
Views
Best way to store and access data with WordPress?

I am using a payment system which does not allow me to make quantity limitation.

So if I want to limit the purchases of a product A to a number X, I can't do it natively.

The website I am using is a WordPress with LeadPages onto it.

I want to be able to store my value X globally and each time a purchase is registered I will decrement X until X = 0 and disable the purchase button.

I thought about creating a DB in WordPress but I am not sure it is the best solution. Because the credentials to access it would be visible on the client side javascript code.

I also saw this solution with JSON Data : REST API - youtube

But again, I am not really sure if it is valid solution.

Thank you for your help on this :-)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I thought about creating a DB in WordPress

Please don't. WordPress already has pretty much everything you would need to manage data, and more.

I want to be able to store my value X globally

Look at WordPress Options API

I want to limit the purchases of a product A to a number X

Assuming the product is a CPT, have a read on custom fields and post_meta

Also, check out the Settings API and pretty much the full developer's handbook of WP because what you are asking is definitely achievable with WordPress. Good luck!

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!