includes/class-wpinv-item.php 1 location
|
@@ 79-85 (lines=7) @@
|
| 76 |
|
return true; |
| 77 |
|
} |
| 78 |
|
|
| 79 |
|
public function __get( $key ) { |
| 80 |
|
if ( method_exists( $this, 'get_' . $key ) ) { |
| 81 |
|
return call_user_func( array( $this, 'get_' . $key ) ); |
| 82 |
|
} else { |
| 83 |
|
return new WP_Error( 'wpinv-item-invalid-property', sprintf( __( 'Can\'t get property %s', 'invoicing' ), $key ) ); |
| 84 |
|
} |
| 85 |
|
} |
| 86 |
|
|
| 87 |
|
public function create( $data = array(), $wp_error = false ) { |
| 88 |
|
if ( $this->ID != 0 ) { |
includes/wpinv-subscription.php 1 location
|
@@ 103-115 (lines=13) @@
|
| 100 |
|
* |
| 101 |
|
* @since 1.0.0 |
| 102 |
|
*/ |
| 103 |
|
public function __get( $key ) { |
| 104 |
|
|
| 105 |
|
if( method_exists( $this, 'get_' . $key ) ) { |
| 106 |
|
|
| 107 |
|
return call_user_func( array( $this, 'get_' . $key ) ); |
| 108 |
|
|
| 109 |
|
} else { |
| 110 |
|
|
| 111 |
|
return new WP_Error( 'wpinv-subscription-invalid-property', sprintf( __( 'Can\'t get property %s', 'invoicing' ), $key ) ); |
| 112 |
|
|
| 113 |
|
} |
| 114 |
|
|
| 115 |
|
} |
| 116 |
|
|
| 117 |
|
/** |
| 118 |
|
* Creates a subscription |