{"id":227,"date":"2016-12-12T13:32:39","date_gmt":"2016-12-12T13:32:39","guid":{"rendered":"http:\/\/www.3pixls.com\/blog\/?p=227"},"modified":"2016-12-12T13:32:39","modified_gmt":"2016-12-12T13:32:39","slug":"remove-duplicate-product-link-from-woocommerce-page-row-actions","status":"publish","type":"post","link":"https:\/\/www.3pixls.com\/blog\/remove-duplicate-product-link-from-woocommerce-page-row-actions\/","title":{"rendered":"Remove duplicate product link from WooCommerce Page Row Actions"},"content":{"rendered":"<p>[php]<br \/>\nfunction my_duplicate_post_link($actions, $post) {<\/p>\n<p>    \/\/ The following checks WHERE we should run if not products just return<br \/>\n    if ( $post-&gt;post_type != &#8216;product&#8217; ) {<br \/>\n        return $actions;<br \/>\n    }<\/p>\n<p>    $product = get_product( $post-&gt;ID );<br \/>\n    unset($actions[&#8216;duplicate&#8217;]);<br \/>\n    return $actions;<br \/>\n}<\/p>\n<p>\/\/ Notice priority changed from default 10 to 15(anything greater than 10)<br \/>\n\/\/ Priority defines WHEN we should run<br \/>\nadd_filter(&#8216;post_row_actions&#8217;, &#8216;my_duplicate_post_link&#8217;, 15, 2);<br \/>\nadd_filter(&#8216;page_row_actions&#8217;, &#8216;my_duplicate_post_link&#8217;, 15, 2);<br \/>\n[\/php]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[php] function my_duplicate_post_link($actions, $post) { \/\/ The following checks WHERE we should run if not products just return if ( $post-&gt;post_type != &#8216;product&#8217; ) { return $actions; } $product = get_product( $post-&gt;ID ); unset($actions[&#8216;duplicate&#8217;]); return $actions; } \/\/ Notice priority changed from default 10 to 15(anything greater than 10) \/\/ Priority defines WHEN we should [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":228,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[24,9],"tags":[],"_links":{"self":[{"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/posts\/227"}],"collection":[{"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/comments?post=227"}],"version-history":[{"count":1,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/posts\/227\/revisions"}],"predecessor-version":[{"id":229,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/posts\/227\/revisions\/229"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/media\/228"}],"wp:attachment":[{"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/media?parent=227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/categories?post=227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/tags?post=227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}