2021-09-08 16:41:00 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Class WCPaymentGatewayPreInstallWCPayPromotion
|
|
|
|
*
|
|
|
|
* @package WooCommerce\Admin
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Automattic\WooCommerce\Admin\Features\WcPayPromotion;
|
|
|
|
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A Psuedo WCPay gateway class.
|
|
|
|
*
|
|
|
|
* @extends WC_Payment_Gateway
|
|
|
|
*/
|
|
|
|
class WCPaymentGatewayPreInstallWCPayPromotion extends \WC_Payment_Gateway {
|
|
|
|
|
|
|
|
const GATEWAY_ID = 'pre_install_woocommerce_payments_promotion';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
*/
|
|
|
|
public function __construct() {
|
2021-09-09 12:25:13 +00:00
|
|
|
$wc_pay_spec = Init::get_wc_pay_promotion_spec();
|
|
|
|
$this->id = static::GATEWAY_ID;
|
|
|
|
$this->method_title = $wc_pay_spec->title;
|
|
|
|
if ( property_exists( $wc_pay_spec, 'sub_title' ) ) {
|
|
|
|
$this->title = sprintf( '<span class="gateway-subtitle" >%s</span>', $wc_pay_spec->sub_title );
|
|
|
|
}
|
|
|
|
$this->method_description = $wc_pay_spec->content;
|
2021-09-08 16:41:00 +00:00
|
|
|
$this->has_fields = false;
|
|
|
|
|
|
|
|
// Get setting values.
|
|
|
|
$this->enabled = false;
|
|
|
|
}
|
|
|
|
}
|