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 5 months, 2 weeks ago by  logig.
    • This topic was modified 5 months, 2 weeks ago by  logig.
    • This topic was modified 5 months, 2 weeks ago by  logig.
  • You must be logged in to reply to this review.