settings = get_option( 'woocommerce_acquireros_gateway_settings', array() ); } public function is_active() { return 'yes' === $this->get_setting( 'enabled', 'no' ); } public function get_payment_method_script_handles() { $script_file = ACQUIREROS_GATEWAY_PATH . 'assets/js/checkout-block.js'; $script_ver = file_exists( $script_file ) ? (string) filemtime( $script_file ) : ACQUIREROS_GATEWAY_VERSION; wp_register_script( 'acquireros-checkout-block', ACQUIREROS_GATEWAY_URL . 'assets/js/checkout-block.js', array( 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n' ), $script_ver, true ); return array( 'acquireros-checkout-block' ); } public function get_payment_method_data() { return array( 'title' => $this->get_setting( 'title', __( 'Credit Card', 'acquireros-payment-gateway' ) ), 'description' => $this->get_setting( 'description', __( 'Pay securely by credit or debit card.', 'acquireros-payment-gateway' ) ), 'paymentMode' => $this->get_setting( 'payment_mode', 'redirect' ), 'supports' => array( 'products' ), ); } } } class AcquirerOS_Blocks_Support { public static function init() { add_action( 'woocommerce_blocks_payment_method_type_registration', array( __CLASS__, 'register' ) ); } public static function register( $payment_method_registry ) { if ( ! class_exists( 'AcquirerOS_Blocks_Payment_Method' ) ) { return; } $payment_method_registry->register( new AcquirerOS_Blocks_Payment_Method() ); } }