• Skip to main content

Victor Font Consulting Group, LLC

Digital Business Strategists

Call Us:

+1 919-604-5828

  • Home
  • Care Plans
    • Care Articles
    • Optional Subscriptions
  • Consultations
  • Products
    • Code Snippets
    • Public GitHub Repositories
    • Gist Snippets
    • Pastebin Snippets (Free)
    • Free Plugins
  • FAQs
  • Support
    • Graphic Design
  • Our Team
    • Contact
    • Speakers
    • Portfolio
  • Resources
    • Free WordPress Video Training
    • Tutorials
    • Articles
    • Cybersecurity
    • EU Referral Network
You are here: Home / Code Snippet / Prorate WP eStore Membership Fees

Prorate WP eStore Membership Fees

By Victor M. Font Jr.
June 2, 2015Leave a Comment

Prorate WP eStore Membership FeesBeka Rice published an article for SellwithWP where she compiled statistics about eCommerce plugin use for WordPress powered sites. Not surprisingly, WooCommerce takes the lead with a 78.4% market share for the 505,409 sites cataloged by BuiltWith.

When I build an eCommerce site these days, my go to plugin is WooCommerce. It's highly customizable and can be tailored to meet my clients' requirements. There are a few older sites I maintain that use the WP eStore plugin from Tips and Tricks HQ. WP eStore owns a 2.6% market share, but if you take WooCommerce out of the mix, the percentage soars to 12%. Even with these numbers, it ranks in fourth place after WooCommerce, WP eCommerce, and Easy Digital Downloads respectively.

One site that I maintain that uses WP eStore is the North Carolina Executive Roundtable. The North Carolina Executive Roundtable is a professional association of senior-level executives. Membership is by invitation only. To become a member, a candidate is sponsored by an existing member and the candidate must possess certain qualifications that are vetted by the membership committee. Once a candidate is approved, a user ID and password to the membership area are issued and the new member pays their initiation fee and first year's dues online. The dues are supposed to be prorated based on the month the new member joins.

Membership fee proration has been an ongoing issue that has needed to be addressed. Wp eStore does not provide a method to calculate prorated amounts. Our choices have been limited. We could either provide a "product" for each month of the year creating a situation where a new member would have to choose from one of twelve options, or we could drop the online payment altogether and let the membership committee issue a prorated bill. Neither of these choices is appealing.

The code below, when inserted into the product page, will prorate an amount based on the month of the year. The prorated amount is passed on to PayPal so the billing remains accurate. The NCER system is built atop the Genesis Framwork. As such, the site also uses the Genesis Simple Hooks plugin, which allows you to insert code (HTML, Shortcodes, and PHP), and attach it to any of the 50+ action hooks throughout the Genesis Theme Framework from StudioPress.

The code works by first testing the id of the page being loaded. If the page id matches the id of the page where the product is listed, the jQuery script is inserted into the page footer area. After retrieving the current date and setting up the variables, the code simply applies a new price to the necessary fields on the page. The last three lines of jQuery code apply the new price to the text display and two hidden fields that pass the amount to PayPal.




  • 0share
  • Facebook0
  • Twitter0
  • Pinterest0
  • LinkedIn0
  • Print
  • SMS0

About Victor M. Font Jr.

Victor M. Font Jr. is an award winning author, entrepreneur, and Senior IT Executive. A Founding Board Member of the North Carolina Executive Roundtable, he has served on the Board of Advisors, of the North Carolina Technology Association, the International Institute of Business Analysis, Association of Information Technology Professionals, Toastmasters International, and the North Carolina Commission for Mental Health, Developmental Disabilities, and Substance Abuse Services. He is author of several books including The Ultimate Guide to the SDLC and Winning With WordPress Basics, and Cybersecurity.

Reader Interactions

VictorFont.com runs on the Genesis Framework

Genesis FrameworkThe Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Check out the incredible features and the selection of designs. It's that simple—start using Genesis now!

Click here to download The Genesis Guide for Absolute Beginners (PDF - 1.4 MB)

Leave a Reply Cancel reply

Your email address and website will not be published. Required fields are marked *
Posting a comment means that you agree with and accept our Comment & Product Review Policy

Call: +1 919-604-5828

Send us an E-mail

Accessibility Statement | Affiliate Marketing Disclosure | Capability Statement

Cookie Policy | Comment & Product Review Policy | Privacy Policy | Site Map | Terms & Conditions

Copyright © 2003–2021 Victor M. Font Jr.

Return to top of page
Cover image: 5 Things You Can Fix On Your Website In The Next Week To Increase Engagement

Attract New Customers Automatically for Free!

  • Learn how to use the Internet to attract REAL clients
  • Avoid the 3 big mistakes EVERYBODY makes
  • Put this system on AUTOPILOT with the tools the Pros use!

GET YOUR COPY!

This little ebook has helped hundreds of business professionals get real results.
Now it's your turn!

ebook lead capture
Privacy Policy
{"cookieName":"wBounce","isAggressive":false,"isSitewide":true,"hesitation":"","openAnimation":false,"exitAnimation":false,"timer":"","sensitivity":"","cookieExpire":"7","cookieDomain":"","autoFire":"","isAnalyticsEnabled":false}
We only use analytical cookies on our website that allow us to recognize and count the number of visitors, but they do not identify you individually. They help us to improve the way our website works. By clicking Accept you, agree to cookies being used in accordance with our Cookie Policy.OkNoCookie policy