• Resolved Ehsan Shahnazi

    (@eshahnazi)


    hello
    when use “WP Telegram” Plugin. image and price Will not be sent to telegram & channel…
    but in Dokan everything all right.
    tnx

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author WC Lovers

    (@wclovers)

    HI,

    It will work from WCFM product manager, but a small custom code will require for this!

    Thank You

    Thread Starter Ehsan Shahnazi

    (@eshahnazi)

    hello
    pls share code.
    thank you

    Plugin Author WC Lovers

    (@wclovers)

    Hi,

    Please add this code to your child theme’s functions.php –

    add_action( 'after_wcfm_products_manage_meta_save', function( $new_product_id, $wcfm_products_manage_form_data ) {
    	$post = get_post( $new_product_id );
    	do_action( 'wptelegram_p2tg_send_post', $post, 'non_wp', false );
    }, 50, 2 );

    Thank You

    Thread Starter Ehsan Shahnazi

    (@eshahnazi)

    hello
    i add code, but dont any text or pic send to telegram!!! but before add this code, It was sent only text.
    this is all code i use in child theme’s functions.php :

    
    ///change ? to ,
    
    add_filter( 'wcfm_pm_product_tags_before_save', function( $product_tags, $new_product_id ) {
    	$product_tags = str_replace( "?", ",", str_replace( " ", ",", $product_tags ) );
    	return $product_tags;
    }, 50, 2 );
    
    add_filter( 'wcfm_pm_product_tags_after_save', function( $product_tags, $new_product_id ) {
    	$product_tags = str_replace( ",", "?", $product_tags );
    	return $product_tags;
    }, 50, 2 );
    
    /////////////////////////////// telegram
    
    add_action( 'after_wcfm_products_manage_meta_save', function( $new_product_id, $wcfm_products_manage_form_data ) {
    	$post = get_post( $new_product_id );
    	do_action( 'wptelegram_p2tg_send_post', $post, 'non_wp', false );
    }, 50, 2 );
    
    Plugin Author WC Lovers

    (@wclovers)

    Hi,

    i add code, but dont any text or pic send to telegram!!! but before add this code, It was sent only text.

    – OK, then please remove this code. We are checking this again.

    Can you please show me screenshot for, if you add a product from wp-admin then what is sending and also when you are adding product from WCFM product manager (without this code)!

    Thank You

    Thread Starter Ehsan Shahnazi

    (@eshahnazi)

    I add pruduct from woocommerce. Photo is send to channel and price is free.
    Also after update plugin, The message is sent twice to the channel.
    My telegram channel
    T.me/SepSarIR
    Thanks

    Thread Starter Ehsan Shahnazi

    (@eshahnazi)

    If i Set “Publish Products”
    OFF
    After aplay pruduct,
    All its ok, pic and text and price is Correctly sent to channel.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘send product to telegram’ is closed to new replies.