Advertisement
geminilabs

Untitled

May 8th, 2024
660
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. add_action('setup_theme', function () {
  2.     if (!function_exists('glsr')) {
  3.         return;
  4.     }
  5.     $hook = 'woocommerce_single_product_summary';
  6.     $method = 'renderTitleRating';
  7.     $controller = 'GeminiLabs\SiteReviews\Integrations\WooCommerce\Controllers\ProductController';
  8.     $callback = glsr('Compatibility')->findCallback($hook, $method, $controller) ?? [];
  9.     if (empty($callback['function'])) {
  10.         return;
  11.     }
  12.     remove_action('woocommerce_single_product_summary', $callback['function'], 10);
  13.     add_action('woocommerce_single_product_summary', $callback['function'], 6); // change priority to 6
  14. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement