I' m unable to show buy now button in this plugin. I want both Add to Cart and Buy Now
Hi Ashish,
There are some limitations on the plugin that you're using to generate 'Buy Now' button.
We recommend deactivating the plugin and instead using this plugin to generate your 'Buy Now' button.
Plugin URL: https://wordpress.org/plugins/wpc-buy-now-button
After installing the plugin from your WordPress dashboard, go to Appearance => Theme File Editor, and from the right side, select Theme Functions file.
Screenshot: https://ibb.co/mCw1Ymc
Finally, copy the code below and paste it there( end of the file)
Code to copy:
add_action('wcps_layout_element_add_to_cart','wcps_layout_element_post_title_20200331', 90);
function wcps_layout_element_post_title_20200331($args){
$product_id = isset($args['product_id']) ? $args['product_id'] : '';
$elementData = isset($args['elementData']) ? $args['elementData'] : array();
$element_index = isset($args['element_index']) ? $args['element_index'] : '';
echo do_shortcode("[wpcbn_btn_archive id='$product_id']");
}
Would you mind writing a review for our plugin? It'll inspire us a lot.
You can post your review here -
https://wordpress.org/support/plugin/woocommerce-products-slider/reviews/
Thank you so much.
Hi,
Welcome to PickPlugins.
Please tell me how you're generating your 'Buy Now' button. Are you using a third-party plugin? If so, please mention the plugin name.
Thanks Raju, I tried this code and it’s work for me but I face issue on variable product page because two buy now button showing in this page https://www.absolute-aromas.in/product/aromabout-car-diffuser/
Can you please help me out.