我想通过使用electron + rxdb 来学习和开发一个桌面应用程序。
我的文件结构:
main.js 代码:
const electron = require('electron')
const dbjs = require('./js-server/db.js')
const {ipcMain} = require('electron')
ipcMain.on('search-person', (event, userInput) => {
event.returnValue = dbjs.searchPerson(userInput);
})
Run Code Online (Sandbox Code Playgroud)
db.js 代码:
var rxdb = require('rxdb');
var rxjs = require('rxjs');
rxdb.plugin(require('pouchdb-adapter-idb'));
const personSchema = {
title: 'person schema',
description: 'describes a single person',
version: 0,
type: 'object',
properties: {
Name: {type: 'string',primary: true},
Age: {type: 'string'},
},
required: ['Age']
};
var pdb;
rxdb.create({
name: …Run Code Online (Sandbox Code Playgroud) 创建新订单后,woocommerce将向管理员发送电子邮件,我希望它也能在电子邮件中发送客户的IP地址.但我不能让它工作,这是我到目前为止所得到的:
<?php echo get_post_meta( $order->id, '_customer_ip_address', true ); ?>
Run Code Online (Sandbox Code Playgroud)
这段代码进来了 mytheme/woocommerce/emails/admin-new-order.php
有任何想法吗?
谢谢.
php wordpress email-notifications woocommerce hook-woocommerce