1

I want to replace the Subscription Totals given by the WooCommerce Subscriptions with my plugins version of Subscription Totals table.

In the WooCommerce Subsciptions plugin's class-wcs-template-loader.php there is a line that loads the subscription total template

add_action( 'woocommerce_subscription_totals_table', array( __CLASS__, 'get_subscription_totals_template' ) );

I'm trying to remove the function from the hook and replace it my own version of template. But it is not working!

I've written the following in my plugin file

remove_action( 'woocommerce_subscription_totals_table', array( __CLASS__, 'get_subscription_totals_template' ) );

but it is not working.

Abhishek
  • 153
  • 1
  • 3
  • 15

1 Answers1

0

Put this instead:

remove_action( 'woocommerce_subscription_totals_table', array( 'WCS_Template_Loader', 'get_subscription_totals_template' ) );