Overriding a class function?
-
Hi. I want to override the woocommerce_email_after_order_table
function that resides in WCPGSK_Main class, in order to remove the dd and dt tags.How is this possible? Any ideas?
I can succesfully remove the default function by using:
add_action('init', 'my_plugins_override'); function my_plugins_override() { global $wcpgsk; remove_action('woocommerce_email_after_order_table', array($wcpgsk, 'wcpgsk_email_after_order_table')); }
But I cannot redeclare it using:
add_action('woocommerce_email_after_order_table', array($wcpgsk, 'wcpgsk_email_after_order_table_custom')); function wcpgsk_email_after_order_table_custom() { // change code here }
https://www.ads-software.com/plugins/woocommerce-poor-guys-swiss-knife/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Overriding a class function?’ is closed to new replies.