wpdispensary / wp-dispensary Goto Github PK
View Code? Open in Web Editor NEW:herb: WP Dispensary - online menu management for dispensaries
Home Page: https://www.wpdispensary.com
License: GNU General Public License v3.0
:herb: WP Dispensary - online menu management for dispensaries
Home Page: https://www.wpdispensary.com
License: GNU General Public License v3.0
I am working through each release to go over every file in the plugin and bring all coding up to WordPress Coding Standards.
The goal is to have all files done by the release of Version 2.0
The tables should not be injected into the content key's value, because those details are available as their own keys already.
Not sure if I should strip it completely, or add in another content key with it stripped, so users could have both options.
actively thinking this over, and welcome your thoughts
I see these messages in my logs:
[07-Oct-2017 16:44:33 UTC] PHP Notice: Undefined index: compounddetailsmeta_noncename in /var/www/html/wp-content/plugins/wp-dispensary/admin/post-types/wp-dispensary-metaboxes.php on line 87
[07-Oct-2017 16:44:33 UTC] PHP Notice: Undefined index: pricesmeta_noncename in /var/www/html/wp-content/plugins/wp-dispensary/admin/post-types/wp-dispensary-metaboxes.php on line 205
[07-Oct-2017 16:44:33 UTC] PHP Notice: Undefined index: concentratepricesmeta_noncename in /var/www/html/wp-content/plugins/wp-dispensary/admin/post-types/wp-dispensary-metaboxes.php on line 318
[07-Oct-2017 16:44:33 UTC] PHP Notice: Undefined index: singlepricesmeta_noncename in /var/www/html/wp-content/plugins/wp-dispensary/admin/post-types/wp-dispensary-metaboxes.php on line 550
[07-Oct-2017 16:44:33 UTC] PHP Notice: Undefined index: seedcountmeta_noncename in /var/www/html/wp-content/plugins/wp-dispensary/admin/post-types/wp-dispensary-metaboxes.php on line 643
[07-Oct-2017 16:44:33 UTC] PHP Notice: Undefined index: clonecountmeta_noncename in /var/www/html/wp-content/plugins/wp-dispensary/admin/post-types/wp-dispensary-metaboxes.php on line 736
[07-Oct-2017 16:44:33 UTC] PHP Notice: Undefined index: thccbdmgmeta_noncename in /var/www/html/wp-content/plugins/wp-dispensary/admin/post-types/wp-dispensary-metaboxes.php on line 837
[07-Oct-2017 16:44:33 UTC] PHP Notice: Undefined index: thccbdtopical_noncename in /var/www/html/wp-content/plugins/wp-dispensary/admin/post-types/wp-dispensary-metaboxes.php on line 941
[07-Oct-2017 16:44:33 UTC] PHP Notice: Undefined index: clonedetailsmeta_noncename in /var/www/html/wp-content/plugins/wp-dispensary/admin/post-types/wp-dispensary-metaboxes.php on line 1047
You should check these are set first before you try to access them.
I'll take care of this issue in a PR later tonight.
The original Settings page code is lacking a lot of options for customization that I'd really like to fix for version 2.0
I'll be building the new Settings page based on this code from Ahmad Awais.
TODO
Settings
in the WP Dispensary admin menuI had a discussion on Twitter (read thread) about how to handle the Action Hooks added to the data output (see commit) while working on version 1.8
I'm still not 100% sure if this is the most optimized way of handling it.
My goal is to dig into this more and make a final decision on keeping it the way it is now, or updating the code for the release of Version 2.0
Open to opinions and other options, so if you've got them speak up ๐
There is currently a bug in the REST API that affects adding pricing to custom post types. The slug_update_prices
method has a param $object
, and it treats it as an array, however since WordPress 3.5 the method has been passed a WP_Post
instead of an array, so trying to get the ID index fails. Here's a log excerpt from a failure:
PHP Fatal error: Uncaught Error: Cannot use object of type WP_Post as array in /var/www/wordpress/wp-content/plugins/wp-dispensary/admin/wp-dispensary-rest-api.php:377\nStack trace:\n#0 /var/www/wordpress/wp-includes/rest-api/endpoints/class-wp-rest-controller.php(431): slug_update_prices('10.0', Object(WP_Post), '_gram', Object(WP_REST_Request), 'flowers')\n#1 /var/www/wordpress/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(602): WP_REST_Controller->update_additional_fields_for_object(Object(WP_Post), Object(WP_REST_Request))\n#2 /var/www/wordpress/wp-includes/rest-api/class-wp-rest-server.php(946): WP_REST_Posts_Controller->create_item(Object(WP_REST_Request))\n#3 /var/www/wordpress/wp-includes/rest-api/class-wp-rest-server.php(329): WP_REST_Server->dispatch(Object(WP_REST_Request))\n#4 /var/www/wordpress/wp-includes/rest-api.php(305): WP_REST_Server->serve_request('/wp/v2/flowers')\n#5 /var/www/wordpress/wp-includes/class-wp-hook.php(288): rest_api_loaded(Object(WP))\n#6 /var/www/wordpress/wp-includes/class-wp- in /var/www/wordpress/wp-content/plugins/wp-dispensary/admin/wp-dispensary-rest-api.php on line 377
Right now, I have the $currency_symbols code added to every area in the plugin that the symbols are displayed ... this means adding the currency symbols for 158 in an array in EVERY FUCKING FILE ....
It's impossible to maintain easily as it currently is set up, so I need to find a better way to make them universally available from one place in the code.
There is currently a bug in the REST API that affects adding pricing to custom post types. The slug_update_prices
method has a param $object
, and it treats it as an array, however since WordPress 3.5 the method has been passed a WP_Post
instead of an array, so trying to get the ID index fails. Here's a log excerpt from a failure:
PHP Fatal error: Uncaught Error: Cannot use object of type WP_Post as array in /var/www/wordpress/wp-content/plugins/wp-dispensary/admin/wp-dispensary-rest-api.php:377\nStack trace:\n#0 /var/www/wordpress/wp-includes/rest-api/endpoints/class-wp-rest-controller.php(431): slug_update_prices('10.0', Object(WP_Post), '_gram', Object(WP_REST_Request), 'flowers')\n#1 /var/www/wordpress/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(602): WP_REST_Controller->update_additional_fields_for_object(Object(WP_Post), Object(WP_REST_Request))\n#2 /var/www/wordpress/wp-includes/rest-api/class-wp-rest-server.php(946): WP_REST_Posts_Controller->create_item(Object(WP_REST_Request))\n#3 /var/www/wordpress/wp-includes/rest-api/class-wp-rest-server.php(329): WP_REST_Server->dispatch(Object(WP_REST_Request))\n#4 /var/www/wordpress/wp-includes/rest-api.php(305): WP_REST_Server->serve_request('/wp/v2/flowers')\n#5 /var/www/wordpress/wp-includes/class-wp-hook.php(288): rest_api_loaded(Object(WP))\n#6 /var/www/wordpress/wp-includes/class-wp- in /var/www/wordpress/wp-content/plugins/wp-dispensary/admin/wp-dispensary-rest-api.php on line 377
I want to show the subcategories of product below the titles in the product listing on home page, can you please help me how can I do that?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.