| 1 |
<?php |
| 2 |
/** |
| 3 |
* Post Type Constants |
| 4 |
* |
| 5 |
* @package Easy_Invoice |
| 6 |
* @subpackage Constants |
| 7 |
*/ |
| 8 |
|
| 9 |
namespace EasyInvoice\Constants; |
| 10 |
|
| 11 |
/** |
| 12 |
* PostType Constants Class |
| 13 |
* |
| 14 |
* Centralized post type definitions for the Easy Invoice plugin. |
| 15 |
*/ |
| 16 |
class PostTypes { |
| 17 |
/** |
| 18 |
* Invoice post type |
| 19 |
*/ |
| 20 |
public const EASY_INVOICE_POST_TYPE = 'easy_invoice'; |
| 21 |
|
| 22 |
/** |
| 23 |
* Quote post type |
| 24 |
*/ |
| 25 |
public const EASY_INVOICE_QUOTE_POST_TYPE = 'easy_invoice_quote'; |
| 26 |
|
| 27 |
/** |
| 28 |
* Payment post type |
| 29 |
*/ |
| 30 |
public const EASY_INVOICE_PAYMENT_POST_TYPE = 'easy_invoice_payment'; |
| 31 |
|
| 32 |
/** |
| 33 |
* Recurring invoice post type (Pro) |
| 34 |
*/ |
| 35 |
public const EASY_INVOICE_RECURRING_POST_TYPE = 'easy_invoice_recurring'; |
| 36 |
|
| 37 |
/** |
| 38 |
* Credit note post type |
| 39 |
* |
| 40 |
* Its own type rather than an invoice with a flag: a credit note has its |
| 41 |
* own numbering sequence, must never appear in an invoice listing or total, |
| 42 |
* and is a different document to a tax authority. |
| 43 |
* |
| 44 |
* Named `easy_invoice_credit` rather than `..._credit_note` because |
| 45 |
* WordPress rejects post type names longer than 20 characters, and the |
| 46 |
* fuller name is 24. register_post_type() returns a WP_Error nobody checks, |
| 47 |
* so the type simply never exists. |
| 48 |
*/ |
| 49 |
public const EASY_INVOICE_CREDIT_NOTE_POST_TYPE = 'easy_invoice_credit'; |
| 50 |
|
| 51 |
|
| 52 |
} |