Skip to content

Instantly share code, notes, and snippets.

@stompweb
Last active April 19, 2017 20:59
Show Gist options
  • Save stompweb/28078d47031c9a77ebaea66b38da533d to your computer and use it in GitHub Desktop.
Save stompweb/28078d47031c9a77ebaea66b38da533d to your computer and use it in GitHub Desktop.
<?php
class Order {
public function __construct() {
// Setup Orders table
add_action('init', array( $this, 'setupOrderTable' ) );
// Create an order when a user completes the form
add_action('init', array( $this, 'createOrder' ) );
// Update the order to complete when payment is made.
add_action('init', array( $this, 'completeOrder' ) );
}
public function createOrder() {
}
public function completeOrder() {
}
public function getOrders() {
}
public function setupOrderTable() {
}
}
$order = new Order();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment