overwrite a woocomerce page
-
i have a theme with custom woocomerce page in my_theme/woocommerce/* , and have created a plugin to do some customization , so i created my_plugin/woocommerce/form-checkout.php to overwrite my_theme/woocommerce/checkout–/form-checkout.php
but the problem is that it can’t recognize wc functions (Call to undefined function wc_print_notices() .. etc )this is my plugin code to overwrite it
the function :public function customize_theme_pages( $page_template ){ if ( is_page( 'shop-checkout' ) ) { $page_template = plugin_dir_url(__FILE__). 'woocommerce/form-checkout.php'; } return $page_template; }
and the filter :
add_filter( 'page_template', array($this,'customize_theme_pages') );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘overwrite a woocomerce page’ is closed to new replies.