Comment on page

For developers

Here are the hooks found in CryptoPay. And the basic add-on development process is explained so that you can integrate CryptoPay with other add-ons.
There is a class available for using CryptoPay hooks. This class is below. You can assign hooks with this class.
use \BeycanPress\CryptoPay\PluginHero\Hook;
The structure is the same as WordPress' hooking system. We just created our own class to make our job easier.
Fields denoted and named with "{}" signs are variable. So that you can better understand the hooks, we will talk about them first.
  • {networkCode} => As you know, CryptoPay was dynamic and modular, that is, it supported many networks at the same time. Here, each network has its own unique code, for example, the code for EVM-based networks is "evmBased", "bitcoin" for Bitcoin, "solana" in Solana, so what does it do? In this incoming request, it determines which network settings the recipient address will be taken from. So, for example, if it comes to "solana", it takes the wallet address in the solana settings. Where does this value come from? The network is selected first in the payment process. This value comes from whichever network was selected.
  • {addon} => Since CryptoPay is modular and has extra add-ons, you will find it almost everywhere in the hooking system. Because when developing an add-on for CryptoPay, we first register this add-on. And we write the hooks according to this name. Thus, the software knows which add-on it is working for and which hook to look for. For example, for WooCommerce, this value is "woocommerce" in all processes. In other words, in order to make a tag in the WooCommerce process, the value "woocommerce" should come in the "{addon}" part.