settings = get_option('woocommerce_onepaycx_settings', array()); } public function is_active() { return !empty($this->settings['enabled']) && 'yes' === $this->settings['enabled']; } public function get_payment_method_script_handles() { wp_register_script( 'onepaycx-blocks', plugins_url('../assets/blocks/onepaycx.js', __FILE__), array('wc-blocks-registry', 'wp-element', 'wp-html-entities'), ONEPAYCX_VERSION, true ); return array('onepaycx-blocks'); } public function get_payment_method_data() { return array( 'title' => isset($this->settings['title']) ? $this->settings['title'] : __('Pay by card or crypto', '1pay-cx-payments'), 'description' => isset($this->settings['description']) ? $this->settings['description'] : '', 'supports' => array('products'), // The same card, wallet and coin marks the classic checkout shows. 'marks' => class_exists('OnePayCx_Gateway') ? OnePayCx_Gateway::checkout_marks(is_array($this->settings) ? $this->settings : array()) : array(), ); } }