Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter maveric2005

    (@maveric2005)

    I also edited the class-wc-gateway-ppec-cart-handler.php

    like in git from this

    $is_product = is_product() && ‘yes’ === $settings->checkout_on_single_product_enabled;

    to this

    $is_product = ( is_product() || wc_post_content_has_shortcode( ‘product_page’ ) ) && ‘yes’ === $settings->checkout_on_single_product_enabled;

    saved the file but it does not change anything

    Plugin Support jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    @maveric2005 The issue you are referring to should be fixed when version 1.7.0 is released. If you want to edit the current version, you would need to edit line 461, not 441 as shown in the Pull Request you linked to.

    I did this myself and it worked ??

    Thread Starter maveric2005

    (@maveric2005)

    i tested it on this site

    https://reifenstyle.de/developer/

    but it does not work for me

    i edited the file as you say.

    the test product itselfe have this button.
    But if i use the shortcode it will not be shown

    https://reifenstyle.de/produkt/test

    this is my line 451 to 463

    	/**
    	 * Frontend scripts
    	 */
    	public function enqueue_scripts() {
    		$settings = wc_gateway_ppec()->settings;
    		$client   = wc_gateway_ppec()->client;
    
    		wp_enqueue_style( 'wc-gateway-ppec-frontend', wc_gateway_ppec()->plugin_url . 'assets/css/wc-gateway-ppec-frontend.css' );
    
    		$is_cart     = is_cart() && ! WC()->cart->is_empty() && 'yes' === $settings->cart_checkout_enabled;
    		$is_product  = ( is_product() || wc_post_content_has_shortcode( 'product_page' ) ) && 'yes' === $settings->checkout_on_single_product_enabled;
    		$is_checkout = is_checkout() && 'yes' === $settings->mark_enabled && ! wc_gateway_ppec()->checkout->has_active_session();
    		$page        = $is_cart ? 'cart' : ( $is_product ? 'product' : ( $is_checkout ? 'checkout' : null ) );
    • This reply was modified 5 years, 1 month ago by maveric2005.
    • This reply was modified 5 years, 1 month ago by maveric2005.
    Thread Starter maveric2005

    (@maveric2005)

    I now know the problem…

    i implemented with WPbakery with the Raw html container.

    in this container the paypal button will not be shown.

    If i add the shortcode within a text block. It will be shown.

    very confusing.

    But i noticed a new Bug.

    If i implement 2 different Products on the same Page like on https://reifenstyle.de/developer/

    only 1 PayPal button under the Product will be shown.

    • This reply was modified 5 years, 1 month ago by maveric2005.
    Plugin Support jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    @maveric2005 You are correct there, only one PayPal button set will be shown if more than one product is included on the page. This is due to a limitation of the scripts being used.

    If you would like to submit a suggestion to have this updated to work with multiple products on a single page, this can be submitted here:
    https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=337582

    Thread Starter maveric2005

    (@maveric2005)

    hmm ok.

    It would be a great benefit for all of the users ??
    I will submit the suggestion.

    Thank you for the help

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Paypal button does not appear with shortcode [product_page]’ is closed to new replies.