Assign new class to variable
-
I’d like to recommend assigning your plugin class to a variable. This will allow other developers or theme editors to modify your actions.
For example, I wanted to change the location that the discount special offer text appears on my single product page. It should be as simple as using remove_action to remove your single_product_summary action, then adding it back in at a new priority. But since the class is instantiated without being assigned, there’s no way to call it.
Simple fix
Change line 1042 of woocommerce-bulk-discount.php to:
$woo_bulk_discount_plugin_t4m = new Woo_Bulk_Discount_Plugin_t4m();
Otherwise, love the plugin. Thanks!
- The topic ‘Assign new class to variable’ is closed to new replies.