{"id":19146378,"url":"https://github.com/netzstrategen/wordpress-shop-standards","last_synced_at":"2025-05-07T02:04:02.227Z","repository":{"id":34279086,"uuid":"128044279","full_name":"netzstrategen/wordpress-shop-standards","owner":"netzstrategen","description":"Common enhancements for WooCommerce shops.","archived":false,"fork":false,"pushed_at":"2025-01-09T18:34:11.000Z","size":659,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-05-07T02:03:57.520Z","etag":null,"topics":["mysql","php","woocommerce","woocommerce-plugin","wordpress"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netzstrategen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-04T10:05:51.000Z","updated_at":"2024-11-22T15:35:36.000Z","dependencies_parsed_at":"2023-11-07T14:42:40.304Z","dependency_job_id":"cf8e9963-278e-4b0b-ae8a-b8f388b8481c","html_url":"https://github.com/netzstrategen/wordpress-shop-standards","commit_stats":{"total_commits":228,"total_committers":27,"mean_commits":8.444444444444445,"dds":0.6929824561403508,"last_synced_commit":"e522886dc67b1944977adf1857bbe4d3a13de8b8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netzstrategen%2Fwordpress-shop-standards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netzstrategen%2Fwordpress-shop-standards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netzstrategen%2Fwordpress-shop-standards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netzstrategen%2Fwordpress-shop-standards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netzstrategen","download_url":"https://codeload.github.com/netzstrategen/wordpress-shop-standards/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252798852,"owners_count":21805886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mysql","php","woocommerce","woocommerce-plugin","wordpress"],"created_at":"2024-11-09T07:43:58.456Z","updated_at":"2025-05-07T02:04:02.207Z","avatar_url":"https://github.com/netzstrategen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shop Standards plugin\n\nThis plugin adds what we consider standard refinements for e-commerce websites. These refinements include diverse customizations to WooCommerce and related plugins, like WooCommerce German Market.\n\n## Configuration settings\n\nThe plugin adds several configuration settings in two main points of the backend admin:\n- [Custom tab in WooCommerce configuration page](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/WooCommerce.php#L15).\n- Products options ([simple products](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/WooCommerce.php#L226), [products variations](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/WooCommerce.php#L473)).\n\n## Shop customizations\n\nThe customizations applied by `shop-standards` affect diverse aspects of the way the shop works: products prices, products stocks, products delivery time, products listing filtering, SEO, performance, WP-CLI commands...\n\n## WooCommerce customizations\nThese customizations include:\n- [General products management and display](#general-products-management-and-display).\n- [Products prices management and display](#products-prices)\n- [Products sale label and category](#products-sale-label-and-category)\n- [Products stocks management and display](#products-stocks)\n- [Products delivery time management and display](#products-delivery-time)\n- [Filtering products by delivery time](#filtering-products-by-delivery-time)\n- [Plus Products category](plus-products-category)\n- [Cart and checkout](#cart-and-checkout)\n\n### General products management and display\n- [Set number of products displayed on listing pages](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/WooCommerce.php#L188).\n- [Minimum amount of product variations to trigger the AJAX retrieval of data](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/WooCommerce.php#L133).\n- [Enable revisions for products descriptions](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/WooCommerce.php#L85).\n- [Hide \"Add to cart\" button for products not to be sold online](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/WooCommerce.php#L195).\n- [Hide product sale label](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/WooCommerce.php#L214). This is controlled by a backend [configuration setting](#configuration-settings).\n\n#### Product backend custom fields\n\nThe plugin adds several backend custom fields to both simple products([#1](https://github.com/netzstrategen/wordpress-shop-standards/blob/a15cb7d86afc6a7808cee6e9177a0c2c604e6119/src/WooCommerce.php#L226), [#2](https://github.com/netzstrategen/wordpress-shop-standards/blob/a15cb7d86afc6a7808cee6e9177a0c2c604e6119/src/WooCommerce.php#L297), [#3](https://github.com/netzstrategen/wordpress-shop-standards/blob/a15cb7d86afc6a7808cee6e9177a0c2c604e6119/src/WooCommerce.php#L313)) and variable products([#1](https://github.com/netzstrategen/wordpress-shop-standards/blob/a15cb7d86afc6a7808cee6e9177a0c2c604e6119/src/WooCommerce.php#L473), [#2](https://github.com/netzstrategen/wordpress-shop-standards/blob/a15cb7d86afc6a7808cee6e9177a0c2c604e6119/src/WooCommerce.php#L535)).\n\nCustom fields added to products are:\n- Simple products\n  - Back in stock date\n  - GTIN\n  - ERP/Inventory ID\n  - Display sale price as normal price (checkbox)\n  - Product notes\n  - Custom price label\n  - Hide sale percentage bubble (checkbox)\n  - Hide add to cart button (checkbox)\n  - Variation has insufficient images (checkbox, only product variations)\n  - Purchasing Price\n  - Price comparison focus product\n\n### Products prices\nCustomizations in the way the product prices are managed and displayed include:\n- [Strike out regular prices range of variable products on sale](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/WooCommerce.php#L39).\n- [Remove prefix \"From\" in variable products price ranges added by plugin B2B Market](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/WooCommerce.php#L75).\n- [Display sale price as regular price](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/WooCommerce.php#L605). This is controlled by a backend [configuration setting](#configuration-settings).\n\n### Products sale label and category\nProducts on sale can be automatically assigned a custom category. This is implemented in class [WooCommerceSaleLabel](https://github.com/netzstrategen/wordpress-shop-standards/blob/a15cb7d86afc6a7808cee6e9177a0c2c604e6119/src/WooCommerceSaleLabel.php#L13).\n\n### Products stocks\n- [Display product status messages regarding availability](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/WooCommerce.php#L138).\n\n### Products delivery time management and display\n- [Update variable product delivery time with the lowest delivery time among its own variations](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/Admin.php#L77). The update is triggered [when the product is saved](https://github.com/netzstrategen/wordpress-shop-standards/blob/a15cb7d86afc6a7808cee6e9177a0c2c604e6119/src/Plugin.php#L92) or [manually using a WP-CLI custom command](#wp-cli-custom-commands).\n\nThis feature relies on a very specific way to setup the delivery time values. Those need to be defined as terms of taxonomy `product_delivery_times`.\n\nThe slug of each term in the taxonomy has to be a numeric value, so that the code is able to compare all values and select the lowest one. The recommended way is to set the slug of each term to the value in days of the corresponding delivery  time. If the delivery time is a range, we pick the highest time.\n\nE.g.\n- ca. 2-3 Wochen =\u003e 21\n- ca. 5-6 Wochen =\u003e 40\n- ca. 3-4 Werktage =\u003e 4\n- 48 stunden =\u003e 2\n\n### Filtering products by delivery time\nThis plugin adds a widget to filter products by their delivery time. This is achieved overriding layered nav WooCommerce widgets with new ones supporting WooCommerce German Market delivery time taxonomy terms ([see previous point](products-delivery-time-management-and-display)) to be used as product filters.\n\nThe whole implementation is contained in folder [src/ProductFilters](https://github.com/netzstrategen/wordpress-shop-standards/tree/master/src/ProductFilters), entry point being class [DeliveryTime](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/ProductFilters/DeliveryTime.php).\n\nThe time delivery product filter widget can be used in any products listing page, as any other WooCommerce (so called) layered navigation widget.\n\n\n### Cart and checkout\n- [Add salutation custom field for billing and shipping](https://github.com/netzstrategen/wordpress-shop-standards/blob/a15cb7d86afc6a7808cee6e9177a0c2c604e6119/src/WooCommerceSalutation.php#L54). This is controlled by a backend [configuration setting](https://github.com/netzstrategen/wordpress-shop-standards/blob/a15cb7d86afc6a7808cee6e9177a0c2c604e6119/src/WooCommerceSalutation.php#L33).\n- [Add a confirmation email custom field on the checkout page](https://github.com/netzstrategen/wordpress-shop-standards/blob/a15cb7d86afc6a7808cee6e9177a0c2c604e6119/src/WooCommerceCheckout.php#L66).This is controlled by a backend [configuration setting](https://github.com/netzstrategen/wordpress-shop-standards/blob/a15cb7d86afc6a7808cee6e9177a0c2c604e6119/src/WooCommerceCheckout.php#L38).\n- [Add basic information (e.g. weight, sku, etc.) and product attributes to cart item data](https://github.com/netzstrategen/wordpress-shop-standards/blob/a15cb7d86afc6a7808cee6e9177a0c2c604e6119/src/WooCommerce.php#L673).\n\n### Order emails\n- [Add basic information (e.g. weight, sku, etc.) and product attributes to order emails](https://github.com/netzstrategen/wordpress-shop-standards/blob/a15cb7d86afc6a7808cee6e9177a0c2c604e6119/src/WooCommerce.php#L725).\n\n## Performance improvements\n\nPerformance improvements are mainly implemented in class [Performance](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/Performance.php). Those cover:\n- [Preloading of main product image](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/WooCommerce.php#L410).\n- Asynchronous loading of [styles](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/Performance.php#L84) and [scripts](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/Performance.php#L124).\n- [DNS prefetching for resources](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/Performance.php#L147).\n- [Prevent loading of unwanted assets](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/Performance.php#L59).\n\n## Customizations on third party plugins\n\n### WooCommerce German Market\n\n- [Remove SKU from order item name](https://github.com/netzstrategen/wordpress-shop-standards/blob/a15cb7d86afc6a7808cee6e9177a0c2c604e6119/src/WooCommerce.php#L778).\n- [Fix delivery time is not displayed for variable products](https://github.com/netzstrategen/wordpress-shop-standards/blob/a15cb7d86afc6a7808cee6e9177a0c2c604e6119/src/WooCommerce.php#L969).\n\n### B2B Market\n\n- [Remove prefix \"From\" in variable products price ranges added by plugin B2B Market](https://github.com/netzstrategen/wordpress-shop-standards/blob/master/src/WooCommerce.php#L75).\n\n## WP-CLI custom commands\nPlugin `shop-standards` provide a custom WP-CLI command to update the delivery time of variable products. This command ensures the delivery time assigned to variable products is the lowest among its variations.\n\nAlthough this update is triggered whenever the variable products are edited and saved, this offers a convenient way to update a given variable product (by ID), a list of them (comma separated list of IDs) or all of them.\n\n__Update delivery time for a single product:__\n\n```wp shop-standards refreshDeliveryTime 2165```\n\n__Update delivery time for a list of products:__\n\n```wp shop-standards refreshDeliveryTime 2165, 2166, 2167```\n\n__Update delivery time for all products:__\n\n```wp shop-standards refreshDeliveryTime --all```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetzstrategen%2Fwordpress-shop-standards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetzstrategen%2Fwordpress-shop-standards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetzstrategen%2Fwordpress-shop-standards/lists"}