Coder Social home page Coder Social logo

gmt-edd-for-courses's Introduction

GMT EDD for Courses

Add Easy Digital Downloads integration to the GMT Courses plugin.

Download EDD for Courses

Getting Started

Getting started with EDD for Courses is as simple as installing a plugin:

  1. Upload the gmt-edd-for-courses folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Select which downloads should have access to a course under Lessons > Courses in the Dashboard.

And that's it, you're done. Nice work!

It's recommended that you also install the GitHub Updater plugin to get automattic updates.

Utility methods

/**
 * Get all available downloads
 * @param  boolean $any If true, get all downloads, including unpublished
 * @return array        The downloads
 */
gmt_edd_for_courses_get_downloads( $any = true );


/**
 * Get all available courses
 * @param  boolean $any If true, get all courses, including unpublished
 * @return array        The courses
 */
function gmt_edd_for_courses_get_courses( $any = true );


/**
 * Get the downloads a user has purchased
 * @param  string $email The user's email address
 * @return array         The user's downloads
 */
gmt_edd_for_courses_get_user_downloads( $email = null );


/**
 * Get the courses that the user has access to
 * @param  string $email The user's email address
 * @return array         The courses that the user has access to
 */
gmt_edd_for_courses_get_purchased_courses( $email = null );


/**
 * Check if user can access a course
 * @param  number $course_id The course ID
 * @param  string $email     The user's email address
 * @return boolean           If true, the user can access the course
 */
gmt_edd_for_courses_user_has_access( $course_id = null, $email = null );


/**
 * Get the download links that the user has access to for a course
 * @param  number $course_id The course ID
 * @param  string $email     The user's email address
 * @return array             The course downloads
 */
gmt_edd_for_courses_get_download_links( $course_id = null, $email = null );

Shortcodes

Dynamic "Buy Now" Links

Create buy now links that disable and display a custom message when the visitor has already purchased the download.

[edd_for_courses_buy_now id="DOWNLOAD_ID"]

Options:

  • checkout - If true, send buyer directly to checkout
  • gateway - If true, send buyer directly to payment gateway
  • price - (integer) A specific price ID to use for variable pricing
  • discount - Automatically add a discount code to the purchase
  • buy - The language to use for the link
  • owned - The language to use if the visitor already owns the download
  • class - The class(es) to use for the link
[edd_for_courses_buy_now id="123" checkout="true" price="2" buy="Buy Now!" owned="You already own this course" class="btn"]

How to Contribute

Please read the Contribution Guidelines.

License

The code is available under the GPLv3.

gmt-edd-for-courses's People

Contributors

cferdinandi avatar

Watchers

James Cloos avatar Vijay Rudraraju avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.