最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

wordpress - WooCommerce STORE API Extension - Stack Overflow

programmeradmin1浏览0评论

I would like to extend the STORE API (NOT REST API) from WooCommerce to add some own CustomerDetails. But all I tried doesn't work.

I tried to add an action add 'woocommerce_blocks_loaded':

add_action('woocommerce_blocks_loaded', function () {
    var_dump('action woocommerce_blocks_loaded');
});

But this doesn't work. I added some breakpoints with Xdebug and it is never called. The Code is for testing in the Wordpress Theme writte in the setup.php.

All examples that I find is with woocommerce_blocks_loaded and that isn't working in my scenario. But the STORE API is the best scenario, because I want to rewrite the Checkout Side with Roots Sage Theme and vuejs and so I need Endpoints to make some API Calls to grab the datas.

发布评论

评论列表(0)

  1. 暂无评论