Git Product home page Git Product logo

woocommerce-line-notify's Introduction

CodeFactor

Woocommerce Line Notify

Send woocommerce order notification to Line notify API.
You can customize message pattern and notify to your chat room or your chat group in your pattern.


Woocommerce Line Notify icon
https://wordpress.org/plugins/woo-line-notify

Features

  1. Add line token.
  2. Message pattern with order short code supported.
  3. Send notify to line group or user.
  4. Send notify when have order activity.
  5. Multi language support.
  6. API to send message with basic authen security for developer.
  7. Static method to send message for developer.
  8. Debug mode option.
  9. Dynamic fields to unlock your need.
  10. Dashboard widget.
  11. Can use without Woocommerce.

Short code.

[order_status]
[order_id]
[order_time]
[order_total]
[order_payment]
[order_address]
[order_customer]
[order_phone]
[order_company]
[order_note]
[order_province]
[order_url]
[order_postcode]
[products] <-- List of product in order.

Dynamic shortcode

[shipping *]
[billing *]
[customer *]
[order *]
[meta *]

Short code

Customer Fields

first_name	[custoemr first_name]
last_name	[custoemr last_name]
email	        [custoemr email]
phone	        [custoemr phone]

Shipping fields

company	        [shipping company]
address_1	[shipping address_1]
address_2	[shipping address_2]
city	        [shipping city]
state	        [shipping state]
postcode	[shipping postcode]
country	        [shipping country]
address_index	[shipping address_index]

Billing fields

company	        [billing company]
address_1	[billing address_1]
address_2	[billing address_2]
city	        [billing city]
state	        [billing state]
postcode	[billing postcode]
country	        [billing country]
email	        [billing email]
phone	        [billing phone]
address_index	[billing address_index]

Order fields

order_key	        [order order_key]
customer_user	        [order customer_user]
payment_method	        [order payment_method]
payment_method_title	[order payment_method_title]
transaction_id	        [order transaction_id]
customer_ip_address	[order customer_ip_address]
customer_user_agent	[order customer_user_agent]
created_via	        [order created_via]
date_completed	        [order date_completed]
completed_date	        [order completed_date]
date_paid	        [order date_paid]
paid_date	        [order paid_date]
cart_hash	        [order cart_hash]
order_currency	        [order order_currency]
cart_discount	        [order cart_discount]
cart_discount_tax	[order cart_discount_tax]
order_shipping	        [order order_shipping]
ordertax	        [order ordertax]
order_tax	        [order order_tax]
order_total	        [order order_total]
order_version	        [order order_version]
prices_include_tax	[order prices_include_tax]
download_permissions_granted	[order download_permissions_granted]
recorded_sales	        [order recorded_sales]
recorded_coupon_usage_counts	[order recorded_coupon_usage_counts]
order_stock_reduced	[order order_stock_reduced]
edit_lock	        [order edit_lock]
edit_last	        [order edit_last]

Meta

Just use [meta your_meta_name] to take custom order meta by get_post_meta() function.

API for Developer

To send message via static method just put your message to the method like below.

WooLineNotify::Send_Line_Notify( 'Some message to send' );

REST API

  • URL: domain/wp-json/woo-line-notify/v1/notify
  • METHOD: POST
  • PARAMETERS: message <Your message to send>
  • Authentication: Basic Authen
  • USERNAME/PASSWORD: <API Key>:<API_Key>

For example.

Send post request to http://localhost/wp-json/woo-line-notify/v1/notify you must be send parameter message by form/data and add Authenticate to header with value Basic base64_encode( some_api_key_from_api_option:some_api_key_from_api_option )

How to install

  1. Upload the entire wc_linenotify folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.

Term of Privacy

To understand what we do with your data and compile with The EU General Data Protection Regulation (GDPR)This plugin is call to external service Line Messaging API it use to be send an order data such as Order Id, Order customer name, Order Total, Order Product, Order timestamp, Order payment method depend on your settings to your Line Messager account or Line group related with your Token ID.

3rd party service term

We send a transaction to this domain https://notify-bot.line.me
Privacy Policy rules of Line Messaging https://terms.line.me/line_rules?lang=en

Roadmap

  • Message pattern for selected status.
  • Multiple token id support for message broadcast.

Contibute guidelines

Thank you for your suggestion and support to the project. I very happy to help and give the thing I can do to the world. If you can help me to develop this plugin or join as a team members please follow below. I'll add your name to contributor members if you've joined.

  1. Fork this repo on development branch and sync to your local.
  2. run php composer install
  3. Make change to the project.
  4. Push & commit update to your branch.
  5. Create pull request with update details to developer.
  6. Waiting for approved.

