• Resolved jasonlpeck

    (@jasonlpeck)


    Prior to the 2.1 upgrade, I used the following code to move the Add to Favorites button to the top of the product detail page. This seems to no longer work. Can you advise?

    remove_action(‘woocommerce_after_single_product’, ‘simple_add_favourites_button’, 10);
    add_action(‘woocommerce_before_single_product’, ‘simple_add_favourites_button’, 10);

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jon Boss

    (@jonboss)

    Hi Jason,

    So the actions used in the plugin have changed with the newest update. To make way for some new features and upgrades we’ve updated the structure somewhat – you can still easily change the position of the button if you like, what you’ll want to do is replace those two lines:

    remove_action(‘woocommerce_after_single_product’, array( ‘SWF_Favourites_Button’, ‘display_button’ ), 10);
    add_action(‘woocommerce_before_single_product’, array( ‘SWF_Favourites_Button’, ‘display_button’ ), 10);

    And that should put the button location back to where it was before! Let me know if that works for you.

    Hi Jon!

    Can you please tell me where to change any code to display the Add to Favorites-button before the similar products area?

    Best regards!
    Josef

    Plugin Author Jon Boss

    (@jonboss)

    Hi Josef,

    You can use the two lines of code above to change the position of the button to anywhere on your product page! You’ll just want to know exactly which hook you’d like the button to appear on. You can take a look at the templates/content-single-product.php file for a list of those hooks!

    We will also be releasing a pro version of the plugin soon, which will give you the ability to easily adjust the button positioning through your admin panel!

    Cheers,
    Jon

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change Add to Favorites button position no longer works’ is closed to new replies.