Skip to content

H3rby7/yesticket-custom

Repository files navigation

YesTicket WP Plugin

Wordpress Plugin to display Events, Shows, Performances, Workshops, Festivals and Audience Feedback (Testimonials) from the "YesTicket" Online Ticketing Service.

codecov

Installing in Wordpress

  1. In your Wordpress go to Plugins > Install.
  2. Select the plugin ZIP archive.
  3. Activate plugin
  4. Configure the necessary settings on the plugin page
  5. Use the shortcodes. For help visit the plugin settings page.

Customizing

You can find the client-side CSS here. Use your own CSS to overwrite the necessary styles.

Developing

DEV-Setup Credits to nezhar

Setup will run on http://127.0.0.1.

Run DEV ENV

First you need to adjust a few settings:

cp env.example .env

And adjust the new .env file to your configuration.

Start

docker-compose run --rm wpcli install-wp.sh

Stop DEV ENV

docker-compose down --volumes

Deployment / Shipping

Update this file and also update the changelog!

Automated

Requires docker. Windows users: Make sure the bin/*.sh files have LF file endings.

docker-compose -f docker-compose.zip.yml run --rm zipper

Manual

Zip the files inside the yesticket folder. It should contain the following files and folders:

|_admin.css
|_front.css
|_front.js
|_yesticket_api.php
|_yesticket_helpers.php
|_yesticket_plugin_page.php
|_yesticket.php
|_admin/*
    |_(whole folder)
|_img/*
    |_(whole folder)
|_languages/*
    |_(whole folder)
|_shortcodes/*
    |_(whole folder)

Manual Testing

  1. On Settings page trigger all functions once
    • Save
    • Clear Cache
  2. On Shortcodes page go through all TABs
  3. On created content page check if all shortcodes render correctly
    • remember to 'display details', where possible
  4. Switch to a different image in docker-compose and repeat the testing process.

Automated Test-Setup

Credits to chriszarate

For a list of common assertions see this.

Running automated Tests

Simple All-In-One:

docker-compose -f docker-compose.phpunit.yml up --build wordpress_phpunit

If encountering any errors, attempt the same cmd again.

If it still fails try:

docker-compose -f docker-compose.phpunit.yml up -d
docker-compose -f docker-compose.phpunit.yml run --rm wordpress_phpunit phpunit --debug [...args]

Stop automated Test Container

This clears the whole testing setup.

docker-compose -f docker-compose.phpunit.yml down --volumes

Translations

Followed the Official Wordpress Guide.

If you want to add a translation you can use the 'Loco' Plugin to help translating locally.

Note that some text is generated by the YesTicket API

Useful Commands

Check php --ini settings

Check for php ini boolean params. E.G. for 'allow_url_fopen':

docker-compose exec -ti wp php -r "var_dump(\filter_var(\ini_get('allow_url_fopen'), \FILTER_VALIDATE_BOOLEAN));"