__( 'You do not have permission to edit this product.', 'ai-eshop-optimizer' ), ); } return array( 'url' => admin_url( 'post.php?post=' . rawurlencode( $id ) . '&action=edit' ) ); case 'edit_order': if ( '' === $id ) { return null; } if ( class_exists( '\Automattic\WooCommerce\Utilities\OrderUtil' ) && \Automattic\WooCommerce\Utilities\OrderUtil::custom_orders_table_usage_is_enabled() ) { return array( 'url' => admin_url( 'admin.php?page=wc-orders&action=edit&id=' . rawurlencode( $id ) ) ); } return array( 'url' => admin_url( 'post.php?action=edit&post=' . rawurlencode( $id ) ) ); case 'product_needs': if ( '' === $id ) { return null; } return array( 'url' => admin_url( 'admin.php?page=ai-eshop-dmm&dmm_tab=product_needs&pid=' . rawurlencode( $id ) ), ); } return null; } public static function is_intent( $name ) { return in_array( strtolower( trim( (string) $name ) ), self::INTENTS, true ); } }