WC_Payment_Gateway::get_description PHP Method

get_description() public method

Return the gateway's description.
public get_description ( ) : string
return string
    public function get_description()
    {
        return apply_filters('woocommerce_gateway_description', $this->description, $this->id);
    }

Usage Example

 /**
  * Sanitize payment fields
  * - some gateways include js in their payment fields
  *
  * @param WC_Payment_Gateway $gateway
  * @return mixed|string
  */
 protected function sanitize_payment_fields(WC_Payment_Gateway $gateway)
 {
     $html = '';
     if ($gateway->has_fields() || $gateway->get_description()) {
         ob_start();
         $gateway->payment_fields();
         $html = ob_get_contents();
         ob_end_clean();
         // remove script tags
         $html = $this->removeDomNodes($html, '//script');
     }
     return self::trim_html_string($html);
 }
All Usage Examples Of WC_Payment_Gateway::get_description