Code Monkey home page Code Monkey logo

paddle-wp's Introduction

WordPress Paddle plugin

Import Paddle's javascript library, configure vendor settings and easily create checkout buttons.

Usage, licensing and support

This code is provided as an example plugin to implement the Paddle checkout on a Wordpress site. End users may use or modify the code as required subject to the license included.

Paddle does not provide technical support or maintenance for this plugin or any derivations of it.

Instructions

  • Upload the plugin as a zipped archive to the WordPress plugins tab
  • Activate the plugin
  • Set your vendor ID in the Paddle submenu of the Settings menu
  • Optionally set a custom selector to specify the element that triggers the checkout on click

Adding a checkout button to your page

To add a standard Paddle-styled button to your page, use the following code, replacing 12345 with the ID of the product you are selling:

<a href="#!" class="paddle_button" data-product="12345">Buy Now!</a>

To add an unstyled button to your page, you can use:

<a href="#!" class="buy-button" data-product="12345">Buy Now!</a>

You may also use a different class or id attribute and update the value of the custom selector above.

Specifying checkout properties

For either of the two above examples, you can specify additional checkout properties by adding data attributes to the tag. For example, to set the quantity of the checkout to 5 you can specify data-quantity="5".

See the Paddle documentation for a full list of the configurable checkout properties.

paddle-wp's People

Contributors

lukecav avatar paddledave avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.