Skip to content

Commit

Permalink
v5.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
saad-siddique committed Aug 22, 2024
1 parent 3dd2f76 commit 358bacf
Show file tree
Hide file tree
Showing 34 changed files with 176 additions and 112 deletions.
80 changes: 42 additions & 38 deletions languages/uncanny-automator.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the GPLv3.
msgid ""
msgstr ""
"Project-Id-Version: Uncanny Automator 5.10.1\n"
"Project-Id-Version: Uncanny Automator 5.10.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/uncanny-automator\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2024-08-20T17:10:26+00:00\n"
"POT-Creation-Date: 2024-08-22T16:12:27+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.10.0\n"
"X-Domain: uncanny-automator\n"
Expand Down Expand Up @@ -14890,8 +14890,12 @@ msgstr ""
msgid "Pages are fetched successfully"
msgstr ""

#: src/integrations/facebook/helpers/facebook-helpers.php:359
msgid "No Facebook Pages were found linked to this account. Please click the button below to re-authenticate and ensure the correct pages and permissions are selected."
msgstr ""

#. translators: Error exception message
#: src/integrations/facebook/helpers/facebook-helpers.php:548
#: src/integrations/facebook/helpers/facebook-helpers.php:552
msgctxt "Facebook pages"
msgid "Unable to locate a valid access token for the specified Facebook Page. Please edit the recipe and ensure that you have selected the correct Facebook page, then resave the action. Additionally, you can attempt to reconnect the account by navigating to Automator > App Integrations > Facebook Pages. %s"
msgstr ""
Expand Down Expand Up @@ -16672,22 +16676,22 @@ msgctxt "Google Sheets"
msgid "The following spreadsheets are available for selection in the recipe editor:"
msgstr ""

#: src/integrations/google-sheet/settings/file-picker-view.php:53
#: src/integrations/google-sheet/settings/file-picker-view.php:56
msgctxt "Google Sheets"
msgid "There are currently no spreadsheets selected"
msgstr ""

#: src/integrations/google-sheet/settings/file-picker-view.php:54
#: src/integrations/google-sheet/settings/file-picker-view.php:57
msgctxt "Google Sheets"
msgid "Click the button below to select sheets"
msgstr ""

#: src/integrations/google-sheet/settings/file-picker-view.php:60
#: src/integrations/google-sheet/settings/file-picker-view.php:63
msgctxt "Google Sheets"
msgid "An error occurred while authorizing the request to use File selection feature."
msgstr ""

#: src/integrations/google-sheet/settings/file-picker-view.php:71
#: src/integrations/google-sheet/settings/file-picker-view.php:74
msgctxt "Google Sheets"
msgid "Select new sheet(s)"
msgstr ""
Expand Down Expand Up @@ -25683,37 +25687,17 @@ msgctxt "WooCommerce"
msgid "lands on a thank you page for"
msgstr ""

#: src/integrations/woocommerce/helpers/woocommerce-helpers.php:319
msgctxt "Woo"
msgid "Order ID"
msgstr ""

#: src/integrations/woocommerce/helpers/woocommerce-helpers.php:323
#: src/integrations/woocommerce/tokens/loopable/trigger/order-items.php:26
msgctxt "Woo"
msgid "Date created"
msgid "Item ID"
msgstr ""

#: src/integrations/woocommerce/helpers/woocommerce-helpers.php:327
#: src/integrations/woocommerce/tokens/loopable/trigger/order-items.php:30
#: src/integrations/woocommerce/tokens/loopable/utils/Loopable_Tokens_Utils.php:28
msgctxt "Woo"
msgid "Total"
msgstr ""

#: src/integrations/woocommerce/helpers/woocommerce-helpers.php:331
msgctxt "Woo"
msgid "Status"
msgstr ""

#: src/integrations/woocommerce/helpers/woocommerce-helpers.php:335
msgctxt "Woo"
msgid "Items"
msgstr ""

#: src/integrations/woocommerce/tokens/loopable/trigger/order-items.php:26
msgctxt "Woo"
msgid "Item ID"
msgstr ""

#: src/integrations/woocommerce/tokens/loopable/trigger/order-items.php:33
msgctxt "Woo"
msgid "Subtotal"
Expand Down Expand Up @@ -25777,22 +25761,22 @@ msgctxt "Woo"
msgid "Order products tags"
msgstr ""

