If you want to get a hold of the WC_Freshdesk
instance without re-instantiating it then call:
$integrations = WC()->integrations->get_integrations();
remove_action('woocommerce_view_order', array($inegrations['wc-freshdesk'], view_order_create_ticket'), 40 );
Note: I’m just guessing the key of wc-freskdesk
, inspect the array otherwise
The call to WC()->integrations->get_integrations()
returns all the integrations that were instantiated early in the woocommerce init process, you can pluck the instance you want from there given that you know the id
of the integration.
You will find the id
class property within the class that extends WC_Integration
, in this case WC_Freshdesk_Integration
.