@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -defined( 'ABSPATH' ) || exit; |
|
| 7 | +defined('ABSPATH') || exit; |
|
| 8 | 8 | |
| 9 | 9 | $tax_rates = GetPaid_Tax::get_all_tax_rates(); |
| 10 | 10 | $dummy_rate = array( |
@@ -13,12 +13,12 @@ discard block |
||
| 13 | 13 | 'global' => true, |
| 14 | 14 | 'rate' => wpinv_get_default_tax_rate(), |
| 15 | 15 | 'reduced_rate' => 5, |
| 16 | - 'name' => __( 'VAT', 'invoicing' ), |
|
| 16 | + 'name' => __('VAT', 'invoicing'), |
|
| 17 | 17 | ); |
| 18 | 18 | |
| 19 | 19 | $reset_url = esc_url( |
| 20 | 20 | wp_nonce_url( |
| 21 | - add_query_arg( 'getpaid-admin-action', 'reset_tax_rates' ), |
|
| 21 | + add_query_arg('getpaid-admin-action', 'reset_tax_rates'), |
|
| 22 | 22 | 'getpaid-nonce', |
| 23 | 23 | 'getpaid-nonce' |
| 24 | 24 | ) |
@@ -27,34 +27,34 @@ discard block |
||
| 27 | 27 | ?> |
| 28 | 28 | <div class="table-responsive"> |
| 29 | 29 | <table id="wpinv_tax_rates" class="widefat fixed table"> |
| 30 | - <caption><?php echo esc_html_e( 'Enter tax rates for specific regions.', 'invoicing' ); ?></caption> |
|
| 30 | + <caption><?php echo esc_html_e('Enter tax rates for specific regions.', 'invoicing'); ?></caption> |
|
| 31 | 31 | |
| 32 | 32 | <thead> |
| 33 | 33 | <tr class="table-light"> |
| 34 | 34 | |
| 35 | 35 | <th scope="col" class="border-bottom border-top"> |
| 36 | - <?php _e( 'Country', 'invoicing' ); ?> |
|
| 37 | - <?php echo getpaid_get_help_tip( __( 'Optionally limit this tax rate to a specific country.', 'invoicing' ), 'position-static' ); ?> |
|
| 36 | + <?php _e('Country', 'invoicing'); ?> |
|
| 37 | + <?php echo getpaid_get_help_tip(__('Optionally limit this tax rate to a specific country.', 'invoicing'), 'position-static'); ?> |
|
| 38 | 38 | </th> |
| 39 | 39 | |
| 40 | 40 | <th scope="col" class="border-bottom border-top"> |
| 41 | - <?php _e( 'State', 'invoicing' ); ?> |
|
| 42 | - <?php echo getpaid_get_help_tip( __( 'Separate state codes using a comma or leave blank to apply country wide.', 'invoicing' ), 'position-static' ); ?> |
|
| 41 | + <?php _e('State', 'invoicing'); ?> |
|
| 42 | + <?php echo getpaid_get_help_tip(__('Separate state codes using a comma or leave blank to apply country wide.', 'invoicing'), 'position-static'); ?> |
|
| 43 | 43 | </th> |
| 44 | 44 | |
| 45 | 45 | <th scope="col" class="border-bottom border-top"> |
| 46 | - <?php _e( 'Standard Rate %', 'invoicing' ); ?> |
|
| 47 | - <?php echo getpaid_get_help_tip( __( 'The tax rate (percentage) to charge on items that use the "Standard rate" tax class.', 'invoicing' ), 'position-static' ); ?> |
|
| 46 | + <?php _e('Standard Rate %', 'invoicing'); ?> |
|
| 47 | + <?php echo getpaid_get_help_tip(__('The tax rate (percentage) to charge on items that use the "Standard rate" tax class.', 'invoicing'), 'position-static'); ?> |
|
| 48 | 48 | </th> |
| 49 | 49 | |
| 50 | 50 | <th scope="col" class="border-bottom border-top"> |
| 51 | - <?php _e( 'Reduced Rate %', 'invoicing' ); ?> |
|
| 52 | - <?php echo getpaid_get_help_tip( __( 'The tax rate (percentage) to charge on items that use the "Reduced rate" tax class.', 'invoicing' ), 'position-static' ); ?> |
|
| 51 | + <?php _e('Reduced Rate %', 'invoicing'); ?> |
|
| 52 | + <?php echo getpaid_get_help_tip(__('The tax rate (percentage) to charge on items that use the "Reduced rate" tax class.', 'invoicing'), 'position-static'); ?> |
|
| 53 | 53 | </th> |
| 54 | 54 | |
| 55 | 55 | <th scope="col" class="border-bottom border-top"> |
| 56 | - <?php _e( 'Tax Name', 'invoicing' ); ?> |
|
| 57 | - <?php echo getpaid_get_help_tip( __( 'The name of this tax, e.g VAT.', 'invoicing' ), 'position-static' ); ?> |
|
| 56 | + <?php _e('Tax Name', 'invoicing'); ?> |
|
| 57 | + <?php echo getpaid_get_help_tip(__('The name of this tax, e.g VAT.', 'invoicing'), 'position-static'); ?> |
|
| 58 | 58 | </th> |
| 59 | 59 | |
| 60 | 60 | <th scope="col" class="border-bottom border-top" style="width:32px"> </th> |
@@ -63,19 +63,19 @@ discard block |
||
| 63 | 63 | </thead> |
| 64 | 64 | |
| 65 | 65 | <tbody> |
| 66 | - <?php array_walk( $tax_rates, 'wpinv_tax_rate_callback' ); ?> |
|
| 66 | + <?php array_walk($tax_rates, 'wpinv_tax_rate_callback'); ?> |
|
| 67 | 67 | </tbody> |
| 68 | 68 | |
| 69 | 69 | <tfoot> |
| 70 | 70 | <tr class="table-light"> |
| 71 | 71 | <td colspan="6" class="border-top"> |
| 72 | 72 | |
| 73 | - <button type="button" class="button button-secondary wpinv_add_tax_rate" aria-label="<?php esc_attr_e( 'Add Tax Rate', 'invoicing' ); ?>"> |
|
| 74 | - <span><?php _e( 'Add Tax Rate', 'invoicing' ); ?></span> |
|
| 73 | + <button type="button" class="button button-secondary wpinv_add_tax_rate" aria-label="<?php esc_attr_e('Add Tax Rate', 'invoicing'); ?>"> |
|
| 74 | + <span><?php _e('Add Tax Rate', 'invoicing'); ?></span> |
|
| 75 | 75 | </button> |
| 76 | 76 | |
| 77 | - <a href="<?php echo $reset_url; ?>" class="button button-secondary wpinv_reset_tax_rates" aria-label="<?php esc_attr_e( 'Reset Tax Rates', 'invoicing' ); ?>"> |
|
| 78 | - <span><?php _e( 'Reset Tax Rates', 'invoicing' ); ?></span> |
|
| 77 | + <a href="<?php echo $reset_url; ?>" class="button button-secondary wpinv_reset_tax_rates" aria-label="<?php esc_attr_e('Reset Tax Rates', 'invoicing'); ?>"> |
|
| 78 | + <span><?php _e('Reset Tax Rates', 'invoicing'); ?></span> |
|
| 79 | 79 | </a> |
| 80 | 80 | </td> |
| 81 | 81 | </tr> |
@@ -84,6 +84,6 @@ discard block |
||
| 84 | 84 | </div> |
| 85 | 85 | |
| 86 | 86 | <script type="text/html" id="tmpl-wpinv-tax-rate-row"> |
| 87 | - <?php echo wpinv_tax_rate_callback( $dummy_rate, 0, false ); ?> |
|
| 87 | + <?php echo wpinv_tax_rate_callback($dummy_rate, 0, false); ?> |
|
| 88 | 88 | </script> |
| 89 | 89 | |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -defined( 'ABSPATH' ) || exit; |
|
| 7 | +defined('ABSPATH') || exit; |
|
| 8 | 8 | |
| 9 | 9 | /** |
| 10 | 10 | * The Subscriptions DB Class |
@@ -72,8 +72,8 @@ discard block |
||
| 72 | 72 | 'transaction_id' => '', |
| 73 | 73 | 'parent_payment_id' => 0, |
| 74 | 74 | 'product_id' => 0, |
| 75 | - 'created' => date( 'Y-m-d H:i:s' ), |
|
| 76 | - 'expiration' => date( 'Y-m-d H:i:s' ), |
|
| 75 | + 'created' => date('Y-m-d H:i:s'), |
|
| 76 | + 'expiration' => date('Y-m-d H:i:s'), |
|
| 77 | 77 | 'trial_period' => '', |
| 78 | 78 | 'status' => '', |
| 79 | 79 | 'profile_id' => '', |
@@ -86,8 +86,8 @@ discard block |
||
| 86 | 86 | * @access public |
| 87 | 87 | * @since 1.0.0 |
| 88 | 88 | */ |
| 89 | - public function get_subscriptions( $args = array() ) { |
|
| 90 | - return getpaid_get_subscriptions( $args ); |
|
| 89 | + public function get_subscriptions($args = array()) { |
|
| 90 | + return getpaid_get_subscriptions($args); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
@@ -96,8 +96,8 @@ discard block |
||
| 96 | 96 | * @access public |
| 97 | 97 | * @since 1.0.0 |
| 98 | 98 | */ |
| 99 | - public function count( $args = array() ) { |
|
| 100 | - return getpaid_get_subscriptions( $args, 'count' ); |
|
| 99 | + public function count($args = array()) { |
|
| 100 | + return getpaid_get_subscriptions($args, 'count'); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function create_table() { |
| 110 | 110 | |
| 111 | - require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); |
|
| 111 | + require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); |
|
| 112 | 112 | |
| 113 | 113 | $sql = "CREATE TABLE " . $this->table_name . " ( |
| 114 | 114 | id bigint(20) NOT NULL AUTO_INCREMENT, |
@@ -133,9 +133,9 @@ discard block |
||
| 133 | 133 | KEY customer_and_status ( customer_id, status) |
| 134 | 134 | ) CHARACTER SET utf8 COLLATE utf8_general_ci;"; |
| 135 | 135 | |
| 136 | - dbDelta( $sql ); |
|
| 136 | + dbDelta($sql); |
|
| 137 | 137 | |
| 138 | - update_option( $this->table_name . '_db_version', $this->version ); |
|
| 138 | + update_option($this->table_name . '_db_version', $this->version); |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | } |
| 142 | 142 | \ No newline at end of file |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | - exit; // Exit if accessed directly |
|
| 11 | + exit; // Exit if accessed directly |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | /** |
@@ -17,10 +17,10 @@ discard block |
||
| 17 | 17 | class GetPaid_Meta_Box_Item_VAT { |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | - * Output the metabox. |
|
| 21 | - * |
|
| 22 | - * @param WP_Post $post |
|
| 23 | - */ |
|
| 20 | + * Output the metabox. |
|
| 21 | + * |
|
| 22 | + * @param WP_Post $post |
|
| 23 | + */ |
|
| 24 | 24 | public static function output( $post ) { |
| 25 | 25 | |
| 26 | 26 | // Prepare the item. |
@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | - * Output the VAT rules settings. |
|
| 50 | - * |
|
| 51 | - * @param WPInv_Item $item |
|
| 52 | - */ |
|
| 49 | + * Output the VAT rules settings. |
|
| 50 | + * |
|
| 51 | + * @param WPInv_Item $item |
|
| 52 | + */ |
|
| 53 | 53 | public static function output_vat_rules( $item ) { |
| 54 | 54 | ?> |
| 55 | 55 | |
@@ -87,10 +87,10 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | /** |
| 90 | - * Output the VAT class settings. |
|
| 91 | - * |
|
| 92 | - * @param WPInv_Item $item |
|
| 93 | - */ |
|
| 90 | + * Output the VAT class settings. |
|
| 91 | + * |
|
| 92 | + * @param WPInv_Item $item |
|
| 93 | + */ |
|
| 94 | 94 | public static function output_vat_classes( $item ) { |
| 95 | 95 | ?> |
| 96 | 96 | |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | * |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 10 | +if (!defined('ABSPATH')) { |
|
| 11 | 11 | exit; // Exit if accessed directly |
| 12 | 12 | } |
| 13 | 13 | |
@@ -21,26 +21,26 @@ discard block |
||
| 21 | 21 | * |
| 22 | 22 | * @param WP_Post $post |
| 23 | 23 | */ |
| 24 | - public static function output( $post ) { |
|
| 24 | + public static function output($post) { |
|
| 25 | 25 | |
| 26 | 26 | // Prepare the item. |
| 27 | - $item = new WPInv_Item( $post ); |
|
| 27 | + $item = new WPInv_Item($post); |
|
| 28 | 28 | |
| 29 | 29 | echo "<div class='bsui' style='max-width: 600px;padding-top: 10px;'>"; |
| 30 | 30 | |
| 31 | - do_action( 'wpinv_item_before_vat_metabox', $item ); |
|
| 31 | + do_action('wpinv_item_before_vat_metabox', $item); |
|
| 32 | 32 | |
| 33 | 33 | // Output the vat rules settings. |
| 34 | - do_action( 'wpinv_item_vat_metabox_before_vat_rules', $item ); |
|
| 35 | - self::output_vat_rules( $item ); |
|
| 36 | - do_action( 'wpinv_item_vat_metabox_vat_rules', $item ); |
|
| 34 | + do_action('wpinv_item_vat_metabox_before_vat_rules', $item); |
|
| 35 | + self::output_vat_rules($item); |
|
| 36 | + do_action('wpinv_item_vat_metabox_vat_rules', $item); |
|
| 37 | 37 | |
| 38 | 38 | // Output vat class settings. |
| 39 | - do_action( 'wpinv_item_vat_metabox_before_vat_rules', $item ); |
|
| 40 | - self::output_vat_classes( $item ); |
|
| 41 | - do_action( 'wpinv_item_vat_metabox_vat_class', $item ); |
|
| 39 | + do_action('wpinv_item_vat_metabox_before_vat_rules', $item); |
|
| 40 | + self::output_vat_classes($item); |
|
| 41 | + do_action('wpinv_item_vat_metabox_vat_class', $item); |
|
| 42 | 42 | |
| 43 | - do_action( 'wpinv_item_vat_metabox', $item ); |
|
| 43 | + do_action('wpinv_item_vat_metabox', $item); |
|
| 44 | 44 | |
| 45 | 45 | echo '</div>'; |
| 46 | 46 | } |
@@ -50,14 +50,14 @@ discard block |
||
| 50 | 50 | * |
| 51 | 51 | * @param WPInv_Item $item |
| 52 | 52 | */ |
| 53 | - public static function output_vat_rules( $item ) { |
|
| 53 | + public static function output_vat_rules($item) { |
|
| 54 | 54 | ?> |
| 55 | 55 | |
| 56 | 56 | <div class="wpinv_vat_rules"> |
| 57 | 57 | |
| 58 | 58 | <div class="form-group row"> |
| 59 | 59 | <label for="wpinv_vat_rules" class="col-sm-3 col-form-label"> |
| 60 | - <?php _e( 'Tax Rule', 'invoicing' );?> |
|
| 60 | + <?php _e('Tax Rule', 'invoicing'); ?> |
|
| 61 | 61 | </label> |
| 62 | 62 | <div class="col-sm-8"> |
| 63 | 63 | <?php |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | array( |
| 66 | 66 | 'id' => 'wpinv_vat_rules', |
| 67 | 67 | 'name' => 'wpinv_vat_rules', |
| 68 | - 'placeholder' => __( 'Select tax rule', 'invoicing' ), |
|
| 69 | - 'value' => $item->get_vat_rule( 'edit' ), |
|
| 68 | + 'placeholder' => __('Select tax rule', 'invoicing'), |
|
| 69 | + 'value' => $item->get_vat_rule('edit'), |
|
| 70 | 70 | 'select2' => true, |
| 71 | 71 | 'data-allow-clear' => 'false', |
| 72 | 72 | 'no_wrap' => true, |
@@ -88,14 +88,14 @@ discard block |
||
| 88 | 88 | * |
| 89 | 89 | * @param WPInv_Item $item |
| 90 | 90 | */ |
| 91 | - public static function output_vat_classes( $item ) { |
|
| 91 | + public static function output_vat_classes($item) { |
|
| 92 | 92 | ?> |
| 93 | 93 | |
| 94 | 94 | <div class="wpinv_vat_classes"> |
| 95 | 95 | |
| 96 | 96 | <div class="form-group row"> |
| 97 | 97 | <label for="wpinv_vat_class" class="col-sm-3 col-form-label"> |
| 98 | - <?php _e( 'Tax Class', 'invoicing' );?> |
|
| 98 | + <?php _e('Tax Class', 'invoicing'); ?> |
|
| 99 | 99 | </label> |
| 100 | 100 | <div class="col-sm-8"> |
| 101 | 101 | <?php |
@@ -103,8 +103,8 @@ discard block |
||
| 103 | 103 | array( |
| 104 | 104 | 'id' => 'wpinv_vat_class', |
| 105 | 105 | 'name' => 'wpinv_vat_class', |
| 106 | - 'placeholder' => __( 'Select tax class', 'invoicing' ), |
|
| 107 | - 'value' => $item->get_vat_class( 'edit' ), |
|
| 106 | + 'placeholder' => __('Select tax class', 'invoicing'), |
|
| 107 | + 'value' => $item->get_vat_class('edit'), |
|
| 108 | 108 | 'select2' => true, |
| 109 | 109 | 'data-allow-clear' => 'false', |
| 110 | 110 | 'no_wrap' => true, |
@@ -55,27 +55,27 @@ |
||
| 55 | 55 | public static function vat_rates_settings() {} |
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | - * |
|
| 59 | - * @deprecated |
|
| 60 | - */ |
|
| 58 | + * |
|
| 59 | + * @deprecated |
|
| 60 | + */ |
|
| 61 | 61 | public static function vat_settings() {} |
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | - * |
|
| 65 | - * @deprecated |
|
| 66 | - */ |
|
| 64 | + * |
|
| 65 | + * @deprecated |
|
| 66 | + */ |
|
| 67 | 67 | public static function maxmind_folder() {} |
| 68 | 68 | |
| 69 | 69 | /** |
| 70 | - * |
|
| 71 | - * @deprecated |
|
| 72 | - */ |
|
| 70 | + * |
|
| 71 | + * @deprecated |
|
| 72 | + */ |
|
| 73 | 73 | public static function geoip2_download_database() {} |
| 74 | 74 | |
| 75 | 75 | /** |
| 76 | - * |
|
| 77 | - * @deprecated |
|
| 78 | - */ |
|
| 76 | + * |
|
| 77 | + * @deprecated |
|
| 78 | + */ |
|
| 79 | 79 | public static function geoip2_download_file() {} |
| 80 | 80 | |
| 81 | 81 | /** |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | * |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -defined( 'ABSPATH' ) || exit; |
|
| 7 | +defined('ABSPATH') || exit; |
|
| 8 | 8 | |
| 9 | 9 | /** |
| 10 | 10 | * @deprecated |
@@ -38,15 +38,15 @@ discard block |
||
| 38 | 38 | /** |
| 39 | 39 | * @deprecated |
| 40 | 40 | */ |
| 41 | - public static function is_eu_state( $country_code ) { |
|
| 42 | - return getpaid_is_eu_state( $country_code ); |
|
| 41 | + public static function is_eu_state($country_code) { |
|
| 42 | + return getpaid_is_eu_state($country_code); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * @deprecated |
| 47 | 47 | */ |
| 48 | - public static function is_gst_country( $country_code ) { |
|
| 49 | - return getpaid_is_gst_country( $country_code ); |
|
| 48 | + public static function is_gst_country($country_code) { |
|
| 49 | + return getpaid_is_gst_country($country_code); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | * @version 1.0.19 |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -defined( 'ABSPATH' ) || exit; |
|
| 9 | +defined('ABSPATH') || exit; |
|
| 10 | 10 | |
| 11 | 11 | return array( |
| 12 | 12 | 'AT', |
@@ -9,31 +9,31 @@ |
||
| 9 | 9 | defined( 'ABSPATH' ) || exit; |
| 10 | 10 | |
| 11 | 11 | return array( |
| 12 | - 'AT', |
|
| 13 | - 'BE', |
|
| 14 | - 'BG', |
|
| 15 | - 'HR', |
|
| 16 | - 'CY', |
|
| 17 | - 'CZ', |
|
| 18 | - 'DK', |
|
| 19 | - 'EE', |
|
| 20 | - 'FI', |
|
| 21 | - 'FR', |
|
| 22 | - 'DE', |
|
| 23 | - 'GR', |
|
| 24 | - 'HU', |
|
| 25 | - 'IE', |
|
| 26 | - 'IT', |
|
| 27 | - 'LV', |
|
| 28 | - 'LT', |
|
| 29 | - 'LU', |
|
| 30 | - 'MT', |
|
| 31 | - 'NL', |
|
| 32 | - 'PL', |
|
| 33 | - 'PT', |
|
| 34 | - 'RO', |
|
| 35 | - 'SK', |
|
| 36 | - 'SI', |
|
| 37 | - 'ES', |
|
| 38 | - 'SE' |
|
| 12 | + 'AT', |
|
| 13 | + 'BE', |
|
| 14 | + 'BG', |
|
| 15 | + 'HR', |
|
| 16 | + 'CY', |
|
| 17 | + 'CZ', |
|
| 18 | + 'DK', |
|
| 19 | + 'EE', |
|
| 20 | + 'FI', |
|
| 21 | + 'FR', |
|
| 22 | + 'DE', |
|
| 23 | + 'GR', |
|
| 24 | + 'HU', |
|
| 25 | + 'IE', |
|
| 26 | + 'IT', |
|
| 27 | + 'LV', |
|
| 28 | + 'LT', |
|
| 29 | + 'LU', |
|
| 30 | + 'MT', |
|
| 31 | + 'NL', |
|
| 32 | + 'PL', |
|
| 33 | + 'PT', |
|
| 34 | + 'RO', |
|
| 35 | + 'SK', |
|
| 36 | + 'SI', |
|
| 37 | + 'ES', |
|
| 38 | + 'SE' |
|
| 39 | 39 | ); |
@@ -13,233 +13,233 @@ |
||
| 13 | 13 | |
| 14 | 14 | return array( |
| 15 | 15 | |
| 16 | - 'id' => array( |
|
| 17 | - 'description' => __( 'Unique identifier for the item.', 'invoicing' ), |
|
| 18 | - 'type' => 'integer', |
|
| 19 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 20 | - 'readonly' => true, |
|
| 21 | - ), |
|
| 22 | - |
|
| 23 | - 'parent_id' => array( |
|
| 24 | - 'description' => __( 'Parent item ID.', 'invoicing' ), |
|
| 25 | - 'type' => 'integer', |
|
| 26 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 27 | - 'default' => 0, |
|
| 28 | - ), |
|
| 29 | - |
|
| 30 | - 'status' => array( |
|
| 31 | - 'description' => __( 'A named status for the item.', 'invoicing' ), |
|
| 32 | - 'type' => 'string', |
|
| 33 | - 'enum' => array( 'draft', 'pending', 'publish' ), |
|
| 34 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 35 | - 'default' => 'draft', |
|
| 36 | - ), |
|
| 37 | - |
|
| 38 | - 'version' => array( |
|
| 39 | - 'description' => __( 'Plugin version when the item was created.', 'invoicing' ), |
|
| 40 | - 'type' => 'string', |
|
| 41 | - 'context' => array( 'view', 'edit' ), |
|
| 42 | - 'readonly' => true, |
|
| 43 | - ), |
|
| 44 | - |
|
| 45 | - 'date_created' => array( |
|
| 46 | - 'description' => __( "The date the item was created, in the site's timezone.", 'invoicing' ), |
|
| 47 | - 'type' => 'string', |
|
| 48 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 49 | - ), |
|
| 50 | - |
|
| 51 | - 'date_created_gmt' => array( |
|
| 52 | - 'description' => __( 'The GMT date the item was created.', 'invoicing' ), |
|
| 53 | - 'type' => 'string', |
|
| 54 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 55 | - 'readonly' => true, |
|
| 56 | - ), |
|
| 57 | - |
|
| 58 | - 'date_modified' => array( |
|
| 59 | - 'description' => __( "The date the item was last modified, in the site's timezone.", 'invoicing' ), |
|
| 60 | - 'type' => 'string', |
|
| 61 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 62 | - 'readonly' => true, |
|
| 63 | - ), |
|
| 64 | - |
|
| 65 | - 'date_modified_gmt' => array( |
|
| 66 | - 'description' => __( 'The GMT date the item was last modified.', 'invoicing' ), |
|
| 67 | - 'type' => 'string', |
|
| 68 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 69 | - 'readonly' => true, |
|
| 70 | - ), |
|
| 71 | - |
|
| 72 | - 'name' => array( |
|
| 73 | - 'description' => __( "The item's name.", 'invoicing' ), |
|
| 74 | - 'type' => 'string', |
|
| 75 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 76 | - 'required' => true, |
|
| 77 | - ), |
|
| 78 | - |
|
| 79 | - 'description' => array( |
|
| 80 | - 'description' => __( "The item's description.", 'invoicing' ), |
|
| 81 | - 'type' => 'string', |
|
| 82 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 83 | - ), |
|
| 84 | - |
|
| 85 | - 'owner' => array( |
|
| 86 | - 'description' => __( 'The owner of the item (user id).', 'invoicing' ), |
|
| 87 | - 'type' => 'integer', |
|
| 88 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 89 | - ), |
|
| 90 | - |
|
| 91 | - 'price' => array( |
|
| 92 | - 'description' => __( 'The price of the item.', 'invoicing' ), |
|
| 93 | - 'type' => 'number', |
|
| 94 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 95 | - 'required' => true, |
|
| 96 | - ), |
|
| 97 | - |
|
| 98 | - 'the_price' => array( |
|
| 99 | - 'description' => __( 'The formatted price of the item.', 'invoicing' ), |
|
| 100 | - 'type' => 'string', |
|
| 101 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 102 | - 'readonly' => true, |
|
| 103 | - ), |
|
| 104 | - |
|
| 105 | - 'type' => array( |
|
| 106 | - 'description' => __( 'The item type.', 'invoicing' ), |
|
| 107 | - 'type' => 'string', |
|
| 108 | - 'enum' => wpinv_item_types(), |
|
| 109 | - 'default' => 'custom', |
|
| 110 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 111 | - ), |
|
| 112 | - |
|
| 113 | - 'vat_rule' => array( |
|
| 114 | - 'description' => __( 'VAT rule applied to the item.', 'invoicing' ), |
|
| 115 | - 'type' => 'string', |
|
| 116 | - 'enum' => array_keys( getpaid_get_tax_rules() ), |
|
| 117 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 118 | - ), |
|
| 119 | - |
|
| 120 | - 'vat_class' => array( |
|
| 121 | - 'description' => __( 'VAT class for the item.', 'invoicing' ), |
|
| 122 | - 'type' => 'string', |
|
| 123 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 124 | - 'enum' => array_keys( getpaid_get_tax_classes() ), |
|
| 125 | - ), |
|
| 126 | - |
|
| 127 | - 'custom_id' => array( |
|
| 128 | - 'description' => __( 'Custom id for the item.', 'invoicing' ), |
|
| 129 | - 'type' => 'string', |
|
| 130 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 131 | - ), |
|
| 16 | + 'id' => array( |
|
| 17 | + 'description' => __( 'Unique identifier for the item.', 'invoicing' ), |
|
| 18 | + 'type' => 'integer', |
|
| 19 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 20 | + 'readonly' => true, |
|
| 21 | + ), |
|
| 22 | + |
|
| 23 | + 'parent_id' => array( |
|
| 24 | + 'description' => __( 'Parent item ID.', 'invoicing' ), |
|
| 25 | + 'type' => 'integer', |
|
| 26 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 27 | + 'default' => 0, |
|
| 28 | + ), |
|
| 29 | + |
|
| 30 | + 'status' => array( |
|
| 31 | + 'description' => __( 'A named status for the item.', 'invoicing' ), |
|
| 32 | + 'type' => 'string', |
|
| 33 | + 'enum' => array( 'draft', 'pending', 'publish' ), |
|
| 34 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 35 | + 'default' => 'draft', |
|
| 36 | + ), |
|
| 37 | + |
|
| 38 | + 'version' => array( |
|
| 39 | + 'description' => __( 'Plugin version when the item was created.', 'invoicing' ), |
|
| 40 | + 'type' => 'string', |
|
| 41 | + 'context' => array( 'view', 'edit' ), |
|
| 42 | + 'readonly' => true, |
|
| 43 | + ), |
|
| 44 | + |
|
| 45 | + 'date_created' => array( |
|
| 46 | + 'description' => __( "The date the item was created, in the site's timezone.", 'invoicing' ), |
|
| 47 | + 'type' => 'string', |
|
| 48 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 49 | + ), |
|
| 50 | + |
|
| 51 | + 'date_created_gmt' => array( |
|
| 52 | + 'description' => __( 'The GMT date the item was created.', 'invoicing' ), |
|
| 53 | + 'type' => 'string', |
|
| 54 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 55 | + 'readonly' => true, |
|
| 56 | + ), |
|
| 57 | + |
|
| 58 | + 'date_modified' => array( |
|
| 59 | + 'description' => __( "The date the item was last modified, in the site's timezone.", 'invoicing' ), |
|
| 60 | + 'type' => 'string', |
|
| 61 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 62 | + 'readonly' => true, |
|
| 63 | + ), |
|
| 64 | + |
|
| 65 | + 'date_modified_gmt' => array( |
|
| 66 | + 'description' => __( 'The GMT date the item was last modified.', 'invoicing' ), |
|
| 67 | + 'type' => 'string', |
|
| 68 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 69 | + 'readonly' => true, |
|
| 70 | + ), |
|
| 71 | + |
|
| 72 | + 'name' => array( |
|
| 73 | + 'description' => __( "The item's name.", 'invoicing' ), |
|
| 74 | + 'type' => 'string', |
|
| 75 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 76 | + 'required' => true, |
|
| 77 | + ), |
|
| 78 | + |
|
| 79 | + 'description' => array( |
|
| 80 | + 'description' => __( "The item's description.", 'invoicing' ), |
|
| 81 | + 'type' => 'string', |
|
| 82 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 83 | + ), |
|
| 84 | + |
|
| 85 | + 'owner' => array( |
|
| 86 | + 'description' => __( 'The owner of the item (user id).', 'invoicing' ), |
|
| 87 | + 'type' => 'integer', |
|
| 88 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 89 | + ), |
|
| 90 | + |
|
| 91 | + 'price' => array( |
|
| 92 | + 'description' => __( 'The price of the item.', 'invoicing' ), |
|
| 93 | + 'type' => 'number', |
|
| 94 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 95 | + 'required' => true, |
|
| 96 | + ), |
|
| 97 | + |
|
| 98 | + 'the_price' => array( |
|
| 99 | + 'description' => __( 'The formatted price of the item.', 'invoicing' ), |
|
| 100 | + 'type' => 'string', |
|
| 101 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 102 | + 'readonly' => true, |
|
| 103 | + ), |
|
| 104 | + |
|
| 105 | + 'type' => array( |
|
| 106 | + 'description' => __( 'The item type.', 'invoicing' ), |
|
| 107 | + 'type' => 'string', |
|
| 108 | + 'enum' => wpinv_item_types(), |
|
| 109 | + 'default' => 'custom', |
|
| 110 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 111 | + ), |
|
| 112 | + |
|
| 113 | + 'vat_rule' => array( |
|
| 114 | + 'description' => __( 'VAT rule applied to the item.', 'invoicing' ), |
|
| 115 | + 'type' => 'string', |
|
| 116 | + 'enum' => array_keys( getpaid_get_tax_rules() ), |
|
| 117 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 118 | + ), |
|
| 119 | + |
|
| 120 | + 'vat_class' => array( |
|
| 121 | + 'description' => __( 'VAT class for the item.', 'invoicing' ), |
|
| 122 | + 'type' => 'string', |
|
| 123 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 124 | + 'enum' => array_keys( getpaid_get_tax_classes() ), |
|
| 125 | + ), |
|
| 126 | + |
|
| 127 | + 'custom_id' => array( |
|
| 128 | + 'description' => __( 'Custom id for the item.', 'invoicing' ), |
|
| 129 | + 'type' => 'string', |
|
| 130 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 131 | + ), |
|
| 132 | 132 | |
| 133 | - 'custom_name' => array( |
|
| 134 | - 'description' => __( 'Custom name for the item.', 'invoicing' ), |
|
| 135 | - 'type' => 'string', |
|
| 136 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 137 | - ), |
|
| 138 | - |
|
| 139 | - 'custom_singular_name' => array( |
|
| 140 | - 'description' => __( 'Custom singular name for the item.', 'invoicing' ), |
|
| 141 | - 'type' => 'string', |
|
| 142 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 143 | - ), |
|
| 144 | - |
|
| 145 | - 'is_dynamic_pricing' => array( |
|
| 146 | - 'description' => __( 'Whether or not customers can enter their own prices when checking out.', 'invoicing' ), |
|
| 147 | - 'type' => 'integer', |
|
| 148 | - 'enum' => array( 0, 1 ), |
|
| 149 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 150 | - ), |
|
| 151 | - |
|
| 152 | - 'minimum_price' => array( |
|
| 153 | - 'description' => __( 'For dynamic prices, this is the minimum price that a user can set.', 'invoicing' ), |
|
| 154 | - 'type' => 'number', |
|
| 155 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 156 | - ), |
|
| 157 | - |
|
| 158 | - 'is_recurring' => array( |
|
| 159 | - 'description' => __( 'Whether or not this is a subscription item.', 'invoicing' ), |
|
| 160 | - 'type' => 'integer', |
|
| 161 | - 'enum' => array( 0, 1 ), |
|
| 162 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 163 | - ), |
|
| 164 | - |
|
| 165 | - 'initial_price' => array( |
|
| 166 | - 'description' => __( 'The initial price of the item.', 'invoicing' ), |
|
| 167 | - 'type' => 'number', |
|
| 168 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 169 | - 'readonly' => true, |
|
| 170 | - ), |
|
| 171 | - |
|
| 172 | - 'the_initial_price' => array( |
|
| 173 | - 'description' => __( 'The formatted initial price of the item.', 'invoicing' ), |
|
| 174 | - 'type' => 'string', |
|
| 175 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 176 | - 'readonly' => true, |
|
| 177 | - ), |
|
| 178 | - |
|
| 179 | - 'recurring_price' => array( |
|
| 180 | - 'description' => __( 'The recurring price of the item.', 'invoicing' ), |
|
| 181 | - 'type' => 'number', |
|
| 182 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 183 | - 'readonly' => true, |
|
| 184 | - ), |
|
| 185 | - |
|
| 186 | - 'the_recurring_price' => array( |
|
| 187 | - 'description' => __( 'The formatted recurring price of the item.', 'invoicing' ), |
|
| 188 | - 'type' => 'string', |
|
| 189 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 190 | - 'readonly' => true, |
|
| 191 | - ), |
|
| 192 | - |
|
| 193 | - 'recurring_period' => array( |
|
| 194 | - 'description' => __( 'The recurring period for a recurring item.', 'invoicing' ), |
|
| 195 | - 'type' => 'string', |
|
| 196 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 197 | - 'enum' => array( 'D', 'W', 'M', 'Y' ), |
|
| 198 | - ), |
|
| 199 | - |
|
| 200 | - 'recurring_interval' => array( |
|
| 201 | - 'description' => __( 'The recurring interval for a subscription item.', 'invoicing' ), |
|
| 202 | - 'type' => 'integer', |
|
| 203 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 204 | - ), |
|
| 205 | - |
|
| 206 | - 'recurring_limit' => array( |
|
| 207 | - 'description' => __( 'The maximum number of renewals for a subscription item.', 'invoicing' ), |
|
| 208 | - 'type' => 'integer', |
|
| 209 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 210 | - ), |
|
| 211 | - |
|
| 212 | - 'is_free_trial' => array( |
|
| 213 | - 'description' => __( 'Whether the item has a free trial period.', 'invoicing' ), |
|
| 214 | - 'type' => 'integer', |
|
| 215 | - 'enum' => array( 0, 1 ), |
|
| 216 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 217 | - ), |
|
| 218 | - |
|
| 219 | - 'trial_period' => array( |
|
| 220 | - 'description' => __( 'The trial period.', 'invoicing' ), |
|
| 221 | - 'type' => 'string', |
|
| 222 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 223 | - 'enum' => array( 'D', 'W', 'M', 'Y' ), |
|
| 224 | - ), |
|
| 225 | - |
|
| 226 | - 'trial_interval' => array( |
|
| 227 | - 'description' => __( 'The trial interval.', 'invoicing' ), |
|
| 228 | - 'type' => 'integer', |
|
| 229 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 230 | - ), |
|
| 231 | - |
|
| 232 | - 'first_renewal_date' => array( |
|
| 233 | - 'description' => __( 'The first renewal date in case the item was to be bought today.', 'invoicing' ), |
|
| 234 | - 'type' => 'string', |
|
| 235 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 236 | - 'readonly' => true, |
|
| 237 | - ), |
|
| 238 | - |
|
| 239 | - 'edit_url' => array( |
|
| 240 | - 'description' => __( 'The URL to edit an item.', 'invoicing' ), |
|
| 241 | - 'type' => 'string', |
|
| 242 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 243 | - 'readonly' => true, |
|
| 244 | - ), |
|
| 133 | + 'custom_name' => array( |
|
| 134 | + 'description' => __( 'Custom name for the item.', 'invoicing' ), |
|
| 135 | + 'type' => 'string', |
|
| 136 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 137 | + ), |
|
| 138 | + |
|
| 139 | + 'custom_singular_name' => array( |
|
| 140 | + 'description' => __( 'Custom singular name for the item.', 'invoicing' ), |
|
| 141 | + 'type' => 'string', |
|
| 142 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 143 | + ), |
|
| 144 | + |
|
| 145 | + 'is_dynamic_pricing' => array( |
|
| 146 | + 'description' => __( 'Whether or not customers can enter their own prices when checking out.', 'invoicing' ), |
|
| 147 | + 'type' => 'integer', |
|
| 148 | + 'enum' => array( 0, 1 ), |
|
| 149 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 150 | + ), |
|
| 151 | + |
|
| 152 | + 'minimum_price' => array( |
|
| 153 | + 'description' => __( 'For dynamic prices, this is the minimum price that a user can set.', 'invoicing' ), |
|
| 154 | + 'type' => 'number', |
|
| 155 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 156 | + ), |
|
| 157 | + |
|
| 158 | + 'is_recurring' => array( |
|
| 159 | + 'description' => __( 'Whether or not this is a subscription item.', 'invoicing' ), |
|
| 160 | + 'type' => 'integer', |
|
| 161 | + 'enum' => array( 0, 1 ), |
|
| 162 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 163 | + ), |
|
| 164 | + |
|
| 165 | + 'initial_price' => array( |
|
| 166 | + 'description' => __( 'The initial price of the item.', 'invoicing' ), |
|
| 167 | + 'type' => 'number', |
|
| 168 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 169 | + 'readonly' => true, |
|
| 170 | + ), |
|
| 171 | + |
|
| 172 | + 'the_initial_price' => array( |
|
| 173 | + 'description' => __( 'The formatted initial price of the item.', 'invoicing' ), |
|
| 174 | + 'type' => 'string', |
|
| 175 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 176 | + 'readonly' => true, |
|
| 177 | + ), |
|
| 178 | + |
|
| 179 | + 'recurring_price' => array( |
|
| 180 | + 'description' => __( 'The recurring price of the item.', 'invoicing' ), |
|
| 181 | + 'type' => 'number', |
|
| 182 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 183 | + 'readonly' => true, |
|
| 184 | + ), |
|
| 185 | + |
|
| 186 | + 'the_recurring_price' => array( |
|
| 187 | + 'description' => __( 'The formatted recurring price of the item.', 'invoicing' ), |
|
| 188 | + 'type' => 'string', |
|
| 189 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 190 | + 'readonly' => true, |
|
| 191 | + ), |
|
| 192 | + |
|
| 193 | + 'recurring_period' => array( |
|
| 194 | + 'description' => __( 'The recurring period for a recurring item.', 'invoicing' ), |
|
| 195 | + 'type' => 'string', |
|
| 196 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 197 | + 'enum' => array( 'D', 'W', 'M', 'Y' ), |
|
| 198 | + ), |
|
| 199 | + |
|
| 200 | + 'recurring_interval' => array( |
|
| 201 | + 'description' => __( 'The recurring interval for a subscription item.', 'invoicing' ), |
|
| 202 | + 'type' => 'integer', |
|
| 203 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 204 | + ), |
|
| 205 | + |
|
| 206 | + 'recurring_limit' => array( |
|
| 207 | + 'description' => __( 'The maximum number of renewals for a subscription item.', 'invoicing' ), |
|
| 208 | + 'type' => 'integer', |
|
| 209 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 210 | + ), |
|
| 211 | + |
|
| 212 | + 'is_free_trial' => array( |
|
| 213 | + 'description' => __( 'Whether the item has a free trial period.', 'invoicing' ), |
|
| 214 | + 'type' => 'integer', |
|
| 215 | + 'enum' => array( 0, 1 ), |
|
| 216 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 217 | + ), |
|
| 218 | + |
|
| 219 | + 'trial_period' => array( |
|
| 220 | + 'description' => __( 'The trial period.', 'invoicing' ), |
|
| 221 | + 'type' => 'string', |
|
| 222 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 223 | + 'enum' => array( 'D', 'W', 'M', 'Y' ), |
|
| 224 | + ), |
|
| 225 | + |
|
| 226 | + 'trial_interval' => array( |
|
| 227 | + 'description' => __( 'The trial interval.', 'invoicing' ), |
|
| 228 | + 'type' => 'integer', |
|
| 229 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 230 | + ), |
|
| 231 | + |
|
| 232 | + 'first_renewal_date' => array( |
|
| 233 | + 'description' => __( 'The first renewal date in case the item was to be bought today.', 'invoicing' ), |
|
| 234 | + 'type' => 'string', |
|
| 235 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 236 | + 'readonly' => true, |
|
| 237 | + ), |
|
| 238 | + |
|
| 239 | + 'edit_url' => array( |
|
| 240 | + 'description' => __( 'The URL to edit an item.', 'invoicing' ), |
|
| 241 | + 'type' => 'string', |
|
| 242 | + 'context' => array( 'view', 'edit', 'embed' ), |
|
| 243 | + 'readonly' => true, |
|
| 244 | + ), |
|
| 245 | 245 | ); |
@@ -9,237 +9,237 @@ |
||
| 9 | 9 | * @version 1.0.19 |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -defined( 'ABSPATH' ) || exit; |
|
| 12 | +defined('ABSPATH') || exit; |
|
| 13 | 13 | |
| 14 | 14 | return array( |
| 15 | 15 | |
| 16 | 16 | 'id' => array( |
| 17 | - 'description' => __( 'Unique identifier for the item.', 'invoicing' ), |
|
| 17 | + 'description' => __('Unique identifier for the item.', 'invoicing'), |
|
| 18 | 18 | 'type' => 'integer', |
| 19 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 19 | + 'context' => array('view', 'edit', 'embed'), |
|
| 20 | 20 | 'readonly' => true, |
| 21 | 21 | ), |
| 22 | 22 | |
| 23 | 23 | 'parent_id' => array( |
| 24 | - 'description' => __( 'Parent item ID.', 'invoicing' ), |
|
| 24 | + 'description' => __('Parent item ID.', 'invoicing'), |
|
| 25 | 25 | 'type' => 'integer', |
| 26 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 26 | + 'context' => array('view', 'edit', 'embed'), |
|
| 27 | 27 | 'default' => 0, |
| 28 | 28 | ), |
| 29 | 29 | |
| 30 | 30 | 'status' => array( |
| 31 | - 'description' => __( 'A named status for the item.', 'invoicing' ), |
|
| 31 | + 'description' => __('A named status for the item.', 'invoicing'), |
|
| 32 | 32 | 'type' => 'string', |
| 33 | - 'enum' => array( 'draft', 'pending', 'publish' ), |
|
| 34 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 33 | + 'enum' => array('draft', 'pending', 'publish'), |
|
| 34 | + 'context' => array('view', 'edit', 'embed'), |
|
| 35 | 35 | 'default' => 'draft', |
| 36 | 36 | ), |
| 37 | 37 | |
| 38 | 38 | 'version' => array( |
| 39 | - 'description' => __( 'Plugin version when the item was created.', 'invoicing' ), |
|
| 39 | + 'description' => __('Plugin version when the item was created.', 'invoicing'), |
|
| 40 | 40 | 'type' => 'string', |
| 41 | - 'context' => array( 'view', 'edit' ), |
|
| 41 | + 'context' => array('view', 'edit'), |
|
| 42 | 42 | 'readonly' => true, |
| 43 | 43 | ), |
| 44 | 44 | |
| 45 | 45 | 'date_created' => array( |
| 46 | - 'description' => __( "The date the item was created, in the site's timezone.", 'invoicing' ), |
|
| 46 | + 'description' => __("The date the item was created, in the site's timezone.", 'invoicing'), |
|
| 47 | 47 | 'type' => 'string', |
| 48 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 48 | + 'context' => array('view', 'edit', 'embed'), |
|
| 49 | 49 | ), |
| 50 | 50 | |
| 51 | 51 | 'date_created_gmt' => array( |
| 52 | - 'description' => __( 'The GMT date the item was created.', 'invoicing' ), |
|
| 52 | + 'description' => __('The GMT date the item was created.', 'invoicing'), |
|
| 53 | 53 | 'type' => 'string', |
| 54 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 54 | + 'context' => array('view', 'edit', 'embed'), |
|
| 55 | 55 | 'readonly' => true, |
| 56 | 56 | ), |
| 57 | 57 | |
| 58 | 58 | 'date_modified' => array( |
| 59 | - 'description' => __( "The date the item was last modified, in the site's timezone.", 'invoicing' ), |
|
| 59 | + 'description' => __("The date the item was last modified, in the site's timezone.", 'invoicing'), |
|
| 60 | 60 | 'type' => 'string', |
| 61 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 61 | + 'context' => array('view', 'edit', 'embed'), |
|
| 62 | 62 | 'readonly' => true, |
| 63 | 63 | ), |
| 64 | 64 | |
| 65 | 65 | 'date_modified_gmt' => array( |
| 66 | - 'description' => __( 'The GMT date the item was last modified.', 'invoicing' ), |
|
| 66 | + 'description' => __('The GMT date the item was last modified.', 'invoicing'), |
|
| 67 | 67 | 'type' => 'string', |
| 68 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 68 | + 'context' => array('view', 'edit', 'embed'), |
|
| 69 | 69 | 'readonly' => true, |
| 70 | 70 | ), |
| 71 | 71 | |
| 72 | 72 | 'name' => array( |
| 73 | - 'description' => __( "The item's name.", 'invoicing' ), |
|
| 73 | + 'description' => __("The item's name.", 'invoicing'), |
|
| 74 | 74 | 'type' => 'string', |
| 75 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 75 | + 'context' => array('view', 'edit', 'embed'), |
|
| 76 | 76 | 'required' => true, |
| 77 | 77 | ), |
| 78 | 78 | |
| 79 | 79 | 'description' => array( |
| 80 | - 'description' => __( "The item's description.", 'invoicing' ), |
|
| 80 | + 'description' => __("The item's description.", 'invoicing'), |
|
| 81 | 81 | 'type' => 'string', |
| 82 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 82 | + 'context' => array('view', 'edit', 'embed'), |
|
| 83 | 83 | ), |
| 84 | 84 | |
| 85 | 85 | 'owner' => array( |
| 86 | - 'description' => __( 'The owner of the item (user id).', 'invoicing' ), |
|
| 86 | + 'description' => __('The owner of the item (user id).', 'invoicing'), |
|
| 87 | 87 | 'type' => 'integer', |
| 88 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 88 | + 'context' => array('view', 'edit', 'embed'), |
|
| 89 | 89 | ), |
| 90 | 90 | |
| 91 | 91 | 'price' => array( |
| 92 | - 'description' => __( 'The price of the item.', 'invoicing' ), |
|
| 92 | + 'description' => __('The price of the item.', 'invoicing'), |
|
| 93 | 93 | 'type' => 'number', |
| 94 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 94 | + 'context' => array('view', 'edit', 'embed'), |
|
| 95 | 95 | 'required' => true, |
| 96 | 96 | ), |
| 97 | 97 | |
| 98 | 98 | 'the_price' => array( |
| 99 | - 'description' => __( 'The formatted price of the item.', 'invoicing' ), |
|
| 99 | + 'description' => __('The formatted price of the item.', 'invoicing'), |
|
| 100 | 100 | 'type' => 'string', |
| 101 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 101 | + 'context' => array('view', 'edit', 'embed'), |
|
| 102 | 102 | 'readonly' => true, |
| 103 | 103 | ), |
| 104 | 104 | |
| 105 | 105 | 'type' => array( |
| 106 | - 'description' => __( 'The item type.', 'invoicing' ), |
|
| 106 | + 'description' => __('The item type.', 'invoicing'), |
|
| 107 | 107 | 'type' => 'string', |
| 108 | 108 | 'enum' => wpinv_item_types(), |
| 109 | 109 | 'default' => 'custom', |
| 110 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 110 | + 'context' => array('view', 'edit', 'embed'), |
|
| 111 | 111 | ), |
| 112 | 112 | |
| 113 | 113 | 'vat_rule' => array( |
| 114 | - 'description' => __( 'VAT rule applied to the item.', 'invoicing' ), |
|
| 114 | + 'description' => __('VAT rule applied to the item.', 'invoicing'), |
|
| 115 | 115 | 'type' => 'string', |
| 116 | - 'enum' => array_keys( getpaid_get_tax_rules() ), |
|
| 117 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 116 | + 'enum' => array_keys(getpaid_get_tax_rules()), |
|
| 117 | + 'context' => array('view', 'edit', 'embed'), |
|
| 118 | 118 | ), |
| 119 | 119 | |
| 120 | 120 | 'vat_class' => array( |
| 121 | - 'description' => __( 'VAT class for the item.', 'invoicing' ), |
|
| 121 | + 'description' => __('VAT class for the item.', 'invoicing'), |
|
| 122 | 122 | 'type' => 'string', |
| 123 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 124 | - 'enum' => array_keys( getpaid_get_tax_classes() ), |
|
| 123 | + 'context' => array('view', 'edit', 'embed'), |
|
| 124 | + 'enum' => array_keys(getpaid_get_tax_classes()), |
|
| 125 | 125 | ), |
| 126 | 126 | |
| 127 | 127 | 'custom_id' => array( |
| 128 | - 'description' => __( 'Custom id for the item.', 'invoicing' ), |
|
| 128 | + 'description' => __('Custom id for the item.', 'invoicing'), |
|
| 129 | 129 | 'type' => 'string', |
| 130 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 130 | + 'context' => array('view', 'edit', 'embed'), |
|
| 131 | 131 | ), |
| 132 | 132 | |
| 133 | 133 | 'custom_name' => array( |
| 134 | - 'description' => __( 'Custom name for the item.', 'invoicing' ), |
|
| 134 | + 'description' => __('Custom name for the item.', 'invoicing'), |
|
| 135 | 135 | 'type' => 'string', |
| 136 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 136 | + 'context' => array('view', 'edit', 'embed'), |
|
| 137 | 137 | ), |
| 138 | 138 | |
| 139 | 139 | 'custom_singular_name' => array( |
| 140 | - 'description' => __( 'Custom singular name for the item.', 'invoicing' ), |
|
| 140 | + 'description' => __('Custom singular name for the item.', 'invoicing'), |
|
| 141 | 141 | 'type' => 'string', |
| 142 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 142 | + 'context' => array('view', 'edit', 'embed'), |
|
| 143 | 143 | ), |
| 144 | 144 | |
| 145 | 145 | 'is_dynamic_pricing' => array( |
| 146 | - 'description' => __( 'Whether or not customers can enter their own prices when checking out.', 'invoicing' ), |
|
| 146 | + 'description' => __('Whether or not customers can enter their own prices when checking out.', 'invoicing'), |
|
| 147 | 147 | 'type' => 'integer', |
| 148 | - 'enum' => array( 0, 1 ), |
|
| 149 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 148 | + 'enum' => array(0, 1), |
|
| 149 | + 'context' => array('view', 'edit', 'embed'), |
|
| 150 | 150 | ), |
| 151 | 151 | |
| 152 | 152 | 'minimum_price' => array( |
| 153 | - 'description' => __( 'For dynamic prices, this is the minimum price that a user can set.', 'invoicing' ), |
|
| 153 | + 'description' => __('For dynamic prices, this is the minimum price that a user can set.', 'invoicing'), |
|
| 154 | 154 | 'type' => 'number', |
| 155 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 155 | + 'context' => array('view', 'edit', 'embed'), |
|
| 156 | 156 | ), |
| 157 | 157 | |
| 158 | 158 | 'is_recurring' => array( |
| 159 | - 'description' => __( 'Whether or not this is a subscription item.', 'invoicing' ), |
|
| 159 | + 'description' => __('Whether or not this is a subscription item.', 'invoicing'), |
|
| 160 | 160 | 'type' => 'integer', |
| 161 | - 'enum' => array( 0, 1 ), |
|
| 162 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 161 | + 'enum' => array(0, 1), |
|
| 162 | + 'context' => array('view', 'edit', 'embed'), |
|
| 163 | 163 | ), |
| 164 | 164 | |
| 165 | 165 | 'initial_price' => array( |
| 166 | - 'description' => __( 'The initial price of the item.', 'invoicing' ), |
|
| 166 | + 'description' => __('The initial price of the item.', 'invoicing'), |
|
| 167 | 167 | 'type' => 'number', |
| 168 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 168 | + 'context' => array('view', 'edit', 'embed'), |
|
| 169 | 169 | 'readonly' => true, |
| 170 | 170 | ), |
| 171 | 171 | |
| 172 | 172 | 'the_initial_price' => array( |
| 173 | - 'description' => __( 'The formatted initial price of the item.', 'invoicing' ), |
|
| 173 | + 'description' => __('The formatted initial price of the item.', 'invoicing'), |
|
| 174 | 174 | 'type' => 'string', |
| 175 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 175 | + 'context' => array('view', 'edit', 'embed'), |
|
| 176 | 176 | 'readonly' => true, |
| 177 | 177 | ), |
| 178 | 178 | |
| 179 | 179 | 'recurring_price' => array( |
| 180 | - 'description' => __( 'The recurring price of the item.', 'invoicing' ), |
|
| 180 | + 'description' => __('The recurring price of the item.', 'invoicing'), |
|
| 181 | 181 | 'type' => 'number', |
| 182 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 182 | + 'context' => array('view', 'edit', 'embed'), |
|
| 183 | 183 | 'readonly' => true, |
| 184 | 184 | ), |
| 185 | 185 | |
| 186 | 186 | 'the_recurring_price' => array( |
| 187 | - 'description' => __( 'The formatted recurring price of the item.', 'invoicing' ), |
|
| 187 | + 'description' => __('The formatted recurring price of the item.', 'invoicing'), |
|
| 188 | 188 | 'type' => 'string', |
| 189 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 189 | + 'context' => array('view', 'edit', 'embed'), |
|
| 190 | 190 | 'readonly' => true, |
| 191 | 191 | ), |
| 192 | 192 | |
| 193 | 193 | 'recurring_period' => array( |
| 194 | - 'description' => __( 'The recurring period for a recurring item.', 'invoicing' ), |
|
| 194 | + 'description' => __('The recurring period for a recurring item.', 'invoicing'), |
|
| 195 | 195 | 'type' => 'string', |
| 196 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 197 | - 'enum' => array( 'D', 'W', 'M', 'Y' ), |
|
| 196 | + 'context' => array('view', 'edit', 'embed'), |
|
| 197 | + 'enum' => array('D', 'W', 'M', 'Y'), |
|
| 198 | 198 | ), |
| 199 | 199 | |
| 200 | 200 | 'recurring_interval' => array( |
| 201 | - 'description' => __( 'The recurring interval for a subscription item.', 'invoicing' ), |
|
| 201 | + 'description' => __('The recurring interval for a subscription item.', 'invoicing'), |
|
| 202 | 202 | 'type' => 'integer', |
| 203 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 203 | + 'context' => array('view', 'edit', 'embed'), |
|
| 204 | 204 | ), |
| 205 | 205 | |
| 206 | 206 | 'recurring_limit' => array( |
| 207 | - 'description' => __( 'The maximum number of renewals for a subscription item.', 'invoicing' ), |
|
| 207 | + 'description' => __('The maximum number of renewals for a subscription item.', 'invoicing'), |
|
| 208 | 208 | 'type' => 'integer', |
| 209 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 209 | + 'context' => array('view', 'edit', 'embed'), |
|
| 210 | 210 | ), |
| 211 | 211 | |
| 212 | 212 | 'is_free_trial' => array( |
| 213 | - 'description' => __( 'Whether the item has a free trial period.', 'invoicing' ), |
|
| 213 | + 'description' => __('Whether the item has a free trial period.', 'invoicing'), |
|
| 214 | 214 | 'type' => 'integer', |
| 215 | - 'enum' => array( 0, 1 ), |
|
| 216 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 215 | + 'enum' => array(0, 1), |
|
| 216 | + 'context' => array('view', 'edit', 'embed'), |
|
| 217 | 217 | ), |
| 218 | 218 | |
| 219 | 219 | 'trial_period' => array( |
| 220 | - 'description' => __( 'The trial period.', 'invoicing' ), |
|
| 220 | + 'description' => __('The trial period.', 'invoicing'), |
|
| 221 | 221 | 'type' => 'string', |
| 222 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 223 | - 'enum' => array( 'D', 'W', 'M', 'Y' ), |
|
| 222 | + 'context' => array('view', 'edit', 'embed'), |
|
| 223 | + 'enum' => array('D', 'W', 'M', 'Y'), |
|
| 224 | 224 | ), |
| 225 | 225 | |
| 226 | 226 | 'trial_interval' => array( |
| 227 | - 'description' => __( 'The trial interval.', 'invoicing' ), |
|
| 227 | + 'description' => __('The trial interval.', 'invoicing'), |
|
| 228 | 228 | 'type' => 'integer', |
| 229 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 229 | + 'context' => array('view', 'edit', 'embed'), |
|
| 230 | 230 | ), |
| 231 | 231 | |
| 232 | 232 | 'first_renewal_date' => array( |
| 233 | - 'description' => __( 'The first renewal date in case the item was to be bought today.', 'invoicing' ), |
|
| 233 | + 'description' => __('The first renewal date in case the item was to be bought today.', 'invoicing'), |
|
| 234 | 234 | 'type' => 'string', |
| 235 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 235 | + 'context' => array('view', 'edit', 'embed'), |
|
| 236 | 236 | 'readonly' => true, |
| 237 | 237 | ), |
| 238 | 238 | |
| 239 | 239 | 'edit_url' => array( |
| 240 | - 'description' => __( 'The URL to edit an item.', 'invoicing' ), |
|
| 240 | + 'description' => __('The URL to edit an item.', 'invoicing'), |
|
| 241 | 241 | 'type' => 'string', |
| 242 | - 'context' => array( 'view', 'edit', 'embed' ), |
|
| 242 | + 'context' => array('view', 'edit', 'embed'), |
|
| 243 | 243 | 'readonly' => true, |
| 244 | 244 | ), |
| 245 | 245 | ); |
@@ -8,25 +8,25 @@ |
||
| 8 | 8 | * @var WPInv_Invoice $invoice |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -defined( 'ABSPATH' ) || exit; |
|
| 11 | +defined('ABSPATH') || exit; |
|
| 12 | 12 | |
| 13 | 13 | ?> |
| 14 | 14 | |
| 15 | 15 | <div class="getpaid-header-left-actions"> |
| 16 | 16 | |
| 17 | - <?php if ( $invoice->is_type( 'invoice' ) && $invoice->needs_payment() && ! $invoice->is_held() ): ?> |
|
| 18 | - <a class="btn btn-sm btn-primary m-1 d-inline-block invoice-action-pay" href="<?php echo esc_url( $invoice->get_checkout_payment_url() ); ?>"> |
|
| 19 | - <?php _e( 'Pay For Invoice', 'invoicing' ); ?> |
|
| 17 | + <?php if ($invoice->is_type('invoice') && $invoice->needs_payment() && !$invoice->is_held()): ?> |
|
| 18 | + <a class="btn btn-sm btn-primary m-1 d-inline-block invoice-action-pay" href="<?php echo esc_url($invoice->get_checkout_payment_url()); ?>"> |
|
| 19 | + <?php _e('Pay For Invoice', 'invoicing'); ?> |
|
| 20 | 20 | </a> |
| 21 | 21 | <?php endif; ?> |
| 22 | 22 | |
| 23 | - <?php if ( $invoice->is_type( 'invoice' ) && $invoice->is_paid() ): ?> |
|
| 24 | - <a class="btn btn-sm btn-info m-1 d-inline-block invoice-action-receipt" href="<?php echo esc_url( $invoice->get_receipt_url() ); ?>"> |
|
| 25 | - <?php _e( 'View Receipt', 'invoicing' ); ?> |
|
| 23 | + <?php if ($invoice->is_type('invoice') && $invoice->is_paid()): ?> |
|
| 24 | + <a class="btn btn-sm btn-info m-1 d-inline-block invoice-action-receipt" href="<?php echo esc_url($invoice->get_receipt_url()); ?>"> |
|
| 25 | + <?php _e('View Receipt', 'invoicing'); ?> |
|
| 26 | 26 | </a> |
| 27 | 27 | <?php endif; ?> |
| 28 | 28 | |
| 29 | - <?php do_action( 'wpinv_invoice_display_left_actions', $invoice ); ?> |
|
| 29 | + <?php do_action('wpinv_invoice_display_left_actions', $invoice); ?> |
|
| 30 | 30 | |
| 31 | 31 | </div> |
| 32 | 32 | |
@@ -7,16 +7,16 @@ |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | 12 | ?> |
| 13 | 13 | |
| 14 | 14 | <div class="border-top pt-4 bg-white"> |
| 15 | 15 | <div class="container pr-0 pl-0"> |
| 16 | 16 | |
| 17 | - <?php if ( $term_text = wpinv_get_terms_text() ) : ?> |
|
| 17 | + <?php if ($term_text = wpinv_get_terms_text()) : ?> |
|
| 18 | 18 | <div class="terms-text"> |
| 19 | - <?php echo wpautop( $term_text ); ?> |
|
| 19 | + <?php echo wpautop($term_text); ?> |
|
| 20 | 20 | </div> |
| 21 | 21 | <?php endif; ?> |
| 22 | 22 | |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | 12 | ?> |
| 13 | 13 | |
@@ -16,11 +16,11 @@ discard block |
||
| 16 | 16 | <div class="row"> |
| 17 | 17 | |
| 18 | 18 | <div class="col-12 col-sm-6 text-sm-left pl-sm-0"> |
| 19 | - <?php do_action( 'getpaid_invoice_header_left', $invoice );?> |
|
| 19 | + <?php do_action('getpaid_invoice_header_left', $invoice); ?> |
|
| 20 | 20 | </div> |
| 21 | 21 | |
| 22 | 22 | <div class="col-12 col-sm-6 text-sm-right pr-sm-0"> |
| 23 | - <?php do_action( 'getpaid_invoice_header_right', $invoice );?> |
|
| 23 | + <?php do_action('getpaid_invoice_header_right', $invoice); ?> |
|
| 24 | 24 | </div> |
| 25 | 25 | |
| 26 | 26 | </div> |