Changelog

version 1.1.0

  • Change admin ui
  • Change class name duplicate.
  • Multi language support.
  • API
  • Add postcode shortcode.
  • Direct method
  • Debug option.
  • Dynamic fields
  • Dashboard widget
  • Can use without Woocommerce

Welcome to the opensource world.

Any support I can do.

License

GNU General Public License v3.0

woocommerce-line-notify's People

Contributors

apinandev avatar iamapinan 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

woocommerce-line-notify's Issues

แก้ไขเวลาและหมายเลขคำสั่งซื้อ

1 ช่วยแก้ไขเวลาให้เป็นเวลาที่แจ้งจริงด้วยครับ เช่น ในข้อความแจ้ง 04.55 แต่เวลาในเครื่องมัน 11.55 เป็นต้น
2 ช่วยเพิ่มหมายเลขคำสั่งซื้อ เพราะ [order_total] มันแสดงราคารวมของสินค้า

ดึงชื่อสินค้าได้หรือไม่

จากตอนนี้ที่สามารถดึง url ได้ ถ้าจะให้ดึงชื่อสินค้าด้วยจะสะดวกมากขึ้น เช่น

สินค้าที่สั่งซื้อ : [product_name]

ซึ่งถ้ามีหลายตัวอาจจะสามารถแสดงเป็นลิสต์ได้ เป็นต้น

ขอบคุณค่ะ

ไม่แสดงเบอร์โทรศัพท์

อาจจะเป็นเพราะดึงแค่ address หรือเปล่า มันไม่ดึงฟีลด์เบอร์โทรศัพท์มาด้วย ซึ่งอาจจะจำเป็นในบางธุรกิจหรือช่วยให้ติดต่อลูกค้าได้เลยหากจำเป็นโดยที่ไม่ต้องไปเปิดดูรายละเอียดในเว็บอีกรอบ

ขอบคุณค่ะ

Add your image url ไม่ควรบังคับให้จำเป็นต้องกรอก

เนื่องจากเหมือนจะเป็นภาพที่ไม่ได้สื่อถึงอะไรเป็นพิเศษ เช่น ไม่ใช่ภาพของสินค้าที่สั่งซื้อ เข้าใจว่าภาพนี้อาจจะเป็นภาพประจำตัวของร้านเฉยๆ ซึ่งในกรณีที่บางคนอาจจะมีร้านเดียว ซึ่งไม่มีความจำเป็นที่จะต้องใช้รูปภาพเพื่อเป็นจุดสังเกตุ จึงอาจจะไม่จำเป็นต้องระบุภาพนี้ก็ได้

หรือถ้าเป็นไปได้ถ้าหากดึงภาพสินค้าได้อัตโนมัติก็น่าจะดีมาก

Feature request

Message pattern request

  • องค์กร (company)
  • ลิงก์จัดการออเดอร์ (หลังบ้าน)
  • เบอร์โทร
  • อีเมล์
  • อยากให้เพิ่ม จังหวัด, รหัสไปรษณีย์, ประเทศ เข้ามาในรายละเอียด ที่อยู่ลูกค้า ด้วยครับ
  • บันทึกเพิ่มเติม (order comments)

อยากให้ปรับปรุง

  • หากมีการเลือก จัดส่งไปยังที่อยู่อื่น? (Ship to different address) ให้อัพเดต Message pattern (ทั้งหมด) จาก billing ไปที่ shipping แทน
  • สถานะออเดอร์ (แปลไทยหรือตามภาษาหลักของเวบไซต์)
  • รูปภาพ Add your image url ไม่ต้องใส่ก็ได้ ปัจจุบันเป็น required

Error

Error ตรง Notifime Only มีแจ้ง error แบบนี้ในแต่ละตัวเลือก ทุกตัวเลือกขึ้นข้อความเหมือนกันหมด

Warning: in_array() expects parameter 2 to be array, null given in /home/sistermake/domains/sistermakeup.com/public_html/wp-content/plugins/wc_linenotify-master/wc_linenotify.php on line 294

PHP 7.2 WP 4.9.8 Woo 3.4.5

Error "There has been a critical error on this website. Please check your site admin email inbox for instructions." ครับ

ไม่สามารถตั้งค่าได้ เนื่องจากมีข้อความ error "There has been a critical error on this website. Please check your site admin email inbox for instructions." ไม่ทราบว่าแก้ไขยังไงครับ

เวอร์ชั่นต่างๆ
Wordpress Ver. : 5.9
PHP Ver. : 8.0.15
Line Notify Ver. : 1.1.7
Woocommerce Ver. : 6.2.0

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.