#: src/integrations/woocommerce/tokens/loopable/universal/all-order-24-hours.php:25
#: src/integrations/woocommerce/tokens/loopable/universal/all-order-24-hours.php:26
msgctxt "Woo"
msgid "All orders in the past 24 hours"
msgstr ""

#: src/integrations/woocommerce/tokens/loopable/universal/all-orders-monthly.php:25
#: src/integrations/woocommerce/tokens/loopable/universal/all-orders-monthly.php:26
msgctxt "Woo"
msgid "All orders in the past 30 days"
msgstr ""

#: src/integrations/woocommerce/tokens/loopable/universal/all-orders-weekly.php:25
#: src/integrations/woocommerce/tokens/loopable/universal/all-orders-weekly.php:26
msgctxt "Woo"
msgid "All orders in the past week"
msgstr ""

#: src/integrations/woocommerce/tokens/loopable/universal/all-orders-yearly.php:25
#: src/integrations/woocommerce/tokens/loopable/universal/all-orders-yearly.php:26
msgctxt "Woo"
msgid "All orders in the past 365 days"
msgstr ""
Expand All @@ -25802,22 +25786,22 @@ msgctxt "Woo"
msgid "All products categories"
msgstr ""

#: src/integrations/woocommerce/tokens/loopable/universal/user-order-24-hours.php:25
#: src/integrations/woocommerce/tokens/loopable/universal/user-order-24-hours.php:26
msgctxt "Woo"
msgid "User's orders in the past 24 hours"
msgstr ""

#: src/integrations/woocommerce/tokens/loopable/universal/user-orders-monthly.php:25
#: src/integrations/woocommerce/tokens/loopable/universal/user-orders-monthly.php:26
msgctxt "Woo"
msgid "User's orders in the past 30 days"
msgstr ""

#: src/integrations/woocommerce/tokens/loopable/universal/user-orders-weekly.php:25
#: src/integrations/woocommerce/tokens/loopable/universal/user-orders-weekly.php:26
msgctxt "Woo"
msgid "User's orders in the past week"
msgstr ""

#: src/integrations/woocommerce/tokens/loopable/universal/user-orders-yearly.php:25
#: src/integrations/woocommerce/tokens/loopable/universal/user-orders-yearly.php:26
msgctxt "Woo"
msgid "User's orders in the past 365 days"
msgstr ""
Expand All @@ -25837,6 +25821,26 @@ msgctxt "Woo"
msgid "User's purchased products"
msgstr ""

#: src/integrations/woocommerce/tokens/loopable/utils/Loopable_Tokens_Utils.php:20
msgctxt "Woo"
msgid "Order ID"
msgstr ""

#: src/integrations/woocommerce/tokens/loopable/utils/Loopable_Tokens_Utils.php:24
msgctxt "Woo"
msgid "Date created"
msgstr ""

#: src/integrations/woocommerce/tokens/loopable/utils/Loopable_Tokens_Utils.php:32
msgctxt "Woo"
msgid "Status"
msgstr ""

#: src/integrations/woocommerce/tokens/loopable/utils/Loopable_Tokens_Utils.php:36
msgctxt "Woo"
msgid "Items"
msgstr ""

#: src/integrations/woocommerce/tokens/wc-tokens.php:32
msgid "Billing country (full name)"
msgstr ""
Expand Down
16 changes: 15 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**Requires at least:** 5.4 \
**Tested up to:** 6.6.1 \
**Requires PHP:** 7.0 \
**Stable tag:** 5.10.1 \
**Stable tag:** 5.10.2 \
**License:** GPLv3 \
**License URI:** https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -389,6 +389,20 @@ We're a Toronto-based WordPress company specializing in elearning and automation

## Changelog

### 5.10.2 [2024-08-22]

**Fixed:**

* Facebook Pages - We've added a little detective work to check if you actually have access to your Pages. If not, we'll let you know—no more guessing! #5023
* Google Sheets - The system has learned not to freak out (with a PHP warning) when it can't find a Sheet ID. #5042
* Google Sheets - Settings Page - Caught that sneaky "Unhandled Exception" and handled it properly—because no one likes surprises like that. #5039
* Recipe UI - Loop tokens in conditions were getting a bit dramatic, showing up as invalid without an action. We've calmed them down. #5027
* WooCommerce - Loopable tokens were causing some PHP drama on certain sites. We've sorted that out—no more drama! #5051

