wordpress - WooCommerce STORE API Extension - Stack Overflow

admin2025-04-18  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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1744970325a277449.html

最新回复(0)