Hi, is there a hook before the title in search results? Or is it possible to know the available hooks? Thank you.
]]>Hi, is it possible to add Product Review count (i.e. the star rating in single-product-reviews.php) to the clerk data? The guide mentions using code but with no examples
]]>[Clerk.io] [T+1661519514.040] [API] Invalid syntax in argument: products
Object
api: “”
args:
products: “[<?php echo $product->get_id(); ?>]”
init_origin: “https://johannalindbagge.se/produkt/klader/skjortor-blusar/blusar/livia-blouse-svart/”
origin: “https://johannalindbagge.se/produkt/klader/skjortor-blusar/blusar/livia-blouse-svart/”
protocol: “https”proxy: “api.clerk.io/v2”
response: {status: ‘error’, type: ‘ParsingError’, message: ‘Invalid syntax in argument: products’, id: ‘EaIRgnVT’, moreInfo: ‘Go to my.clerk.io, select this store, go to Data > Logs and search for the error ID “EaIRgnVT”.’}
r @ clerk.js:6
this is the console error i am getting on my site’s product page , there is incorrect value of product id in api arguments
]]>When installing/activating the Clerk module I’m getting the following error. We’re running PHP 7.4 on this instance.
Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, bool given in /<website-directory>/app/plugins/clerkio/includes/class-clerk-visitor-tracking.php:28 Stack trace: #0 /<website-directory>/app/plugins/clerkio/includes/class-clerk-visitor-tracking.php(13): Clerk_Visitor_Tracking->initHooks() #1 /<website-directory>/app/plugins/clerkio/includes/class-clerk-visitor-tracking.php(429): Clerk_Visitor_Tracking->__construct() #2 /<website-directory>/app/plugins/clerkio/clerk.php(41): require_once('...') #3 /<website-directory>/app/plugins/clerkio/clerk.php(23): Clerk->includes() #4 /<website-directory>/app/plugins/clerkio/clerk.php(70): Clerk->__construct() #5 /<website-directory>/wp/wp-admin/includes/plugin.php(2313): include_once('...') #6 /<website-directory>/wp/wp-admin/plugins.php(192): plugin_sandbox_scrape() #7 {main} thrown in /<website-directory>/app/plugins/clerkio/includes/class-clerk-visitor-tracking.php on line 28
You are incorrectly accessing the customer_id property in class-clerk-rest-api.php method order_endpoint_callback() which is filling my client’s error logs with warnings like this one:
[22-Feb-2022 08:05:42 UTC] customer_id was called incorrectly. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Clerk_Rest_Api->order_endpoint_callback, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
$order->customer_id
needs changing to $order->get_customer_id()
in that method
You could even do a version check, like you’re doing above that for the order id.
You’ve also forgotten to increment the plugin version ID in clerk.php, which means the plugin isn’t showing a warning to users that there are newer versions available (plugin repo considers 3.5.2 the latest when it should be 3.6.1)
Happy to fix these and send across if you let me know the best way to do so.
]]>When accessing Clerk settings in WP Admin on a fresh install, there is a fatal error by “Facet Attributes” and I am unable to save any settings since the save button is not visible due to the error:
PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /nas/content/live/shop/wp-content/plugins/clerkio/includes/class-clerk-admin-settings.php:1240\nStack trace:\n#0 /nas/content/live/shop/wp-admin/includes/template.php(1743): Clerk_Admin_Settings->getAttributes(Array)\n#1 /nas/content/live/shop/wp-admin/includes/template.php(1701): do_settings_fields('clerk', 'clerk_faceted_n...')\n#2 /nas/content/live/shop/wp-content/plugins/clerkio/includes/class-clerk-admin-settings.php(1933): do_settings_sections('clerk')\n#3 /nas/content/live/shop/wp-includes/class-wp-hook.php(303): Clerk_Admin_Settings->clerk_options_page_html('')\n#4 /nas/content/live/shop/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)\n#5 /nas/content/live/shop/wp-includes/plugin.php(470): WP_Hook->do_action(Array)\n#6 /nas/content/live/shop/wp-admin/admin.php(259): do_action('toplevel_page_c...')\n#7 {main}\n thrown in /nas/content/live/shop/wp-content/plugins/clerkio/includes/class-clerk-admin-settings.php on line 1240, referer: https://shop.wpengine.com/wp-admin/
Please fix asap or we will need to consider other services.
]]>There’s a fatal error in the latest version of your plugin. Line 47 in clerk.php is: require_once( __DIR__ . '/includes/class-clerk-basket.php' );
, and that file does not exist.