@@ -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 |
@@ -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, |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | // MUST have WordPress. |
| 3 | -if ( !defined( 'WPINC' ) ) { |
|
| 4 | - exit( 'Do NOT access this file directly: ' . basename( __FILE__ ) ); |
|
| 3 | +if (!defined('WPINC')) { |
|
| 4 | + exit('Do NOT access this file directly: ' . basename(__FILE__)); |
|
| 5 | 5 | } |
| 6 | 6 | |
| 7 | 7 | class WPInv_Meta_Box_Payment_Form { |
@@ -11,23 +11,23 @@ discard block |
||
| 11 | 11 | * |
| 12 | 12 | * @param WP_Post $post |
| 13 | 13 | */ |
| 14 | - public static function output_details( $post ) { |
|
| 15 | - $details = get_post_meta( $post->ID, 'payment_form_data', true ); |
|
| 14 | + public static function output_details($post) { |
|
| 15 | + $details = get_post_meta($post->ID, 'payment_form_data', true); |
|
| 16 | 16 | |
| 17 | - if ( ! is_array( $details ) ) { |
|
| 17 | + if (!is_array($details)) { |
|
| 18 | 18 | return; |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | echo '<div class="bsui"> <div class="form-row">'; |
| 22 | 22 | |
| 23 | - foreach ( $details as $key => $value ) { |
|
| 24 | - $key = sanitize_text_field( $key ); |
|
| 23 | + foreach ($details as $key => $value) { |
|
| 24 | + $key = sanitize_text_field($key); |
|
| 25 | 25 | |
| 26 | - if ( is_array( $value ) ) { |
|
| 27 | - $value = implode( ',', $value ); |
|
| 26 | + if (is_array($value)) { |
|
| 27 | + $value = implode(',', $value); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - $value = esc_html( $value ); |
|
| 30 | + $value = esc_html($value); |
|
| 31 | 31 | echo "<div class='col-6 form-group'><strong>$key:</strong></div><div class='col-6 form-group'>$value</div>"; |
| 32 | 32 | } |
| 33 | 33 | |
@@ -40,13 +40,13 @@ discard block |
||
| 40 | 40 | * |
| 41 | 41 | * @param WP_Post $post |
| 42 | 42 | */ |
| 43 | - public static function output_shortcode( $post ) { |
|
| 43 | + public static function output_shortcode($post) { |
|
| 44 | 44 | |
| 45 | - if ( ! is_numeric( $post ) ) { |
|
| 45 | + if (!is_numeric($post)) { |
|
| 46 | 46 | $post = $post->ID; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - if ( $post == wpinv_get_default_payment_form() ) { |
|
| 49 | + if ($post == wpinv_get_default_payment_form()) { |
|
| 50 | 50 | echo '—'; |
| 51 | 51 | return; |
| 52 | 52 | } |
@@ -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,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 | ); |
@@ -7,20 +7,20 @@ discard block |
||
| 7 | 7 | * @version 1.0.19 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -defined( 'ABSPATH' ) || exit; |
|
| 10 | +defined('ABSPATH') || exit; |
|
| 11 | 11 | |
| 12 | 12 | // Fetch the invoice. |
| 13 | -if ( empty( $invoice ) ) { |
|
| 14 | - $invoice = new WPInv_Invoice( $GLOBALS['post'] ); |
|
| 13 | +if (empty($invoice)) { |
|
| 14 | + $invoice = new WPInv_Invoice($GLOBALS['post']); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | // Abort if it does not exist. |
| 18 | -if ( $invoice->get_id() == 0 ) { |
|
| 18 | +if ($invoice->get_id() == 0) { |
|
| 19 | 19 | exit; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | // Fires before printing an invoice. |
| 23 | -do_action( 'wpinv_invoice_print_before_display', $invoice ); |
|
| 23 | +do_action('wpinv_invoice_print_before_display', $invoice); |
|
| 24 | 24 | |
| 25 | 25 | ?><!DOCTYPE html> |
| 26 | 26 | |
@@ -29,24 +29,24 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | <head> |
| 31 | 31 | |
| 32 | - <meta charset="<?php bloginfo( 'charset' ); ?>"> |
|
| 32 | + <meta charset="<?php bloginfo('charset'); ?>"> |
|
| 33 | 33 | <meta name="viewport" content="width=device-width, initial-scale=1.0" > |
| 34 | 34 | |
| 35 | 35 | <meta name="robots" content="noindex,nofollow"> |
| 36 | 36 | |
| 37 | 37 | <link rel="profile" href="https://gmpg.org/xfn/11"> |
| 38 | 38 | |
| 39 | - <title>#<?php echo sanitize_text_field( $invoice->get_number() ); ?></title> |
|
| 39 | + <title>#<?php echo sanitize_text_field($invoice->get_number()); ?></title> |
|
| 40 | 40 | |
| 41 | - <?php do_action( 'wpinv_invoice_print_head', $invoice ); ?> |
|
| 41 | + <?php do_action('wpinv_invoice_print_head', $invoice); ?> |
|
| 42 | 42 | |
| 43 | 43 | </head> |
| 44 | 44 | |
| 45 | 45 | |
| 46 | 46 | <body class="body wpinv wpinv-print" style="font-weight: 400;"> |
| 47 | 47 | |
| 48 | - <?php do_action( 'getpaid_invoice', $invoice ); ?> |
|
| 49 | - <?php do_action( 'wpinv_invoice_print_body_end', $invoice ); ?> |
|
| 48 | + <?php do_action('getpaid_invoice', $invoice); ?> |
|
| 49 | + <?php do_action('wpinv_invoice_print_body_end', $invoice); ?> |
|
| 50 | 50 | |
| 51 | 51 | </body> |
| 52 | 52 | |
@@ -6,34 +6,34 @@ discard block |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInit8b6d4385c391849a80038f0b0e87c8b5 |
| 8 | 8 | { |
| 9 | - public static $files = array ( |
|
| 9 | + public static $files = array( |
|
| 10 | 10 | '24583d3588ebda5228dd453cfaa070da' => __DIR__ . '/..' . '/ayecode/wp-font-awesome-settings/wp-font-awesome-settings.php', |
| 11 | 11 | 'e8d544c98e79f913e13eae1306ab635e' => __DIR__ . '/..' . '/ayecode/wp-ayecode-ui/ayecode-ui-loader.php', |
| 12 | 12 | ); |
| 13 | 13 | |
| 14 | - public static $prefixLengthsPsr4 = array ( |
|
| 14 | + public static $prefixLengthsPsr4 = array( |
|
| 15 | 15 | 'M' => |
| 16 | - array ( |
|
| 16 | + array( |
|
| 17 | 17 | 'MaxMind\\Db\\' => 11, |
| 18 | 18 | ), |
| 19 | 19 | 'C' => |
| 20 | - array ( |
|
| 20 | + array( |
|
| 21 | 21 | 'Composer\\Installers\\' => 20, |
| 22 | 22 | ), |
| 23 | 23 | ); |
| 24 | 24 | |
| 25 | - public static $prefixDirsPsr4 = array ( |
|
| 25 | + public static $prefixDirsPsr4 = array( |
|
| 26 | 26 | 'MaxMind\\Db\\' => |
| 27 | - array ( |
|
| 27 | + array( |
|
| 28 | 28 | 0 => __DIR__ . '/..' . '/maxmind-db/reader/src/MaxMind/Db', |
| 29 | 29 | ), |
| 30 | 30 | 'Composer\\Installers\\' => |
| 31 | - array ( |
|
| 31 | + array( |
|
| 32 | 32 | 0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers', |
| 33 | 33 | ), |
| 34 | 34 | ); |
| 35 | 35 | |
| 36 | - public static $classMap = array ( |
|
| 36 | + public static $classMap = array( |
|
| 37 | 37 | 'AyeCode_Connect_Helper' => __DIR__ . '/..' . '/ayecode/ayecode-connect-helper/ayecode-connect-helper.php', |
| 38 | 38 | 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
| 39 | 39 | 'WP_Super_Duper' => __DIR__ . '/..' . '/ayecode/wp-super-duper/wp-super-duper.php', |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | public static function getInitializer(ClassLoader $loader) |
| 43 | 43 | { |
| 44 | - return \Closure::bind(function () use ($loader) { |
|
| 44 | + return \Closure::bind(function() use ($loader) { |
|
| 45 | 45 | $loader->prefixLengthsPsr4 = ComposerStaticInit8b6d4385c391849a80038f0b0e87c8b5::$prefixLengthsPsr4; |
| 46 | 46 | $loader->prefixDirsPsr4 = ComposerStaticInit8b6d4385c391849a80038f0b0e87c8b5::$prefixDirsPsr4; |
| 47 | 47 | $loader->classMap = ComposerStaticInit8b6d4385c391849a80038f0b0e87c8b5::$classMap; |
@@ -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 | |