WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce SagePay Direct Payment Gateway
[resolved] Small bug with wpautop function in this plugin (4 posts)

  1. kyleduncan
    Member
    Posted 11 months ago #

    Hi,

    Thanks for the great extension! I have noticed a tiny bug in this plugin, in the file "ds-sagepay-direct.php on line 692, it reads:

    if ($this->description) echo wpautop(wptexturize($this->description));

    "echo" shouldnt be used here, as the function outputs the data automatically. using echo results in this appearing twice on the Thank You page once the order is complete.

    Could you remove "echo" so that it just appears once?

    Thanks!

    http://wordpress.org/extend/plugins/sagepay-direct-for-woocommerce-payment-gateway/

  2. swicks
    Member
    Plugin Author

    Posted 11 months ago #

    Hi,
    What version of the plugin are you using? The reason the Thank you was appearing twice was related to the gateway class instance being called twice.

    This should have been fixed in 0.1.6.3

    wpautop just returns a string and you would need to 'echo' this.

    Best regards

    Steve

  3. kyleduncan
    Member
    Posted 11 months ago #

    Thanks - I just noticed the upgrade today, so will test it out.

    Sorry ,i misunderstood the docs here: http://codex.wordpress.org/Function_Reference/wpautop and from the Usage section assumed that echo wasn't needed, as with a few other wordpress functions.

    thanks again!

  4. swicks
    Member
    Plugin Author

    Posted 11 months ago #

    Great & no problem.

    Regards

    Steve

Reply

You must log in to post.

About this Plugin

About this Topic

Tags