{"id":12863276,"date":"2020-05-20T09:24:48","date_gmt":"2020-05-20T09:24:48","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/multiple-pickup-method-solution\/"},"modified":"2020-05-20T09:24:48","modified_gmt":"2020-05-20T09:24:48","slug":"multiple-pickup-method-solution","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/multiple-pickup-method-solution\/","title":{"rendered":"Multiple pickup method solution"},"content":{"rendered":"<p>Hello,<br \/>\nI have the same @cachingshop problem that he shows in the post &#8220;Multiple pick-up methods&#8221;. now that post is closed for comments and I create a new other one just for people that need multiple local pickup options to be showed.<\/p>\n<p>The plugin behaviour now infact remove all local pickup options except one if free shipping became available to the customers.<\/p>\n<p>The reason is in the file hide-shipping-free-shipping.php in the function:<br \/>\n<code>wc_hide_shipping_when_free_is_available_keep_local<\/code><br \/>\nJust remove the &#8220;break&#8221; instruction in this portion of the code:<\/p>\n<pre><code>\n    if ( ! empty( $new_rates ) ) {\n        foreach ( $rates as $rate_id =&gt; $rate ) {\n            if (&#039;local_pickup&#039; === $rate-&gt;method_id ) {\n                $new_rates[ $rate_id ] = $rate;\n                break; \/\/REMOVE THIS LINE WITH BREAK\n            }\n        }\n        return $new_rates;\n    }\n<\/code><\/pre>\n<p>And all the pickup options will be available to the user, still if free shipping limit has been reached.<\/p>\n<p>Hope this helps and the developer make this change in the codebase too.<\/p>\n<p>Bye<\/p>\n<p>Brennino<\/p>\n","protected":false},"template":"","class_list":["post-12863276","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12863276","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12863276\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12863276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}