Skip to content Skip to sidebar

Resolved by author

Topic Tags: Compatibility

Overview of the issue

When using BeTheme with WPML, you might experience an issue where updating a product created with the Muffin Builder prevents its translation from completing in the Advanced Translation Editor (ATE). This happens due to a missing class reference, and you will see a fatal error logged in “WPML > Support > ATE > Error Logs”:

PHP Fatal error:  Uncaught Error: Class "Mfn_Builder_Fields" not found in /wp-content/themes/betheme/functions/builder/class-mfn-builder-admin.php:77

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open the …/wp-content/themes/betheme/functions/theme-woocommerce.php file.
  • Look for line 1765.
  • Replace:
    function mfn_on_product_updated( $post_ID, $post_after, $post_before ) {
    
      if ( get_post_type($post_ID) !== 'product' ) return;
    
      require_once(get_theme_file_path('/functions/builder/class-mfn-builder-admin.php'));
            
  • With:
    function mfn_on_product_updated( $post_ID, $post_after, $post_before ) {
    
      if ( get_post_type($post_ID) !== 'product' ) return;
    
      require_once(get_theme_file_path('/functions/builder/class-mfn-builder-admin.php'));
      require_once(get_theme_file_path('/functions/builder/class-mfn-builder-fields.php'));