**Under the hood:**

* Added a new WP Filter `automator_wpcpostcontent_should_wp_slash` to give you more control over content sanitization—slash away, if you like! #5045

### 5.10.1 [2024-08-20]

**Fixed:**
Expand Down
16 changes: 15 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: automation, google sheets, openai, learndash, webhooks
Requires at least: 5.4
Tested up to: 6.6.1
Requires PHP: 7.0
Stable tag: 5.10.1
Stable tag: 5.10.2
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -364,6 +364,20 @@ We're a Toronto-based WordPress company specializing in elearning and automation

== Changelog ==

= 5.10.2 [2024-08-22] =

**Fixed:**

* Facebook Pages - We've added a little detective work to check if you actually have access to your Pages. If not, we'll let you know—no more guessing! #5023
* Google Sheets - The system has learned not to freak out (with a PHP warning) when it can't find a Sheet ID. #5042
* Google Sheets - Settings Page - Caught that sneaky "Unhandled Exception" and handled it properly—because no one likes surprises like that. #5039
* Recipe UI - Loop tokens in conditions were getting a bit dramatic, showing up as invalid without an action. We've calmed them down. #5027
* WooCommerce - Loopable tokens were causing some PHP drama on certain sites. We've sorted that out—no more drama! #5051

**Under the hood:**

* Added a new WP Filter `automator_wpcpostcontent_should_wp_slash` to give you more control over content sanitization—slash away, if you like! #5045

= 5.10.1 [2024-08-20] =

