• Resolved estalhun

    (@estalhun)


    I use this code in the field After Text (v2.3):

    helyett<br/><span class="kedvezmenyes_ar">kedvezményes ár: [woo_product_price id="67160"],</span>
    <span class="nemvonhatoossze">amelyet a pénztárban részletezünk.<br/>A kedvezményes ár rendelésenként egyszer vehet? igénybe, más 60?db?os GALLMET kedvezménnyel nem vonható ?ssze.</span>

    The text becomes escaped after upgrade to 2.4:

    helyett<br/><span class=\"kedvezmenyes_ar\">kedvezményes ár: [woo_product_price id=\"67160\"],</span>
    <span class=\"nemvonhatoossze\">amelyet a pénztárban részletezünk.<br/>A kedvezményes ár rendelésenként egyszer vehet? igénybe, más 60?db?os GALLMET kedvezménnyel nem vonható ?ssze.</span>

    And some parts of the HTML code appears on the page.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Vidish

    (@vidishp)

    @estalhun Sorry for the trouble. Can you please try updating to latest version and see if you’re okay?

    Thread Starter estalhun

    (@estalhun)

    Hi @vidishp,
    The update does not solve the problem. ??
    If I remove the backslashes the code turns to pure text:

    helyettkedvezményes ár: [woo_product_price id=”67221″], amelyet a pénztárban részletezünk.A kedvezményes ár rendelésenként egyszer vehet? igénybe, más 90?db?os GALLMET kedvezménnyel nem vonható ?ssze.


    Best regards,
    István

    • This reply was modified 1 year, 11 months ago by estalhun.
    Plugin Author Vidish

    (@vidishp)

    @estalhun Sorry for the trouble. Can you please check again after updating to version 2.6?

    Thank you,

    Vidish

    Thread Starter estalhun

    (@estalhun)

    Hi Vidish,

    Better a little bit. When I update the product, the HTML code remains but on the site the shortcode is not processed. Nothing is displayed instead.

    Best regards,
    István

    Plugin Author Vidish

    (@vidishp)

    Hi Istvan,

    I have tested this by using woocommerce’ shortcode: [sale_products] and it seems to be working fine. It is showing output of shortcode on product page.

    May be you can check if shortcode is correct or try displaying on a separate page and see if it works. Or lastly reach out to plugin developer of the plugin whose shortcode is not working.

    I hope this helps.

    Thank you,

    Vidish

    Thread Starter estalhun

    (@estalhun)

    Hello Vidish,
    Please check this page:

    https://gallmet.hu/shop/gallmet-m-60-db-antibac-30-db-egyutt-kedvezobben/

    The short code of “Akciós ár: 8?900,00 Ft” is exactly the same at the top of the page and after the combo.

    The top one is displayed with Booster Pro, the bottom one with this extension.

    Cheers,
    István

    Plugin Author Vidish

    (@vidishp)

    @estalhun I understand, but you can try placing [sale_products] in this box and see if it works well. If it doesn’t work, then let me know. If that works fine, then you can ask the other plugin’s author.

    I hope that helps.

    Thanks,
    Vidish

    Thread Starter estalhun

    (@estalhun)

    Hi, this is the source of shortcode:

    /* termék ár shortcode BEGIN*/
        function woo_product_price_shortcode( $atts ) { 
    		$atts = shortcode_atts( array( 
    			'id' => null 
            ), $atts, 'woo_product_price' ); 
    
            if ( empty( $atts[ 'id' ] ) ) { 
                return ''; 
            } 
    
            $product = wc_get_product( $atts['id'] ); 
    
            if ( ! $product ) { 
                return ''; 
            } 
            return $product->get_price_html(); 
        } 
    	add_shortcode( 'woo_product_price', 'woo_product_price_shortcode' );
        /* termék ár shortcode END*/
    Plugin Author Vidish

    (@vidishp)

    @estalhun I understand. Apparently it doesn’t look wrong, but its difficult to say as I am not author of that plugin. If something is not right in our plugin, I can help you with it. It would be best if you can reach out to the other plugin’s author for this issue.

    I hope you understand.

    Thank you,

    Vidish

    Thread Starter estalhun

    (@estalhun)

    Dear @vidishp,

    There is no other plugin, just the PHP code.

    Regards,
    István

    • This reply was modified 1 year, 10 months ago by estalhun.
    Plugin Author Vidish

    (@vidishp)

    @estalhun I understand. But this forum is for plugin support. If the other shortcodes are working fine at that place, and this shortcode is not working, then there is something wrong with the shortcode’s code.

    I would definitely like to help you, but in order to troubleshoot, I need access to system and as per wordpress’ policy, we can not do so.

    Thank you,

    Vidish

    Thread Starter estalhun

    (@estalhun)

    @vidishp
    Your code:

    if ( $wooco_after_text = apply_filters( 'wooco_after_text', get_post_meta( $product_id, 'wooco_after_text', true ), $product_id ) ) {
    	echo '<div class="wooco_after_text wooco-after-text wooco-text">' . html_entity_decode(do_shortcode( $wooco_after_text )) . '</div>';
    }

    Working code:

    if ( $wooco_after_text = apply_filters( 'wooco_after_text', get_post_meta( $product_id, 'wooco_after_text', true ), $product_id ) ) {
    	echo '<div class="wooco_after_text wooco-after-text wooco-text">' . do_shortcode( html_entity_decode($wooco_after_text) ) . '</div>';
    }

    You need to replace the processing of HTML entities and shortcode.

    Thats all.
    Best regards,
    István

    Thread Starter estalhun

    (@estalhun)

    Hi @vidishp,

    When do you implement my modifications to the plug-in?

    Regards,
    István

    Plugin Author Vidish

    (@vidishp)

    Hi Istvan,

    Just released new version with your changes.

    Thanks,

    Vidish

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘After Text field escaped quotation marks and short codes’ is closed to new replies.