Skip to content

Commit

Permalink
Merge pull request #82 from dingo-d/develop
Browse files Browse the repository at this point in the history
Readme update
  • Loading branch information
dingo-d authored Jan 18, 2022
2 parents 1720865 + b4b0eee commit 0ba8fe8
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 22 deletions.
30 changes: 29 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ execute on the checkout.

Usage:

<code>
add_filter('woo_solo_api_overwrite_request_on_checkout', 'my_payment_processor_overwrite', 10, 2);

function my_payment_processor_overwrite($sendControl, $order) {
Expand All @@ -537,9 +538,12 @@ function my_payment_processor_overwrite($sendControl, $order) {
// Default fallback.
return $sendControl;
}
</code>

<code>
@param string $sendControl Type of send control. Can be 'checkout' or 'status_change'.
@param WC_Order $order Order object.
</code>

--------------

Expand All @@ -559,8 +563,10 @@ function my_customer_filter($customerNote, $order) {
}
</code>

<code>
@param string $customerNote Existing customer note.
@param WC_Order $order Order object
</code>

--------------

Expand All @@ -571,14 +577,18 @@ you can just hook to this filter and modify the request body.

Usage:

<code>
add_filter('woo_solo_api_modify_request_body', 'my_customer_filter', 10, 2);

function my_customer_filter($requestBody, $order) {
// (maybe) modify $requestBody.
return $requestBody;
}
</code>

<code>
@param array $requestBody Existing customer note.
</code>

--------------

Expand All @@ -598,9 +608,11 @@ function my_message_filter($emailMessage, $orderId, $email) {
}
</code>

<code>
@param string $emailMessage Email message from options to filter.
@param int $orderId Order ID.
@param string $email Email address of the person for whom this message needs to be send to.
</code>

--------------

Expand All @@ -619,9 +631,11 @@ function my_message_filter($defaultMessage, $orderId, $email) {
}
</code>

<code>
@param string $defaultMessage Email message to filter.
@param int $orderId Order ID.
@param string $email Email address of the person for whom this message needs to be send to.
</code>

--------------

Expand All @@ -641,8 +655,10 @@ function my_title_filter($emailTitle, $orderId) {
}
</code>

<code>
@param string $emailTitle Email title.
@param int $orderId Order ID.
</code>

--------------

Expand All @@ -662,8 +678,10 @@ function my_title_filter($defaultTitle, $orderId) {
}
</code>

<code>
@param string $emailTitle Email title.
@param int $orderId Order ID.
</code>

--------------

Expand All @@ -673,10 +691,12 @@ When email to customer is sent, maybe you want to add something more. In that
case you'll probably need to modify the headers sent with the email.
Default ones are

<code>
[
'MIME-Version: 1.0',
'Content-Type: text/html',
];
</code>

You can add to that list.

Expand All @@ -691,11 +711,13 @@ function my_custom_email_headers($headers) {
}
</code>

<code>
@param array $headers Email headers to pass to wp_mail.
</code>

--------------

Filter the from name set from the options
Filter the 'from' name set from the options

Usage:

Expand All @@ -708,7 +730,9 @@ function my_custom_from_name($name) {
}
</code>

<code>
@param string $name Name to change in the "From" field.
</code>

--------------

Expand All @@ -730,7 +754,9 @@ function my_global_discount($globalDiscount) {
}
</code>

<code>
@param int $globalDiscount The value of the global discount to apply to every item.
</code>

--------------

Expand All @@ -751,6 +777,8 @@ function my_tax_rate($taxRate, $itemData, $taxRates) {
}
</code>

<code>
@param float $taxRate The value of the tax rate for the current order item.
@param array $itemData The data for the current order item.
@param array $taxRates The value of the tax rates for the current order item.
</code>
35 changes: 14 additions & 21 deletions languages/woo-solo-api-js.pot
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.0.1\n"
"X-Generator: babel-plugin-makepot\n"

#: assets/dev/scripts/const/dueDate.jsx:10
msgid "1 week"
Expand Down Expand Up @@ -265,8 +257,8 @@ msgstr ""

#: assets/dev/scripts/index.jsx:300
msgid ""
"For more details on the options you can read the official SOLO API documentation "
"here: "
"For more details on the options you can read the official SOLO API "
"documentation here: "
msgstr ""

#: assets/dev/scripts/index.jsx:334
Expand Down Expand Up @@ -377,8 +369,9 @@ msgstr ""

#: assets/dev/scripts/index.jsx:495
msgid ""
"The currency will be automatically added if the selected currency is different "
"from HRK. Also, a note about conversion rate will be added to the invoice/offer."
"The currency will be automatically added if the selected currency is "
"different from HRK. Also, a note about conversion rate will be added to the "
"invoice/offer."
msgstr ""

#: assets/dev/scripts/index.jsx:501
Expand Down Expand Up @@ -431,9 +424,9 @@ msgstr ""

#: assets/dev/scripts/index.jsx:559
msgid ""
"Decide when to send the PDF of the order or invoice.On customer checkout, or "
"when you approve the order in the WooCommerce admin.This will determine when the "
"call to the SOLO API will be made"
"Decide when to send the PDF of the order or invoice.On customer checkout, "
"or when you approve the order in the WooCommerce admin.This will determine "
"when the call to the SOLO API will be made"
msgstr ""

#: assets/dev/scripts/index.jsx:565
Expand Down Expand Up @@ -466,8 +459,8 @@ msgstr ""

#: assets/dev/scripts/index.jsx:615
msgid ""
"<str>CAUTION</str>: This change is global, every mail send from your WordPress "
"will have this 'from' name"
"<str>CAUTION</str>: This change is global, every mail send from your "
"WordPress will have this 'from' name"
msgstr ""

#: assets/dev/scripts/index.jsx:630
Expand All @@ -480,8 +473,8 @@ msgstr ""

#: assets/dev/scripts/index.jsx:636
msgid ""
"Pressing the button will make a request to your Solo API account,and will list "
"all the invoices you have"
"Pressing the button will make a request to your Solo API account,and will "
"list all the invoices you have"
msgstr ""

#: assets/dev/scripts/index.jsx:651
Expand Down Expand Up @@ -530,4 +523,4 @@ msgstr ""

#: assets/dev/scripts/index.jsx:683
msgid "Updated at"
msgstr ""
msgstr ""

0 comments on commit 0ba8fe8

Please sign in to comment.