Create a custom Generate option?
I'm working with a WordPress plugin and I have action hooks added in my register method like
<?php
/**
* File holding CheckoutFields class
*
* @since
* @package MadeByDenis\WooSoloApi\ECommerce
*/
declare(strict_types=1);
namespace MadeByDenis\WooSoloApi\ECommerce;
/**
* CheckoutFields class
*
* @since
* @package MadeByDenis\WooSoloApi\ECommerce
*/
class CheckoutFields implements \MadeByDenis\WooSoloApi\Core\Registrable
{
/**
* @inheritDoc
*/
public function register(): void
{
add_action('woocommerce_checkout_fields', [$this, 'add_pin_field']);
add_action('woocommerce_checkout_fields', [$this, 'add_iban_field']);
}
}
I'd like to be able to select my callback name, in this case, `add_pin_field` and `add_iban_field` and click option+enter and have a dropdown that says: generate callback which would just create a `public function methodName` placeholder.
Is this possible?
Please sign in to leave a comment.
Unfortunately, the only way to do that is to get into plugin development and write a plugin that would do that.
https://confluence.jetbrains.com/display/PhpStorm/Plugin+Development