From 7ceac97fed838a7e90480002e1852116ed172658 Mon Sep 17 00:00:00 2001 From: Nedim Uka Date: Thu, 4 Oct 2018 10:51:18 +0200 Subject: [PATCH] Fixed template validation bug --- .../includes/admin/template/class-wiaas-template-admin-ajax.php | 2 +- .../includes/templates/class-wiaas-wc-product-template.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/plugins/wiaas/includes/admin/template/class-wiaas-template-admin-ajax.php b/backend/app/plugins/wiaas/includes/admin/template/class-wiaas-template-admin-ajax.php index 9c2eb71..e580115 100644 --- a/backend/app/plugins/wiaas/includes/admin/template/class-wiaas-template-admin-ajax.php +++ b/backend/app/plugins/wiaas/includes/admin/template/class-wiaas-template-admin-ajax.php @@ -57,7 +57,7 @@ class Wiaas_Template_Admin_Ajax { check_ajax_referer('wc_bundles_add_bundled_product', 'security'); $loop = intval($_POST['id']); - $emplate_category_id = intval($_POST['template_category_id']); + $template_category_id = intval($_POST['template_category_id']); $title = $_POST['title']; $options = $_POST['options']; diff --git a/backend/app/plugins/wiaas/includes/templates/class-wiaas-wc-product-template.php b/backend/app/plugins/wiaas/includes/templates/class-wiaas-wc-product-template.php index 8a58748..e9b4198 100644 --- a/backend/app/plugins/wiaas/includes/templates/class-wiaas-wc-product-template.php +++ b/backend/app/plugins/wiaas/includes/templates/class-wiaas-wc-product-template.php @@ -34,7 +34,7 @@ function construct_template_products_class() { * @param $template_category_slug string the name of the main wiaas category * @return mixed */ - public function get_template_categories_from_meta($template_id, $template_category_slug) { + public static function get_template_categories_from_meta($template_id, $template_category_slug) { return get_post_meta($template_id, $template_category_slug, true); }