0

I'm digging in Woocommerce block creation I understand useSelect is very usefull to fetch woo data.

Ex. select( 'wc/admin/products' ) to fetch getProducts() method, or select( 'wc/stor/paylent' ) to fetch getActoivePaymentMethod()..

My question : Where can i find all available scopes (select() arguments) to fetch Woocommerce Data ?

2
  • 2
    Scopes are spread across multiple packages. But you can find them all by exploring the WooCommerce source code. Look at the index files where the scope name is registered (the string you pass to select()). Once you know the scope, check the selectors file in the same folder to see what data-fetching methods are available. Commented Sep 18 at 9:41
  • Awesome Richard ! Special Thank's ! Commented Sep 19 at 16:26

1 Answer 1

0

Unfortunately, there’s no official centralized list of all available store names in the docs.

To find them yourself, you can search the WooCommerce repository. Most stores define a constant like STORE_KEY or STORE_NAME. Try this search on GitHub:

repo:woocommerce/woocommerce "STORE_KEY = 'wc/" OR "STORE_NAME = 'wc/"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.