Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #772534

    Hello,

    I have a small issue, I hope you can help me with it.

    I’m using Sofort Payment Gateway plugin for my shop. The plugin is made by WooCommerce.
    https://docs.woocommerce.com/document/sofort-com-gateway/?_ga=1.206236826.842121469.1491392708

    I would like to change the transaction reason to be: P4360-043-015. In the plugin documentation, they mentioned an example for the filter that I can use and add to function.php file in the child theme to change the reason. But actually, I don’t know where I should add my new reason in this code.

    This is the code:
    function filter_my_transaction_reason( $message, $order_id, $order_number ){
    return sprintf( ‘My Order %s’, $order_number );
    }
    add_filter( ‘woogate_sofort_transaction_reason_1’, ‘filter_my_transaction_reason’, 10, 3 );

    I tried to contact with the Woocommerce support but they are totally helpless.

    I hope you can help me with this and I will be thankful.
    Thank you so much in advance.

    Ammar

    #772595

    You need to install and activate a child theme first: http://kriesi.at/documentation/enfold/using-a-child-theme/
    Afterwards you can add that code to the functions.php of the child theme

    #772599

    Hello Mensmaximus,
    Thank you for your reply.
    I will do that, but I want to know where I should add my new reason: (P4360-043-015) in this code.

    #772601

    return sprintf( ‘TYPE WHATEVER YOU WONT HERE %s’, $order_number );

    #774936

    Hi @SkinnovationIBK,

    Please let us know if you should need any further help on the topic. Thanks @mensmaximus for helping out :-)

    Best regards,
    Rikard

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