Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // You'd add the following code to the theme functions file (functions.php).
- // Make sure that the function is called after the global $wcff is set; so we
- // use the priority 12.
- add_action( 'plugins_loaded', 'my_wcff_overrides', 12 );
- function my_wcff_overrides() {
- // Make sure the wcff() function exists.
- if ( ! function_exists( 'wcff' ) ) {
- return;
- }
- // Load the custom builder class (file).
- //require_once get_template_directory() . '/wc-fields-factory/wcff-builder-custom.php'; // If NOT using a child theme.
- require_once get_stylesheet_directory() . '/wc-fields-factory/wcff-builder-custom.php'; // If IS using a child theme.
- // Modify Wcff::$builder so that it uses the custom class. Change the name
- // if it's not "Wcff_Builder_Custom".
- wcff()->builder = new Wcff_Builder_Custom();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement