WC_Legacy_Webhook::__get()
Magic __get method for backwards compatibility. Maps legacy vars to new getters.
Method of the class: WC_Legacy_Webhook{}
No Hooks.
Return
Mixed
.
Usage
$WC_Legacy_Webhook = new WC_Legacy_Webhook(); $WC_Legacy_Webhook->__get( $key );
- $key(string) (required)
- Item to get.
WC_Legacy_Webhook::__get() WC Legacy Webhook:: get code WC 9.8.1
public function __get( $key ) { wc_doing_it_wrong( $key, 'Webhook properties should not be accessed directly.', '3.2' ); switch ( $key ) { case 'id' : $value = $this->get_id(); break; case 'status' : $value = $this->get_status(); break; case 'post_data' : $value = null; break; case 'delivery_url' : $value = $this->get_delivery_url(); break; case 'secret' : $value = $this->get_secret(); break; case 'topic' : $value = $this->get_topic(); break; case 'hooks' : $value = $this->get_hooks(); break; case 'resource' : $value = $this->get_resource(); break; case 'event' : $value = $this->get_event(); break; case 'failure_count' : $value = $this->get_failure_count(); break; case 'api_version' : $value = $this->get_api_version(); break; default : $value = ''; break; } // End switch(). return $value; }