Integrating the CryptoPay payment process into other plugins or adding new features to CryptoPay, modifying some processes is very simple with hooks.
CryptoPay has a wrapper hook system created by writing a simple static class on top of WordPress' classic hook system.
This class, which you can use with autoload as below, plays a leading role in all integration processes.
useBeycanPress\CryptoPay\PluginHero\Hook;
In addition, these hooks generally use OOP-compliant type classes. Below are the namespaces of all classes.
// Abstract typesuseBeycanPress\CryptoPay\Types\AbstractType;useBeycanPress\CryptoPay\Types\AbstractListType;// Data TypesuseBeycanPress\CryptoPay\Types\InitType;useBeycanPress\CryptoPay\Types\Data\ConfigDataType;useBeycanPress\CryptoPay\Types\Data\PaymentDataType;useBeycanPress\CryptoPay\Types\Data\DynamicDataType;// EnumsuseBeycanPress\CryptoPay\Types\Enums\TransactionStatus;useBeycanPress\CryptoPay\Types\Enums\PaymentDataProcess;// NetworkuseBeycanPress\CryptoPay\Types\Network\NetworkType;useBeycanPress\CryptoPay\Types\Network\NetworksType;useBeycanPress\CryptoPay\Types\Network\CurrencyType;useBeycanPress\CryptoPay\Types\Network\CurrenciesType;// OrderuseBeycanPress\CryptoPay\Types\Order\OrderType;useBeycanPress\CryptoPay\Types\Order\RefundType;useBeycanPress\CryptoPay\Types\Order\RefundsType;// TransactionuseBeycanPress\CryptoPay\Types\Transaction\ParamsType;useBeycanPress\CryptoPay\Types\Transaction\AddressesType;useBeycanPress\CryptoPay\Types\Transaction\TransactionType;useBeycanPress\CryptoPay\Types\Transaction\TransactionsType;
Also, the "{addon}" value you will see in some hooks is a dynamic value. It is a value specified with the registerIntegration method during the integration process and sent to the payment API with the "cp_addon" value. In this way, in some hooks you can directly manage the process for specific add-ons.
Please follow the Actions link below for actions and filters you can use with this static class.