Support » Plugin: Multi-Step Checkout for WooCommerce » How to hide previous button in final step?

  • Resolved yudhafebrian

    (@yudhafebrian)


    Hi,

    i found that previous button in final step (payment step) is distraction, how to hide the previous button only in final step?
    Refer this: http://prntscr.com/kq93b6

    * “sebelumnya” mean “previous”
    ** “bayar pesanan” mean “place order”

    • This topic was modified 2 years, 4 months ago by yudhafebrian.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Diana Burduja

    (@diana_burduja)

    The plugin doesn’t support removing on demand the “previous” button on the final step.

    You can hack a bit the plugin to remove the “previous” button on the final step, but by doing this you won’t be able in the future to update the plugin.

    For hacking you need to replace the line 83 in the plugin’s /assets/js/script.js file from:

    if ( theIndex != 0 ) $('#wpmc-prev').addClass('current');

    to

    if ( theIndex != 0 || theIndex < sections.length - 1) $('#wpmc-prev').addClass('current');

    then minify the /assets/js/script.js file to /assets/js/script.min.js.

    • This reply was modified 2 years, 4 months ago by Diana Burduja.

    i see, how about just hiding it? maybe disable the link and using css to hide the button?

    Plugin Author Diana Burduja

    (@diana_burduja)

    Please try to hide the button with CSS and let me know how that works.

    • This reply was modified 2 years, 4 months ago by Diana Burduja.

    hey, i was try your suggest about hacking the js file, but i don’t understand this statement: “then minify the /assets/js/script.js file to /assets/js/script.min.js”, how to minify that?

    you said minify into script.min.js but the file is already there: http://prntscr.com/ktujqi

    should i overwrite those file?

    • This reply was modified 2 years, 4 months ago by yudhafebrian.
    Plugin Author Diana Burduja

    (@diana_burduja)

    Yes, you need to overwrite that file.

    There are many methods for minifying a JS file. You can google “JS minifying” or use this website.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to hide previous button in final step?’ is closed to new replies.