GithubHelp home page GithubHelp logo

wpdispensary / wp-dispensary Goto Github PK

View Code? Open in Web Editor NEW
79.0 10.0 18.0 11.32 MB

:herb: WP Dispensary - online menu management for dispensaries

Home Page: https://www.wpdispensary.com

License: GNU General Public License v3.0

PHP 93.66% CSS 1.71% JavaScript 2.63% SCSS 2.00%
wp-dispensary wordpress wordpress-plugin cannabis marijuana weed

wp-dispensary's People

Contributors

bignug avatar jeffmatson avatar jeherve avatar pattonwebz avatar robertdevore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wp-dispensary's Issues

WordPress Coding Standards

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

Undefined indexes

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.

New admin Settings page

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

  • Add the original fields back in (removed during framework code update)
  • Make top tabs filterable, so add-on's and other 3rd party plugins can add their own sections.
  • Update placement of Settings in the WP Dispensary admin menu

Optimizing the Action Hooks that are added to data output

I 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 ๐Ÿ‘

Creating items with prices via REST API

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

Find a better way to include $currency_symbols throughout the plugin

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.

Creating items with prices via REST API

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

Not an issue, help wanted

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.