File: /home/dh_nk2zdt/vastaselezione.com/wp-content/plugins/woo-pensopay/classes/instances/fbg1886.php
<?php
class WC_PensoPay_FBG1886 extends WC_PensoPay_Instance {
public $main_settings = null;
public function __construct() {
parent::__construct();
// Get gateway variables
$this->id = 'fbg1886';
$this->method_title = 'Pensopay - Forbrugsforeningen af 1886';
$this->setup();
$this->title = $this->s( 'title' );
$this->description = $this->s( 'description' );
add_filter( 'woocommerce_pensopay_cardtypelock_' . $this->id, [ $this, 'filter_cardtypelock' ] );
}
/**
* init_form_fields function.
*
* Initiates the plugin settings form fields
*
* @access public
* @return array
*/
public function init_form_fields(): void {
$this->form_fields = [
'enabled' => [
'title' => __( 'Enable', 'woo-pensopay' ),
'type' => 'checkbox',
'label' => __( 'Enable Forbrugsforeningen payment', 'woo-pensopay' ),
'default' => 'no'
],
'_Shop_setup' => [
'type' => 'title',
'title' => __( 'Shop setup', 'woo-pensopay' ),
],
'title' => [
'title' => __( 'Title', 'woo-pensopay' ),
'type' => 'text',
'description' => __( 'This controls the title which the user sees during checkout.', 'woo-pensopay' ),
'default' => __( 'Forbrugsforeningen af 1886', 'woo-pensopay' )
],
'description' => [
'title' => __( 'Customer Message', 'woo-pensopay' ),
'type' => 'textarea',
'description' => __( 'This controls the description which the user sees during checkout.', 'woo-pensopay' ),
'default' => __( 'Pay with Forbrugsforeningen af 1886', 'woo-pensopay' )
],
];
}
/**
* filter_cardtypelock function.
*
* Sets the cardtypelock
*
* @access public
* @return string
*/
public function filter_cardtypelock() {
return 'fbg1886';
}
/**
* FILTER: apply_gateway_icons function.
*
* Sets gateway icons on frontend
*
* @access public
* @return void
*/
public function apply_gateway_icons( $icon, $id ) {
if ( $id === $this->id ) {
$icons_maxheight = $this->gateway_icon_size();
$icon .= $this->gateway_icon_create( 'forbrugsforeningen', $icons_maxheight );
}
return $icon;
}
}