custom_function not working in alg_product_id shortcode

Forums Product XML Feeds for WooCommerce custom_function not working in alg_product_id shortcode

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #167442
    Dennis van den Berg
    Participant

    Hello,

    Since the recent update the custom_function tag in the shortcode alg_product_id not working. With the new update it only returns the ID of the product and no longer the return value of a custom function. Can this be fixed?

    #167756
    Taha
    Moderator
    Plugin Support

    Hi Dennis,

    Thank you for reaching out. I hope you’re doing well.

    I have forwarded your message to our development team, and we will get back to you as soon as possible.

    Best regards,
    WPFactory support team

    #168598
    Taha
    Moderator
    Plugin Support

    Hi Dennis,

    I hope you are doing well. I have just heard back from the developer, and he mentioned that, due to security reasons, we have implemented a list of allowed custom functions.

    Please add the following code to your theme’s functions.php file, and replace 'my_custom_function' with the name of your custom function to allow it:

    add_filter( 'alg_allowed_custom_functions', function ( $allowed_functions ) {
    $allowed_functions[] = 'my_custom_function';
    return $allowed_functions;
    } );

    Please give it a try and let me know if everything is working well on your end. Thank you for your patience.

    Best regards,
    WPFactory support team

    #168608
    Dennis van den Berg
    Participant

    Hello,

    I’ve added and change the code with the names of my custom functions. I alos updated the plugin to version 2.9.4 and after that it is working normally again.

    Thank you for this code and the fast support.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.