**Fixed:**
Expand Down
2 changes: 1 addition & 1 deletion src/assets/backend/dist/bundle.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/backend/dist/bundle.min.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/core/lib/utilities/class-automator-utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@ public function automator_sanitize_json( $data, $slash_only = false ) {
* @return mixed
*/
public function automator_sanitize_array( $data, $meta_key = '', $options = array() ) {

foreach ( $data as $k => $v ) {
$k = esc_attr( $k );
if ( is_array( $v ) ) {
Expand All @@ -604,6 +605,9 @@ public function automator_sanitize_array( $data, $meta_key = '', $options = arra
if ( apply_filters( 'automator_wpcpostcontent_should_sanitize', false, $data ) ) {
$v = wp_kses_post( $v );
}
if ( apply_filters( 'automator_wpcpostcontent_should_wp_slash', false, $data ) ) {
$v = wp_slash( $v );
}
$data[ $k ] = $v;
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion src/integrations/facebook/add-facebook-integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function add_integration_func() {
$facebook_options_user = automator_get_option( '_uncannyowl_facebook_settings', false );
$facebook_options_pages = automator_get_option( '_uncannyowl_facebook_pages_settings', false );

if ( ! empty( $facebook_options_user ) && ! empty( $facebook_options_pages ) ) {
if ( ! empty( $facebook_options_user ) ) {
$this->connected = true;
}

Expand Down
4 changes: 4 additions & 0 deletions src/integrations/facebook/helpers/facebook-helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,10 @@ public function fetch_pages_from_api() {

}

if ( empty( $pages ) ) {
$message = esc_html__( 'No Facebook Pages were found linked to this account. Please click the button below to re-authenticate and ensure the correct pages and permissions are selected.', 'uncanny-automator' );
}

$response = array(
'status' => $status,
'message' => $message,
Expand Down
2 changes: 1 addition & 1 deletion src/integrations/facebook/settings/view-facebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

<div id="facebook-pages-list"></div>

<div id="facebook-pages-errors" class="uap-spacing-top"></div>
<uo-alert type="error" id="facebook-pages-errors" class="uap-spacing-top"></uo-alert>

<uo-button id="facebook-pages-update-button" class="uap-spacing-top uap-spacing-top--big" href="<?php echo esc_url( $login_dialog_uri ); ?>" color="secondary">
<?php esc_html_e( 'Update linked pages', 'uncanny-automator' ); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ public function get_google_client() {
$access_token = automator_get_option( '_uncannyowl_google_sheet_settings', array() );

if ( empty( $access_token ) || ! isset( $access_token['access_token'] ) ) {
throw new \Exception( 'Google is not connected' );
return false;
}

return $access_token;
Expand Down
3 changes: 3 additions & 0 deletions src/integrations/google-sheet/settings/file-picker-view.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<table id="spreadSheetTable">
<tbody>
<?php foreach ( $spreadsheets as $spreadsheet ) { ?>
<?php if ( ! isset( $spreadsheet['id'] ) ) { ?>
<?php continue; ?>
<?php } ?>
<tr class="item">
<?php $remove_url = admin_url( "admin-ajax.php?nonce={$nonce}&action=automator_google_sheet_remove_spreadsheet&id={$spreadsheet['id']}" ); ?>
<?php if ( isset( $spreadsheet['name'] ) ) { ?>
Expand Down
2 changes: 1 addition & 1 deletion src/integrations/instagram/settings/view-instagram.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class="uap-spacing-top uap-spacing-top--big"
<?php esc_html_e( 'Update linked Facebook pages', 'uncanny-automator' ); ?>
</uo-button>

<div id="facebook-pages-errors" class="uap-spacing-top"></div>
<uo-alert type="error" id="facebook-pages-errors" class="uap-spacing-top"></uo-alert>

<?php } ?>

Expand Down
31 changes: 0 additions & 31 deletions src/integrations/woocommerce/helpers/woocommerce-helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,35 +307,4 @@ public static function get_user_orders( $user_id = null, $date_filter = null ) {
return ! empty( $orders_data ) ? $orders_data : false;
}

/**
* Returns all timed orders loopable tokens.
*
* @return string[][]
*/
public static function get_timed_orders_loopable_tokens() {

return array(
'ORDER_ID' => array(
'name' => _x( 'Order ID', 'Woo', 'uncanny-automator' ),
'token_type' => 'integer',
),
'DATE_CREATED' => array(
'name' => _x( 'Date created', 'Woo', 'uncanny-automator' ),
'token_type' => 'date',
),
'TOTAL' => array(
'name' => _x( 'Total', 'Woo', 'uncanny-automator' ),
'token_type' => 'float',
),
'STATUS' => array(
'name' => _x( 'Status', 'Woo', 'uncanny-automator' ),
'token_type' => 'float',
),
'ITEMS' => array(
'name' => _x( 'Items', 'Woo', 'uncanny-automator' ),
),
);

}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace Uncanny_Automator\Integrations\Woocommerce\Tokens\Loopable\Universal;

use Uncanny_Automator\Integrations\Woocommerce\Tokens\Loopable\Utils\Loopable_Tokens_Utils;
use Uncanny_Automator\Services\Loopable\Loopable_Token_Collection;
use Uncanny_Automator\Services\Loopable\Universal_Loopable_Token;
use Uncanny_Automator\Woocommerce_Helpers;
Expand All @@ -19,7 +20,7 @@ class All_Orders_24_Hours extends Universal_Loopable_Token {
*/
public function register_loopable_token() {

$child_tokens = Woocommerce_Helpers::get_timed_orders_loopable_tokens();
$child_tokens = Loopable_Tokens_Utils::get_timed_orders_loopable_tokens();

$this->set_id( 'ALL_ORDERS_TWENTY_FOUR_HOURS' );
$this->set_name( _x( 'All orders in the past 24 hours', 'Woo', 'uncanny-automator' ) );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace Uncanny_Automator\Integrations\Woocommerce\Tokens\Loopable\Universal;

use Uncanny_Automator\Integrations\Woocommerce\Tokens\Loopable\Utils\Loopable_Tokens_Utils;
use Uncanny_Automator\Services\Loopable\Loopable_Token_Collection;
use Uncanny_Automator\Services\Loopable\Universal_Loopable_Token;
use Uncanny_Automator\Woocommerce_Helpers;
Expand All @@ -19,7 +20,7 @@ class All_Orders_Monthly extends Universal_Loopable_Token {
*/
public function register_loopable_token() {

$child_tokens = Woocommerce_Helpers::get_timed_orders_loopable_tokens();
$child_tokens = Loopable_Tokens_Utils::get_timed_orders_loopable_tokens();

$this->set_id( 'ALL_ORDERS_MONTHLY' );
$this->set_name( _x( 'All orders in the past 30 days', 'Woo', 'uncanny-automator' ) );
Expand Down
Loading

0 comments on commit 358bacf

Please sign in to comment.