, 'pronamic_ideal' ), 'type' => 'text', 'classes' => array( 'regular-text', 'code' ), 'tooltip' => __( 'Shop ID as mentioned at My Profile in the Sisow dashboard.', 'pronamic_ideal' ), /* translators: %s: 0 */ 'description' => sprintf( __( 'Default: %s', 'pronamic_ideal' ), 0 ), 'default' => 0, ); return $fields; } /** * Get configuration. * * @param int $post_id Post ID. * @return Config */ public function get_config( $post_id ) { $config = new Config(); $config->merchant_id = $this->get_meta( $post_id, 'sisow_merchant_id' ); $config->merchant_key = $this->get_meta( $post_id, 'sisow_merchant_key' ); $config->shop_id = $this->get_meta( $post_id, 'sisow_shop_id' ); $config->mode = $this->get_meta( $post_id, 'mode' ); return $config; } /** * Get gateway. * * @param int $post_id Post ID. * @return Gateway */ public function get_gateway( $post_id ) { return new Gateway( $this->get_config( $post_id ) ); } }