fireModelEvent( 'payment_method_types' ) === false ) { return false; } if ( empty( $this->attributes['id'] ) ) { return new \WP_Error( 'not_saved', 'Please create the payment method.' ); } $types = $this->makeRequest( [ 'method' => 'GET', 'query' => $this->getQuery(), ], $this->endpoint . '/' . $this->attributes['id'] . '/payment_method_types/', ); return $types; } }