{"id":133734,"date":"2020-12-23T18:41:02","date_gmt":"2020-12-23T18:41:02","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/api-improver-for-woocommerce\/"},"modified":"2021-01-07T15:08:20","modified_gmt":"2021-01-07T15:08:20","slug":"api-improver-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/arg.wordpress.org\/plugins\/api-improver-for-woocommerce\/","author":10474405,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.0","stable_tag":"trunk","tested":"5.6.17","requires":"4.7","requires_php":"7.0","requires_plugins":"","header_name":"API Improver for WooCommerce","header_author":"M\u00e1rio Valney","header_description":"Improve your WooCommerce API REST","assets_banners_color":"282923","last_updated":"2021-01-07 15:08:20","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/github.com\/mariovalney\/api-improver-for-woocommerce","header_plugin_uri":"https:\/\/github.com\/mariovalney\/api-improver-for-woocommerce","header_author_uri":"https:\/\/mariovalney.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1145,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"mariovalney","date":"2020-12-23 19:31:18"},"1.1.0":{"tag":"1.1.0","author":"mariovalney","date":"2021-01-07 15:19:50"}},"upgrade_notice":{"1.0.0":"<p>It&#039;s alive!<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2452010,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2452010,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2452010,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2452010,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2445207,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":2445207,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"Request to create a Product with a category without ID.","2":"Example to update a Product with both categories with and without ID."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1556,174636,702,2299,286],"plugin_category":[45],"plugin_contributors":[87575],"plugin_business_model":[],"class_list":["post-133734","plugin","type-plugin","status-publish","hentry","plugin_tags-api","plugin_tags-mariovalney","plugin_tags-products","plugin_tags-rest","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-mariovalney","plugin_committers-mariovalney"],"banners":{"banner":"https:\/\/ps.w.org\/api-improver-for-woocommerce\/assets\/banner-772x250.png?rev=2452010","banner_2x":"https:\/\/ps.w.org\/api-improver-for-woocommerce\/assets\/banner-1544x500.png?rev=2452010","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/api-improver-for-woocommerce\/assets\/icon-128x128.png?rev=2452010","icon_2x":"https:\/\/ps.w.org\/api-improver-for-woocommerce\/assets\/icon-256x256.png?rev=2452010","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/api-improver-for-woocommerce\/assets\/screenshot-1.png?rev=2445207","caption":"Request to create a Product with a category without ID."},{"src":"https:\/\/ps.w.org\/api-improver-for-woocommerce\/assets\/screenshot-2.png?rev=2445207","caption":"Example to update a Product with both categories with and without ID."}],"raw_content":"<!--section=description-->\n<p>Improve your WooCommerce API REST without config.<\/p>\n\n<p><a href=\"https:\/\/wordpress.org\/plugins\/woocommerce\/\" title=\"Install it first, of course\">WooCommerce<\/a> is a awesome plugin used by 5+ million WordPress websites to create e-commerce.<\/p>\n\n<p>It's awesome and we love it but sometimes we need more from API REST.<\/p>\n\n<h3>Endpoints<\/h3>\n\n<p>We support V3.<\/p>\n\n<h4>\/products<\/h4>\n\n<ul>\n<li>Will search for a category\/tag by \"name\" and \"slug\" (in this order) if \"id\" is not provided (or empty).<\/li>\n<li>Will search for attribute ID if it's not provided (or empty). Check <a href=\"https:\/\/woocommerce.github.io\/code-reference\/files\/woocommerce-includes-wc-attribute-functions.html#function_wc_attribute_taxonomy_id_by_name\">wc_attribute_taxonomy_id_by_name<\/a> for more details.<\/li>\n<\/ul>\n\n<p>In both cases, <strong>we will not<\/strong> create a new product attribute, category or tag. You can use the \"aifw_api_v1_products_search_for_terms\" filter to create it and return the \"term_id\".\nWooCommerce will keep the attribute for product only if a taxonomy was not found.<\/p>\n\n<h4>How to Use<\/h4>\n\n<p>Easy and quick!<\/p>\n\n<p>Just activate \"API Improver for WooCommerce\" and it's done. No configurations.<\/p>\n\n<h4>Translations<\/h4>\n\n<p>You can <a href=\"https:\/\/translate.wordpress.org\/projects\/wp-plugins\/api-improver-for-woocommerce\">translate API Improver for WooCommerce<\/a> to your language.<\/p>\n\n<h4>Review<\/h4>\n\n<p>We would be grateful for a <a href=\"https:\/\/wordpress.org\/support\/plugin\/api-improver-for-woocommerce\/reviews\/\">review here<\/a>.<\/p>\n\n<h4>Support<\/h4>\n\n<ul>\n<li>WooCommerce - 4.8<\/li>\n<\/ul>\n\n<p>(API Version 3 supports 3.5.x or later, but we did not test it)<\/p>\n\n<!--section=installation-->\n<p>First<\/p>\n\n<ul>\n<li>Install <a href=\"https:\/\/wordpress.org\/plugins\/woocommerce\/\">WooCommerce<\/a> and activate it.<\/li>\n<\/ul>\n\n<p>Next<\/p>\n\n<ul>\n<li>Install \"API Improver for WooCommerce\" by plugins dashboard.<\/li>\n<\/ul>\n\n<p>Or<\/p>\n\n<ul>\n<li>Upload the entire <code>api-improver-for-woocommerce<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<\/ul>\n\n<p>Then<\/p>\n\n<ul>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<\/ul>\n\n<!--section=faq-->\n<dl>\n<dt><h3>Does it works for another e-commerce plugin?<\/h3><\/dt>\n<dd><p>Nope. The intention here is to improve WooCommerce API REST.<\/p><\/dd>\n<dt><h3>I want to add my customization to endpoints<\/h3><\/dt>\n<dd><p>For products, you can use the filter \"aifw_api_v3_products_request_for_prepare_object_for_database\" to change the request.<\/p><\/dd>\n<dt><h3>Is there a way to create categories or attributes?<\/h3><\/dt>\n<dd><p>We will not create new terms but you can use the \"aifw_api_v3_products_term_not_found\". <a href=\"https:\/\/gist.github.com\/mariovalney\/78090bd7eaa064d6b27e44804fd34008\">Example<\/a>.<\/p><\/dd>\n<dt><h3>Can I help you?<\/h3><\/dt>\n<dd><p>Yes! Visit <a href=\"https:\/\/github.com\/mariovalney\/api-improver-for-woocommerce\">GitHub repository<\/a>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1<\/h4>\n\n<ul>\n<li>Added the ID key if not provided to allow developers send a pretty payload.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>It's alive!<\/li>\n<li>Improved endpoint \"\/products\" to accept category\/tag by \"name\" and \"slug\" if \"id\" is not provided.<\/li>\n<li>Improved endpoint \"\/products\" to search for taxonomies by \"name\" for attributes if \"id\" is not provided.<\/li>\n<\/ul>","raw_excerpt":"A plugin to improve your API REST.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/133734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=133734"}],"author":[{"embeddable":true,"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mariovalney"}],"wp:attachment":[{"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=133734"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=133734"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=133734"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=133734"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=133734"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=133734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}