Home Forums Themes Support Claue Custom Code Conflict Claue-Child

Viewing 1 reply thread
  • Author
    Posts
    • #14422

      Hello Claue Devs:

      1. Some days ago I post a ticket how to move the “size guide” link, the solution Harry gave me work like a charm.
      2. Then yesterday I post another ticket how to move category description to bottom, in this time Harry gave me a claue-child.zip file which work great as is. But when I wanted to join both solutions (1 and 2) on my final functions.php file (which have more custom code) my site crash with “Error 500”.

      As I mentioned above, I have some custom code on my functions.php, but I did several tests deleting each piece of code, and I found the code in conflict were those on related to point 1 and 2, mentioned above.

      I’m attaching a zip file which is basicly my custom claue-child that I’m using on my site, which have:

      • My custom code
      • Code of point 1 commented (line 83)
      • Code of point 2 (line 106)

      Sadly, I don’t have experience with PHP programming language and I couldn’t figure out which part of the code were in conflict.

      I hope you could give me some insights how to integrate both codes without issues.

      I’ll really appreciate your help, thanks very much

      Carlos Castañeda

      Attachments:
      You must be logged in to view attached files.
    • #14440

      Hi,

      The issue because have 2 function have same name

      add_action( 'wp_head', 'remove_my_action' );
      function remove_my_action(){
        remove_action( 'woocommerce_single_product_summary', 'jas_claue_wc_add_extra_link_after_cart', 35 );
      }
      add_action( 'woocommerce_single_product_summary', 'jas_claue_wc_add_extra_link_after_cart', 25 );

      and

      add_action( 'wp_head', 'remove_my_action' );
      function remove_my_action(){
        remove_action( 'woocommerce_before_main_content', 'jas_claue_wc_page_head', 15 );
      }

      You need remove one and merge to

      add_action( 'wp_head', 'remove_my_action' );
      function remove_my_action(){
        remove_action( 'woocommerce_single_product_summary', 'jas_claue_wc_add_extra_link_after_cart', 35 );
        remove_action( 'woocommerce_before_main_content', 'jas_claue_wc_page_head', 15 );
      }
      add_action( 'woocommerce_single_product_summary', 'jas_claue_wc_add_extra_link_after_cart', 25 );

      Best regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

Viewing 1 reply thread

You must be logged in to reply to this topic.