Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Possibility to use the checkout button in product loops other than shop page

$
0
0

Replies: 0

Why limit this functionality by is_shop()? For example we are using the default Woocommerce loops on at least 4-5 pages and they look different than the designated shop because of this limitation.

You can see it in the file class-one-click-checkout-for-woocommerce.php

Line 84: comment out if ( is_shop() ) – and voila. it works.

I suggest removing this check, but if you intend to limit by is_shop() condition, can you please add a filter to allow developers to hook into it and enable the button on the other product loops. As simple as:

Line 84: repplace

if ( is_shop() ) {

with

if ( apply_filters( 'mwb_occfw_checkout_button_enable', is_shop() ) ) {

  • This topic was modified 17 minutes ago by Darko G.. Reason: add more info
  • This topic was modified 14 minutes ago by Darko G..
  • This topic was modified 13 minutes ago by Darko G..

Viewing all articles
Browse latest Browse all 59525

Trending Articles