Support » Plugin: Amazon Link » fix shortcode [amazon ] not work in post excerpt such as woo short description

  • 
    <?php
    // fix shortcode [amazon ] not work in post excerpt such as woocommerce short description
    add_action( 'amazon_link_init', function ( $settings, $awlfw ) {
        add_filter( 'the_post', function ( $post ) use ( $awlfw ) {
            $post->post_excerpt = $awlfw->content_filter( $post->post_excerpt );
            return $post;
        } );
    }, 10, 2 );
    
    • This topic was modified 1 year, 8 months ago by logig.
    • This topic was modified 1 year, 8 months ago by logig.
    • This topic was modified 1 year, 8 months ago by logig.
  • The topic ‘fix shortcode [amazon ] not work in post excerpt such as woo short description’ is closed to new replies.